From: Simon Josefsson Date: Thu, 27 Oct 2005 14:05:14 +0000 (+0000) Subject: Add MD2. X-Git-Tag: gnutls_1_2_9~81 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9a3d98189c3cccc5ecf25d2284ca4cfbe49df351;p=thirdparty%2Fgnutls.git Add MD2. --- diff --git a/includes/gnutls/gnutls.h.in b/includes/gnutls/gnutls.h.in index de0da6785d..71eb3b8377 100644 --- a/includes/gnutls/gnutls.h.in +++ b/includes/gnutls/gnutls.h.in @@ -88,13 +88,18 @@ typedef enum { GNUTLS_MAC_NULL = 1, GNUTLS_MAC_MD5, GNUTLS_MAC_SHA1, - GNUTLS_MAC_RMD160 + GNUTLS_MAC_RMD160, + GNUTLS_MAC_MD2 } gnutls_mac_algorithm_t; /* The enumerations here should have the same value with gnutls_mac_algorithm_t. */ -typedef enum { GNUTLS_DIG_NULL=1, GNUTLS_DIG_MD5, - GNUTLS_DIG_SHA1, GNUTLS_DIG_RMD160 +typedef enum { + GNUTLS_DIG_NULL=1, + GNUTLS_DIG_MD5, + GNUTLS_DIG_SHA1, + GNUTLS_DIG_RMD160, + GNUTLS_DIG_MD2 } gnutls_digest_algorithm_t; /* exported for other gnutls headers. This is the maximum number diff --git a/lib/gnutls_algorithms.c b/lib/gnutls_algorithms.c index d47acab9fc..7554ab58f0 100644 --- a/lib/gnutls_algorithms.c +++ b/lib/gnutls_algorithms.c @@ -171,7 +171,7 @@ typedef struct gnutls_hash_entry gnutls_hash_entry; static const gnutls_hash_entry hash_algorithms[] = { {"SHA", HASH_OID_SHA1, GNUTLS_MAC_SHA1}, {"MD5", HASH_OID_MD5, GNUTLS_MAC_MD5}, - {"MD2", HASH_OID_MD2, 0/*GNUTLS_MAC_MD2*/}, + {"MD2", HASH_OID_MD2, GNUTLS_MAC_MD2}, {"RIPEMD160", HASH_OID_RMD160, GNUTLS_MAC_RMD160}, {"NULL", NULL, GNUTLS_MAC_NULL}, {0, 0, 0} @@ -1429,7 +1429,7 @@ static const gnutls_sign_entry sign_algorithms[] = { {"RSA-RMD160", SIG_RSA_RMD160_OID, GNUTLS_SIGN_RSA_RMD160, GNUTLS_PK_RSA, GNUTLS_MAC_RMD160}, {"DSA-SHA", SIG_DSA_SHA1_OID, GNUTLS_SIGN_DSA_SHA1, GNUTLS_PK_DSA, GNUTLS_MAC_SHA1}, {"RSA-MD5", SIG_RSA_MD5_OID, GNUTLS_SIGN_RSA_MD5, GNUTLS_PK_RSA, GNUTLS_MAC_MD5}, - {"RSA-MD2", SIG_RSA_MD2_OID, GNUTLS_SIGN_RSA_MD2, GNUTLS_PK_RSA, 0/*GNUTLS_MAC_MD2*/}, + {"RSA-MD2", SIG_RSA_MD2_OID, GNUTLS_SIGN_RSA_MD2, GNUTLS_PK_RSA, GNUTLS_MAC_MD2}, {"GOST R 34.10-2001", SIG_GOST_R3410_2001_OID, 0, 0, 0}, {"GOST R 34.10-94", SIG_GOST_R3410_94_OID, 0, 0, 0}, {0, 0, 0, 0, 0}