[svn] ksba - r267 - in trunk: . src
svn author wk
cvs at cvs.gnupg.org
Tue Jan 30 21:11:16 CET 2007
Author: wk
Date: 2007-01-30 21:11:15 +0100 (Tue, 30 Jan 2007)
New Revision: 267
Modified:
trunk/NEWS
trunk/configure.ac
trunk/src/ChangeLog
trunk/src/cert.c
trunk/src/keyinfo.c
trunk/src/ocsp.c
trunk/src/shared.h
Log:
Add support for SHA-2.
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2006-12-21 01:20:22 UTC (rev 266)
+++ trunk/NEWS 2007-01-30 20:11:15 UTC (rev 267)
@@ -1,3 +1,11 @@
+Noteworthy changes in version 1.0.2
+------------------------------------------------
+
+ * Support for SHA-1.
+
+ * Fixed a couple of memory leaks.
+
+
Noteworthy changes in version 1.0.1 (2006-11-29)
------------------------------------------------
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2006-12-21 01:20:22 UTC (rev 266)
+++ trunk/configure.ac 2007-01-30 20:11:15 UTC (rev 267)
@@ -26,8 +26,8 @@
# Remember to change the version number immediately *after* a release.
# Set my_issvn to "yes" for non-released code. Remember to run an
# "svn up" and "autogen.sh" right before creating a distribution.
-m4_define([my_version], [1.0.1])
-m4_define([my_issvn], [no])
+m4_define([my_version], [1.0.2])
+m4_define([my_issvn], [yes])
m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
|| echo 'Revision: 0')|sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2006-12-21 01:20:22 UTC (rev 266)
+++ trunk/src/ChangeLog 2007-01-30 20:11:15 UTC (rev 267)
@@ -1,3 +1,9 @@
+2007-01-30 Werner Koch <wk at g10code.com>
+
+ * shared.h: Add constants for SHA-2.
+ * keyinfo.c (sig_algo_table): Add SHA-256, SHA384 and SHA-512 from
+ pkcs#1.
+
2006-12-21 Marcus Brinkmann <marcus at g10code.de>
* cms.c (build_enveloped_data_header): Initialize CMS_TREE.
Modified: trunk/src/cert.c
===================================================================
--- trunk/src/cert.c 2006-12-21 01:20:22 UTC (rev 266)
+++ trunk/src/cert.c 2007-01-30 20:11:15 UTC (rev 267)
@@ -349,7 +349,7 @@
{
fprintf (stderr,"\nOops, ksba_cert_get_image failed: "
"imagelen=%d hdr=%d len=%d off=%d\n",
- cert->imagelen, n->nhdr, n->len, n->off);
+ cert->imagelen, n->nhdr, (int)n->len, n->off);
return NULL;
}
/*assert (n->nhdr + n->len + n->off <= cert->imagelen);*/
Modified: trunk/src/keyinfo.c
===================================================================
--- trunk/src/keyinfo.c 2006-12-21 01:20:22 UTC (rev 266)
+++ trunk/src/keyinfo.c 2007-01-30 20:11:15 UTC (rev 267)
@@ -106,6 +106,21 @@
"\x2B\x0E\x03\x02\x1D", 5,
1, "rsa", "s", "\x82", GCRY_MD_SHA1 },
+ { /* from PKCS#1 */
+ "1.2.840.113549.1.1.11", /* sha256WithRSAEncryption */
+ "\x2a\x86\x48\x86\xf7\x0d\x01\x01\x0b", 9,
+ 1, "rsa", "s", "\x82", GCRY_MD_SHA256 },
+
+ { /* from PKCS#1 */
+ "1.2.840.113549.1.1.12", /* sha384WithRSAEncryption */
+ "\x2a\x86\x48\x86\xf7\x0d\x01\x01\x0c", 9,
+ 1, "rsa", "s", "\x82", GCRY_MD_SHA384 },
+
+ { /* from PKCS#1 */
+ "1.2.840.113549.1.1.13", /* sha512WithRSAEncryption */
+ "\x2a\x86\x48\x86\xf7\x0d\x01\x01\x0d", 9,
+ 1, "rsa", "s", "\x82", GCRY_MD_SHA512 },
+
{NULL}
};
Modified: trunk/src/ocsp.c
===================================================================
--- trunk/src/ocsp.c 2006-12-21 01:20:22 UTC (rev 266)
+++ trunk/src/ocsp.c 2007-01-30 20:11:15 UTC (rev 267)
@@ -1200,8 +1200,8 @@
; /* Cope with zero length objects. */
else if (*datalen && !**data)
{ /* Skip the NULL. */
- *datalen--;
- *data++;
+ (*datalen)--;
+ (*data)++;
}
else
return gpg_error (GPG_ERR_INV_OBJ);
@@ -1261,8 +1261,8 @@
; /* Cope with zero length objects. */
else if (!**data)
{ /* Skip the NULL. */
- *datalen--;
- *data++;
+ (*datalen)--;
+ (*data)++;
}
else /* The comment indicates that an enumeration may come here. */
{
Modified: trunk/src/shared.h
===================================================================
--- trunk/src/shared.h 2006-12-21 01:20:22 UTC (rev 266)
+++ trunk/src/shared.h 2007-01-30 20:11:15 UTC (rev 267)
@@ -33,7 +33,11 @@
GCRY_MD_MD5 = 1,
GCRY_MD_SHA1 = 2,
GCRY_MD_RMD160 = 3,
- GCRY_MD_TIGER = 6
+ GCRY_MD_TIGER = 6,
+ GCRY_MD_SHA256 = 8,
+ GCRY_MD_SHA384 = 9,
+ GCRY_MD_SHA512 = 10,
+ GCRY_MD_SHA224 = 11
};
More information about the Gnupg-commits
mailing list