From: Willem Toorop Date: Fri, 4 Nov 2011 13:39:16 +0000 (+0000) Subject: Accept v1.x Private-key-format. X-Git-Tag: release-1.6.12~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8f932b4baa912c158018670070c8403ce324387;p=thirdparty%2Fldns.git Accept v1.x Private-key-format. --- diff --git a/dnssec_verify.c b/dnssec_verify.c index 8e492dae..637f05f8 100644 --- a/dnssec_verify.c +++ b/dnssec_verify.c @@ -980,7 +980,7 @@ ldns_dnssec_derive_trust_tree_ds_rrset(ldns_dnssec_trust_tree *new_tree, ldns_dnssec_data_chain *data_chain, ldns_rr *cur_rr) { - return ldns_dnssec_derive_trust_tree_ds_rrset_time( + ldns_dnssec_derive_trust_tree_ds_rrset_time( new_tree, data_chain, cur_rr, ldns_time(NULL)); } @@ -1039,7 +1039,7 @@ void ldns_dnssec_derive_trust_tree_no_sig(ldns_dnssec_trust_tree *new_tree, ldns_dnssec_data_chain *data_chain) { - return ldns_dnssec_derive_trust_tree_no_sig_time( + ldns_dnssec_derive_trust_tree_no_sig_time( new_tree, data_chain, ldns_time(NULL)); } diff --git a/keys.c b/keys.c index 2d7f62ab..3772122a 100644 --- a/keys.c +++ b/keys.c @@ -314,7 +314,7 @@ ldns_key_new_frm_fp_l(ldns_key **key, FILE *fp, int *line_nr) /* the file is highly structured. Do this in sequence */ /* RSA: - * Private-key-format: v1.2 + * Private-key-format: v1.x. * Algorithm: 1 (RSA) */ @@ -326,7 +326,7 @@ ldns_key_new_frm_fp_l(ldns_key **key, FILE *fp, int *line_nr) LDNS_FREE(d); return LDNS_STATUS_SYNTAX_ERR; } - if (strncmp(d, "v1.2", strlen(d)) != 0) { + if (strncmp(d, "v1.", 3) != 0) { ldns_key_free(k); LDNS_FREE(d); return LDNS_STATUS_SYNTAX_VERSION_ERR; diff --git a/ldns/keys.h b/ldns/keys.h index ae5d4741..ad3ff25b 100644 --- a/ldns/keys.h +++ b/ldns/keys.h @@ -200,7 +200,7 @@ ldns_key *ldns_key_new_frm_algorithm(ldns_signing_algorithm a, uint16_t size); * Creates a new priv key based on the * contents of the file pointed by fp. * - * The file should be in Private-key-format v1.2. + * The file should be in Private-key-format v1.x. * * \param[out] k the new ldns_key structure * \param[in] fp the file pointer to use @@ -212,7 +212,7 @@ ldns_status ldns_key_new_frm_fp(ldns_key **k, FILE *fp); * Creates a new private key based on the * contents of the file pointed by fp * - * The file should be in Private-key-format v1.2. + * The file should be in Private-key-format v1.x. * * \param[out] k the new ldns_key structure * \param[in] fp the file pointer to use