diff options
author | joerg <joerg@pkgsrc.org> | 2009-02-13 11:21:07 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2009-02-13 11:21:07 +0000 |
commit | d5294c74117bbad3b3f188323e52f1685a63014e (patch) | |
tree | 8925d8d1ef5322cce07df98c3089bfdf3782d366 /pkgtools/pkg_install/files/add | |
parent | a0e2359df6a3b9d997e32a504811477d3ccdbae7 (diff) | |
download | pkgsrc-d5294c74117bbad3b3f188323e52f1685a63014e.tar.gz |
Close the archive on fatal errors during signature validation. This can
happen e.g. if pkg_add finds a directory with that name.
Remove a bunch of HAVE_SSL conditionals that no longer apply as GPG
support is back in.
Diffstat (limited to 'pkgtools/pkg_install/files/add')
-rw-r--r-- | pkgtools/pkg_install/files/add/Makefile.in | 3 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/add/perform.c | 14 |
2 files changed, 6 insertions, 11 deletions
diff --git a/pkgtools/pkg_install/files/add/Makefile.in b/pkgtools/pkg_install/files/add/Makefile.in index 1b45ed175b8..1eb6bab76de 100644 --- a/pkgtools/pkg_install/files/add/Makefile.in +++ b/pkgtools/pkg_install/files/add/Makefile.in @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.in,v 1.19 2009/02/02 12:35:00 joerg Exp $ +# $NetBSD: Makefile.in,v 1.20 2009/02/13 11:21:07 joerg Exp $ srcdir= @srcdir@ @@ -23,7 +23,6 @@ SSL_SUPPORT= @ssl_support@ LIBS= -linstall -lfetch -larchive -lbz2 -lz .if !empty(SSL_SUPPORT) LIBS+= -lcrypto -CPPFLAGS+= -DHAVE_SSL .endif LIBS+= @LIBS@ diff --git a/pkgtools/pkg_install/files/add/perform.c b/pkgtools/pkg_install/files/add/perform.c index a7bc936a149..f4922613e15 100644 --- a/pkgtools/pkg_install/files/add/perform.c +++ b/pkgtools/pkg_install/files/add/perform.c @@ -1,4 +1,4 @@ -/* $NetBSD: perform.c,v 1.76 2009/02/11 23:42:42 joerg Exp $ */ +/* $NetBSD: perform.c,v 1.77 2009/02/13 11:21:07 joerg Exp $ */ #if HAVE_CONFIG_H #include "config.h" #endif @@ -6,7 +6,7 @@ #if HAVE_SYS_CDEFS_H #include <sys/cdefs.h> #endif -__RCSID("$NetBSD: perform.c,v 1.76 2009/02/11 23:42:42 joerg Exp $"); +__RCSID("$NetBSD: perform.c,v 1.77 2009/02/13 11:21:07 joerg Exp $"); /*- * Copyright (c) 2003 Grant Beattie <grant@NetBSD.org> @@ -1235,13 +1235,11 @@ pkg_do(const char *pkgpath, int mark_automatic) goto clean_find_archive; } -#ifdef HAVE_SSL invalid_sig = pkg_verify_signature(&pkg->archive, &pkg->entry, &pkg->pkgname, &signature_cookie); -#else - invalid_sig = 1; - signature_cookie = NULL; -#endif + + if (pkg->archive == NULL) + goto clean_memory; if (read_meta_data(pkg)) goto clean_memory; @@ -1400,9 +1398,7 @@ clean_memory: } free(pkg->other_version); free(pkg->pkgname); -#ifdef HAVE_SSL pkg_free_signature(signature_cookie); -#endif clean_find_archive: free(pkg); return status; |