diff options
author | joerg <joerg> | 2009-02-09 16:54:08 +0000 |
---|---|---|
committer | joerg <joerg> | 2009-02-09 16:54:08 +0000 |
commit | 8d4fd65a7382f80556c91efda65706b2697de98b (patch) | |
tree | 43ad2840bdfbfd95163a3887c2605acb23703b4c /pkgtools | |
parent | 08bace7f5bb9da6aaafa07597a8b4788dad606f4 (diff) | |
download | pkgsrc-8d4fd65a7382f80556c91efda65706b2697de98b.tar.gz |
Fix !OpenSSL build/bootstrap.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkg_install/files/lib/Makefile.in | 6 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/lib/pkg_signature.c | 12 |
2 files changed, 13 insertions, 5 deletions
diff --git a/pkgtools/pkg_install/files/lib/Makefile.in b/pkgtools/pkg_install/files/lib/Makefile.in index 3e361d51df9..63e460113dd 100644 --- a/pkgtools/pkg_install/files/lib/Makefile.in +++ b/pkgtools/pkg_install/files/lib/Makefile.in @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.in,v 1.24 2009/02/02 12:35:01 joerg Exp $ +# $NetBSD: Makefile.in,v 1.25 2009/02/09 16:54:08 joerg Exp $ srcdir= @srcdir@ @@ -36,12 +36,12 @@ CPPFLAGS+= -DSYSCONFDIR=\"$(sysconfdir)\" .if !empty(BOOTSTRAP) CPPFLAGS+= -DBOOTSTRAP .else -OBJS+= pkg_io.o +OBJS+= pkg_io.o pkg_signature.o .endif .if !empty(SSL_SUPPORT) CPPFLAGS+= -DHAVE_SSL -OBJS+= pkg_signature.o pkcs7.o +OBJS+= pkcs7.o .endif all: $(LIB) diff --git a/pkgtools/pkg_install/files/lib/pkg_signature.c b/pkgtools/pkg_install/files/lib/pkg_signature.c index 3f4bb1f039c..b76bd8c58e5 100644 --- a/pkgtools/pkg_install/files/lib/pkg_signature.c +++ b/pkgtools/pkg_install/files/lib/pkg_signature.c @@ -1,4 +1,4 @@ -/* $NetBSD: pkg_signature.c,v 1.2 2009/02/02 12:35:01 joerg Exp $ */ +/* $NetBSD: pkg_signature.c,v 1.3 2009/02/09 16:54:08 joerg Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -7,7 +7,7 @@ #if HAVE_SYS_CDEFS_H #include <sys/cdefs.h> #endif -__RCSID("$NetBSD: pkg_signature.c,v 1.2 2009/02/02 12:35:01 joerg Exp $"); +__RCSID("$NetBSD: pkg_signature.c,v 1.3 2009/02/09 16:54:08 joerg Exp $"); /*- * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>. @@ -356,10 +356,16 @@ pkg_verify_signature(struct archive **archive, struct archive_entry **entry, free(signature_file); } else { +#ifdef HAVE_SSL has_sig = !easy_pkcs7_verify(hash_file, hash_len, signature_file, signature_len, certs_packages, 1); free(signature_file); +#else + warnx("No OpenSSL support compiled in, skipping signature"); + has_sig = 0; + free(signature_file); +#endif } r = archive_read_next_header(*archive, &my_entry); @@ -503,6 +509,7 @@ static const char hash_template[] = static const char hash_trailer[] = "end pkgsrc signature\n"; +#ifdef HAVE_SSL void pkg_sign_x509(const char *name, const char *output, const char *key_file, const char *cert_file) { @@ -593,6 +600,7 @@ pkg_sign_x509(const char *name, const char *output, const char *key_file, const exit(0); } +#endif void pkg_sign_gpg(const char *name, const char *output) |