From: Wouter Wijngaards Date: Tue, 19 Feb 2008 13:49:47 +0000 (+0000) Subject: NSEC3 type code update for signing algorithms. X-Git-Tag: release-1.3.0~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a4ae6647ff9de088c5c64ba5898012c6d965691;p=thirdparty%2Fldns.git NSEC3 type code update for signing algorithms. --- diff --git a/keys.c b/keys.c index dd35bb83..c2d34ee9 100644 --- a/keys.c +++ b/keys.c @@ -139,23 +139,35 @@ ldns_key_new_frm_fp_l(ldns_key **key, FILE *fp, int *line_nr) if (strncmp(d, "1 RSA", 2) == 0) { alg = LDNS_SIGN_RSAMD5; } + if (strncmp(d, "2 DH", 2) == 0) { + alg = LDNS_DH; + } if (strncmp(d, "3 DSA", 2) == 0) { alg = LDNS_SIGN_DSA; } - if (strncmp(d, "131 DSA", 4) == 0) { - alg = LDNS_DSA_NSEC3; + if (strncmp(d, "4 ECC", 2) == 0) { + alg = LDNS_ECC; } if (strncmp(d, "5 RSASHA1", 2) == 0) { alg = LDNS_SIGN_RSASHA1; } - if (strncmp(d, "6 RSASHA256", 2) == 0) { + if (strncmp(d, "6 DSA", 4) == 0) { + alg = LDNS_DSA_NSEC3; + } + if (strncmp(d, "7 RSASHA1", 4) == 0) { + alg = LDNS_RSASHA1_NSEC3; + } + if (strncmp(d, "8 RSASHA256", 2) == 0) { alg = LDNS_SIGN_RSASHA256; } - if (strncmp(d, "7 RSASHA512", 2) == 0) { + if (strncmp(d, "9 RSASHA512", 2) == 0) { alg = LDNS_SIGN_RSASHA512; } - if (strncmp(d, "133 RSASHA1", 4) == 0) { - alg = LDNS_RSASHA1_NSEC3; + if (strncmp(d, "10 RSASHA256", 3) == 0) { + alg = LDNS_SIGN_RSASHA256_NSEC3; + } + if (strncmp(d, "11 RSASHA512", 3) == 0) { + alg = LDNS_SIGN_RSASHA512_NSEC3; } if (strncmp(d, "157 HMAC-MD5", 4) == 0) { alg = LDNS_SIGN_HMACMD5; diff --git a/ldns/keys.h b/ldns/keys.h index 98e83fb3..48bc4812 100644 --- a/ldns/keys.h +++ b/ldns/keys.h @@ -43,12 +43,12 @@ enum ldns_enum_algorithm LDNS_DSA = 3, LDNS_ECC = 4, LDNS_RSASHA1 = 5, - LDNS_RSASHA256 = 6, - LDNS_RSASHA512 = 7, - LDNS_DSA_NSEC3 = 131, - LDNS_RSASHA1_NSEC3 = 133, - LDNS_RSASHA256_NSEC3 = 134, - LDNS_RSASHA512_NSEC3 = 135, + LDNS_DSA_NSEC3 = 6, + LDNS_RSASHA1_NSEC3 = 7, + LDNS_RSASHA256 = 8, /* not official */ + LDNS_RSASHA512 = 9, /* not official */ + LDNS_RSASHA256_NSEC3 = 10, /* not official */ + LDNS_RSASHA512_NSEC3 = 11, /* not official */ LDNS_INDIRECT = 252, LDNS_PRIVATEDNS = 253, LDNS_PRIVATEOID = 254