pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/security/netpgpverify/files
Module Name: pkgsrc
Committed By: agc
Date: Wed Jun 15 03:34:15 UTC 2016
Modified Files:
pkgsrc/security/netpgpverify/files: libverify.c verify.h
Log Message:
Update netpgpverify and libnetpgpverify to 20160615:
Simplify the method of finding the end of the versioning information
in the signature - back up to the "\n" character at the end of the
signature start:
"-----BEGIN PGP SIGNATURE-----\n"
and then find the "\n\n" character sequence to denote the start of the
signature itself. The previous version worked, but this is more efficient.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 pkgsrc/security/netpgpverify/files/libverify.c
cvs rdiff -u -r1.21 -r1.22 pkgsrc/security/netpgpverify/files/verify.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/security/netpgpverify/files/libverify.c
diff -u pkgsrc/security/netpgpverify/files/libverify.c:1.14 pkgsrc/security/netpgpverify/files/libverify.c:1.15
--- pkgsrc/security/netpgpverify/files/libverify.c:1.14 Tue Jun 14 18:00:59 2016
+++ pkgsrc/security/netpgpverify/files/libverify.c Wed Jun 15 03:34:15 2016
@@ -2021,18 +2021,14 @@ read_ascii_armor(pgpv_cursor_t *cursor,
return 0;
}
litdata.u.litdata.len = litdata.s.size = (size_t)(p - datastart);
- p += strlen(SIGSTART);
- /* Work out whther there's a version line */
- if (memcmp(p, "Version:", 8) == 0) {
- if ((p = find_bin_string(p, mem->size, "\n\n", 2)) == NULL) {
- snprintf(cursor->why, sizeof(cursor->why),
- "malformed armed signature at %zu", (size_t)(p - mem->mem));
- return 0;
- }
- p += 2;
- } else {
- p += 1;
+ /* this puts p at the newline character, so it will find \n\n if no version */
+ p += strlen(SIGSTART) - 1;
+ if ((p = find_bin_string(p, mem->size, "\n\n", 2)) == NULL) {
+ snprintf(cursor->why, sizeof(cursor->why),
+ "malformed armed signature at %zu", (size_t)(p - mem->mem));
+ return 0;
}
+ p += 2;
sigend = find_bin_string(p, mem->size, SIGEND, strlen(SIGEND));
binsigsize = b64decode((char *)p, (size_t)(sigend - p), binsig, sizeof(binsig));
Index: pkgsrc/security/netpgpverify/files/verify.h
diff -u pkgsrc/security/netpgpverify/files/verify.h:1.21 pkgsrc/security/netpgpverify/files/verify.h:1.22
--- pkgsrc/security/netpgpverify/files/verify.h:1.21 Tue Jun 14 18:00:59 2016
+++ pkgsrc/security/netpgpverify/files/verify.h Wed Jun 15 03:34:15 2016
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2012,2013,2014,2015 Alistair Crooks <agc%NetBSD.org@localhost>
+ * Copyright (c) 2012,2013,2014,2015,2016 Alistair Crooks <agc%NetBSD.org@localhost>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,9 +23,9 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef NETPGP_VERIFY_H_
-#define NETPGP_VERIFY_H_ 20160614
+#define NETPGP_VERIFY_H_ 20160615
-#define NETPGPVERIFY_VERSION "netpgpverify portable 20160614"
+#define NETPGPVERIFY_VERSION "netpgpverify portable 20160615"
#include <sys/types.h>
Home |
Main Index |
Thread Index |
Old Index