pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/netpgp Do not use random data for pass-phrase...
details: https://anonhg.NetBSD.org/pkgsrc/rev/8d9898e4881e
branches: trunk
changeset: 377380:8d9898e4881e
user: khorben <khorben%pkgsrc.org@localhost>
date: Thu Mar 15 20:00:43 2018 +0000
description:
Do not use random data for pass-phrases on EOF
Originally submitted on tech-pkg@ as:
[PATCH 04/11] Do not use random data for pass-phrases on EOF
Only modified for consistency with the coding style; as also applied in
NetBSD's src repository.
Tested on NetBSD/amd64.
diffstat:
security/netpgp/Makefile | 4 ++--
security/netpgp/distinfo | 4 ++--
security/netpgp/patches/patch-src_lib_keyring.c | 20 ++++++++++++++++----
3 files changed, 20 insertions(+), 8 deletions(-)
diffs (72 lines):
diff -r 66942fdce46b -r 8d9898e4881e security/netpgp/Makefile
--- a/security/netpgp/Makefile Thu Mar 15 19:51:08 2018 +0000
+++ b/security/netpgp/Makefile Thu Mar 15 20:00:43 2018 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.26 2018/03/15 19:51:08 khorben Exp $
+# $NetBSD: Makefile,v 1.27 2018/03/15 20:00:43 khorben Exp $
DISTNAME= netpgp-20140220
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_LOCAL}
diff -r 66942fdce46b -r 8d9898e4881e security/netpgp/distinfo
--- a/security/netpgp/distinfo Thu Mar 15 19:51:08 2018 +0000
+++ b/security/netpgp/distinfo Thu Mar 15 20:00:43 2018 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.20 2018/03/15 19:51:08 khorben Exp $
+$NetBSD: distinfo,v 1.21 2018/03/15 20:00:43 khorben Exp $
SHA1 (netpgp-20140220.tar.gz) = 815418cbae5d02a1385cd7947618303e5aa06d5c
RMD160 (netpgp-20140220.tar.gz) = 970f55292852d5dbfde3eb17a5fefd6a7c820c4e
SHA512 (netpgp-20140220.tar.gz) = ec6cfa0131cd50aee273b81cd64f448258121d7e9c8d4914be39ba59b5c28149bced3866c57f521167480da04b60d9d9bd2b228319dc8baa31328fb7c37e6b96
Size (netpgp-20140220.tar.gz) = 1521820 bytes
-SHA1 (patch-src_lib_keyring.c) = 937af3b82b07c2817b3b20e6d76043950c7afd29
+SHA1 (patch-src_lib_keyring.c) = b924af4877aaab98e542425b5d9427830ddd5b75
SHA1 (patch-src_lib_reader.c) = 2ebaddebbc2f6f42f7391933ebfef39e3a73a367
diff -r 66942fdce46b -r 8d9898e4881e security/netpgp/patches/patch-src_lib_keyring.c
--- a/security/netpgp/patches/patch-src_lib_keyring.c Thu Mar 15 19:51:08 2018 +0000
+++ b/security/netpgp/patches/patch-src_lib_keyring.c Thu Mar 15 20:00:43 2018 +0000
@@ -1,9 +1,10 @@
-$NetBSD: patch-src_lib_keyring.c,v 1.2 2018/03/15 19:37:30 khorben Exp $
+$NetBSD: patch-src_lib_keyring.c,v 1.3 2018/03/15 20:00:43 khorben Exp $
Do not crash when listing keys without a keyring.
+Do not use random data for pass-phrases on EOF.
Do not ask for a passphrase when empty.
---- src/lib/keyring.c.orig 2018-03-15 19:31:30.000000000 +0000
+--- src/lib/keyring.c.orig 2011-06-25 00:37:44.000000000 +0000
+++ src/lib/keyring.c
@@ -226,7 +226,7 @@ typedef struct {
pgp_seckey_t *seckey;
@@ -14,7 +15,18 @@
decrypt_cb(const pgp_packet_t *pkt, pgp_cbdata_t *cbinfo)
{
const pgp_contents_t *content = &pkt->u;
-@@ -292,6 +292,20 @@ decrypt_cb(const pgp_packet_t *pkt, pgp_
+@@ -244,7 +244,9 @@ decrypt_cb(const pgp_packet_t *pkt, pgp_
+ break;
+
+ case PGP_GET_PASSPHRASE:
+- (void) pgp_getpassphrase(decrypt->passfp, pass, sizeof(pass));
++ if (pgp_getpassphrase(decrypt->passfp, pass, sizeof(pass)) == 0) {
++ pass[0] = '\0';
++ }
+ *content->skey_passphrase.passphrase = netpgp_strdup(pass);
+ pgp_forget(pass, (unsigned)sizeof(pass));
+ return PGP_KEEP_MEMORY;
+@@ -292,6 +294,20 @@ decrypt_cb(const pgp_packet_t *pkt, pgp_
return PGP_RELEASE_MEMORY;
}
@@ -35,7 +47,7 @@
/**
\ingroup Core_Keys
\brief Decrypts secret key from given keydata with given passphrase
-@@ -306,8 +320,18 @@ pgp_decrypt_seckey(const pgp_key_t *key,
+@@ -306,8 +322,18 @@ pgp_decrypt_seckey(const pgp_key_t *key,
const int printerrors = 1;
decrypt_t decrypt;
Home |
Main Index |
Thread Index |
Old Index