diff options
author | joerg <joerg@pkgsrc.org> | 2009-02-09 16:54:08 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2009-02-09 16:54:08 +0000 |
commit | a5ef458265d3da4a5a1a798bf771d195897fcf00 (patch) | |
tree | 43ad2840bdfbfd95163a3887c2605acb23703b4c | |
parent | 07e9b3a92280fdd244c28f59ee8bb05fef1899fe (diff) | |
download | pkgsrc-a5ef458265d3da4a5a1a798bf771d195897fcf00.tar.gz |
Fix !OpenSSL build/bootstrap.
-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) |