From: Jelte Jansen Date: Thu, 9 Apr 2009 14:09:17 +0000 (+0000) Subject: ldns still had the _nsec3 aliases for sha2 X-Git-Tag: release-1.6.0~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=203fa6946d702f0b01298a2eb2ef96a227c448f7;p=thirdparty%2Fldns.git ldns still had the _nsec3 aliases for sha2 --- diff --git a/dnssec_sign.c b/dnssec_sign.c index 46724613..5ff3d214 100644 --- a/dnssec_sign.c +++ b/dnssec_sign.c @@ -128,14 +128,12 @@ ldns_sign_public_buffer(ldns_buffer *sign_buf, ldns_key *current_key) break; #ifdef USE_SHA2 case LDNS_SIGN_RSASHA256: - case LDNS_SIGN_RSASHA256_NSEC3: b64rdf = ldns_sign_public_evp( sign_buf, ldns_key_evp_key(current_key), EVP_sha256()); break; case LDNS_SIGN_RSASHA512: - case LDNS_SIGN_RSASHA512_NSEC3: b64rdf = ldns_sign_public_evp( sign_buf, ldns_key_evp_key(current_key), diff --git a/host2str.c b/host2str.c index 49b69329..283e8cd2 100644 --- a/host2str.c +++ b/host2str.c @@ -1373,9 +1373,7 @@ ldns_key2buffer_str(ldns_buffer *output, const ldns_key *k) case LDNS_SIGN_RSASHA1: case LDNS_SIGN_RSASHA1_NSEC3: case LDNS_SIGN_RSASHA256: - case LDNS_SIGN_RSASHA256_NSEC3: case LDNS_SIGN_RSASHA512: - case LDNS_SIGN_RSASHA512_NSEC3: case LDNS_SIGN_RSAMD5: /* copied by looking at dnssec-keygen output */ /* header */ @@ -1404,21 +1402,11 @@ ldns_key2buffer_str(ldns_buffer *output, const ldns_key *k) "Algorithm: %u (RSASHA256)\n", LDNS_RSASHA256); break; - case LDNS_SIGN_RSASHA256_NSEC3: - ldns_buffer_printf(output, - "Algorithm: %u (RSASHA256_NSEC3)\n", - LDNS_RSASHA256_NSEC3); - break; case LDNS_SIGN_RSASHA512: ldns_buffer_printf(output, "Algorithm: %u (RSASHA512)\n", LDNS_RSASHA512); break; - case LDNS_SIGN_RSASHA512_NSEC3: - ldns_buffer_printf(output, - "Algorithm: %u (RSASHA512_NSEC3)\n", - LDNS_RSASHA512_NSEC3); - break; #endif default: fprintf(stderr, "Warning: unknown signature "); diff --git a/keys.c b/keys.c index 3ab96f5d..a58809c5 100644 --- a/keys.c +++ b/keys.c @@ -26,9 +26,7 @@ ldns_lookup_table ldns_signing_algorithms[] = { { LDNS_SIGN_RSASHA1_NSEC3, "RSASHA1_NSEC3" }, #ifdef USE_SHA2 { LDNS_SIGN_RSASHA256, "RSASHA256" }, - { LDNS_SIGN_RSASHA256_NSEC3, "RSASHA256_NSEC3" }, { LDNS_SIGN_RSASHA512, "RSASHA512" }, - { LDNS_SIGN_RSASHA512_NSEC3, "RSASHA512_NSEC3" }, #endif { LDNS_SIGN_DSA, "DSA" }, { LDNS_SIGN_DSA_NSEC3, "DSA_NSEC3" }, @@ -176,28 +174,12 @@ ldns_key_new_frm_fp_l(ldns_key **key, FILE *fp, int *line_nr) fprintf(stderr, "version of ldns\n"); #endif } - if (strncmp(d, "9 RSASHA256", 2) == 0) { -#ifdef USE_SHA2 - alg = LDNS_SIGN_RSASHA256_NSEC3; -#else - fprintf(stderr, "Warning: SHA256 not compiled into this "); - fprintf(stderr, "version of ldns\n"); -#endif - } - if (strncmp(d, "10 RSASHA512", 3) == 0) { + if (strncmp(d, "9 RSASHA512", 3) == 0) { #ifdef USE_SHA2 alg = LDNS_SIGN_RSASHA512; #else fprintf(stderr, "Warning: SHA512 not compiled into this "); fprintf(stderr, "version of ldns\n"); -#endif - } - if (strncmp(d, "11 RSASHA512", 3) == 0) { -#ifdef USE_SHA2 - alg = LDNS_SIGN_RSASHA512_NSEC3; -#else - fprintf(stderr, "Warning: SHA512 not compiled into this "); - fprintf(stderr, "version of ldns\n"); #endif } if (strncmp(d, "157 HMAC-MD5", 4) == 0) { @@ -218,9 +200,7 @@ ldns_key_new_frm_fp_l(ldns_key **key, FILE *fp, int *line_nr) case LDNS_RSASHA1_NSEC3: #ifdef USE_SHA2 case LDNS_SIGN_RSASHA256: - case LDNS_SIGN_RSASHA256_NSEC3: case LDNS_SIGN_RSASHA512: - case LDNS_SIGN_RSASHA512_NSEC3: #endif ldns_key_set_algorithm(k, alg); rsa = ldns_key_new_frm_fp_rsa_l(fp, line_nr); @@ -541,9 +521,7 @@ ldns_key_new_frm_algorithm(ldns_signing_algorithm alg, uint16_t size) case LDNS_SIGN_RSASHA1: case LDNS_SIGN_RSASHA1_NSEC3: case LDNS_SIGN_RSASHA256: - case LDNS_SIGN_RSASHA256_NSEC3: case LDNS_SIGN_RSASHA512: - case LDNS_SIGN_RSASHA512_NSEC3: r = RSA_generate_key((int)size, RSA_F4, NULL, NULL); if (RSA_check_key(r) != 1) { return NULL; @@ -996,9 +974,7 @@ ldns_key2rr(const ldns_key *k) case LDNS_RSASHA1: case LDNS_RSASHA1_NSEC3: case LDNS_RSASHA256: - case LDNS_RSASHA256_NSEC3: case LDNS_RSASHA512: - case LDNS_RSASHA512_NSEC3: ldns_rr_push_rdf(pubkey, ldns_native2rdf_int8(LDNS_RDF_TYPE_ALG, ldns_key_algorithm(k))); rsa = ldns_key_rsa_key(k); diff --git a/ldns/keys.h b/ldns/keys.h index c2c833ee..9c366110 100644 --- a/ldns/keys.h +++ b/ldns/keys.h @@ -47,9 +47,7 @@ enum ldns_enum_algorithm LDNS_DSA_NSEC3 = 6, LDNS_RSASHA1_NSEC3 = 7, LDNS_RSASHA256 = 8, /* not official */ - LDNS_RSASHA256_NSEC3 = 9, /* not official */ - LDNS_RSASHA512 = 10, /* not official */ - LDNS_RSASHA512_NSEC3 = 11, /* not official */ + LDNS_RSASHA512 = 9, /* not official */ LDNS_INDIRECT = 252, LDNS_PRIVATEDNS = 253, LDNS_PRIVATEOID = 254 @@ -76,9 +74,7 @@ enum ldns_enum_signing_algorithm LDNS_SIGN_DSA = LDNS_DSA, LDNS_SIGN_RSASHA1_NSEC3 = LDNS_RSASHA1_NSEC3, LDNS_SIGN_RSASHA256 = LDNS_RSASHA256, - LDNS_SIGN_RSASHA256_NSEC3= LDNS_RSASHA256_NSEC3, LDNS_SIGN_RSASHA512 = LDNS_RSASHA512, - LDNS_SIGN_RSASHA512_NSEC3= LDNS_RSASHA512_NSEC3, LDNS_SIGN_DSA_NSEC3 = LDNS_DSA_NSEC3, LDNS_SIGN_HMACMD5 = 157, /* not official! This type is for TSIG, not DNSSEC */ LDNS_SIGN_HMACSHA1 = 158, /* not official! This type is for TSIG, not DNSSEC */ diff --git a/rr_functions.c b/rr_functions.c index 718d639e..7afd8675 100644 --- a/rr_functions.c +++ b/rr_functions.c @@ -291,9 +291,7 @@ ldns_rr_dnskey_key_size_raw(const unsigned char* keydata, case LDNS_SIGN_RSASHA1_NSEC3: #ifdef USE_SHA2 case LDNS_SIGN_RSASHA256: - case LDNS_SIGN_RSASHA256_NSEC3: case LDNS_SIGN_RSASHA512: - case LDNS_SIGN_RSASHA512_NSEC3: #endif if (len > 0) { if (keydata[0] == 0) { diff --git a/str2host.c b/str2host.c index 036918ff..aad1ae4b 100644 --- a/str2host.c +++ b/str2host.c @@ -392,7 +392,7 @@ ldns_str2rdf_str(ldns_rdf **rd, const char *str) i = 1; for (str_i = 0; str_i < strlen(str); str_i++) { if (str[str_i] == '\\') { - esc = parse_escape(str + str_i, data + i); + esc = parse_escape((uint8_t *) (str + str_i), data + i); if (esc > 0) { str_i += esc; i++;