Changeset View
Changeset View
Standalone View
Standalone View
contrib/ldns/ldns/dnssec.h
Show First 20 Lines • Show All 349 Lines • ▼ Show 20 Lines | |||||
* \param[in] *nsec3_rr The RR to read from | * \param[in] *nsec3_rr The RR to read from | ||||
* \return The length of the salt in bytes | * \return The length of the salt in bytes | ||||
*/ | */ | ||||
uint8_t ldns_nsec3_salt_length(const ldns_rr *nsec3_rr); | uint8_t ldns_nsec3_salt_length(const ldns_rr *nsec3_rr); | ||||
/** | /** | ||||
* Returns the salt bytes used in the given NSEC3 RR | * Returns the salt bytes used in the given NSEC3 RR | ||||
* \param[in] *nsec3_rr The RR to read from | * \param[in] *nsec3_rr The RR to read from | ||||
* \return The salt in bytes, this is alloced, so you need to free it | * \return The salt in bytes, this is alloc'ed, so you need to free it | ||||
*/ | */ | ||||
uint8_t *ldns_nsec3_salt_data(const ldns_rr *nsec3_rr); | uint8_t *ldns_nsec3_salt_data(const ldns_rr *nsec3_rr); | ||||
/** | /** | ||||
* Returns the first label of the next ownername in the NSEC3 chain (ie. without the domain) | * Returns the first label of the next ownername in the NSEC3 chain (ie. without the domain) | ||||
* \param[in] nsec3_rr The RR to read from | * \param[in] nsec3_rr The RR to read from | ||||
* \return The first label of the next owner name in the NSEC3 chain, or NULL on error | * \return The first label of the next owner name in the NSEC3 chain, or NULL on error | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 182 Lines • ▼ Show 20 Lines | |||||
* This routine is only present if ldns is compiled with ecdsa support. | * This routine is only present if ldns is compiled with ecdsa support. | ||||
* | * | ||||
* \param[out] target_buffer buffer to place the signature data in ASN1. | * \param[out] target_buffer buffer to place the signature data in ASN1. | ||||
* \param[in] sig_rdf The signature rdf to convert | * \param[in] sig_rdf The signature rdf to convert | ||||
* \return LDNS_STATUS_OK on success, error code otherwise | * \return LDNS_STATUS_OK on success, error code otherwise | ||||
*/ | */ | ||||
ldns_status | ldns_status | ||||
ldns_convert_ecdsa_rrsig_rdf2asn1(ldns_buffer *target_buffer, | ldns_convert_ecdsa_rrsig_rdf2asn1(ldns_buffer *target_buffer, | ||||
const ldns_rdf *sig_rdf); | |||||
/** | |||||
* Converts the ECDSA signature from ASN1 representation (as | |||||
* used by OpenSSL) to raw signature data as used in DNS | |||||
* This routine is only present if ldns is compiled with ED25519 support. | |||||
* | |||||
* \param[in] sig The signature in ASN1 format | |||||
* \param[in] sig_len The length of the signature | |||||
* \return a new rdf with the signature | |||||
*/ | |||||
ldns_rdf * | |||||
ldns_convert_ed25519_rrsig_asn12rdf(const ldns_buffer *sig, long sig_len); | |||||
/** | |||||
* Converts the RRSIG signature RDF (from DNS) to a buffer with the | |||||
* signature in ASN1 format as openssl uses it. | |||||
* This routine is only present if ldns is compiled with ED25519 support. | |||||
* | |||||
* \param[out] target_buffer buffer to place the signature data in ASN1. | |||||
* \param[in] sig_rdf The signature rdf to convert | |||||
* \return LDNS_STATUS_OK on success, error code otherwise | |||||
*/ | |||||
ldns_status | |||||
ldns_convert_ed25519_rrsig_rdf2asn1(ldns_buffer *target_buffer, | |||||
const ldns_rdf *sig_rdf); | |||||
/** | |||||
* Converts the ECDSA signature from ASN1 representation (as | |||||
* used by OpenSSL) to raw signature data as used in DNS | |||||
* This routine is only present if ldns is compiled with ED448 support. | |||||
* | |||||
* \param[in] sig The signature in ASN1 format | |||||
* \param[in] sig_len The length of the signature | |||||
* \return a new rdf with the signature | |||||
*/ | |||||
ldns_rdf * | |||||
ldns_convert_ed448_rrsig_asn12rdf(const ldns_buffer *sig, long sig_len); | |||||
/** | |||||
* Converts the RRSIG signature RDF (from DNS) to a buffer with the | |||||
* signature in ASN1 format as openssl uses it. | |||||
* This routine is only present if ldns is compiled with ED448 support. | |||||
* | |||||
* \param[out] target_buffer buffer to place the signature data in ASN1. | |||||
* \param[in] sig_rdf The signature rdf to convert | |||||
* \return LDNS_STATUS_OK on success, error code otherwise | |||||
*/ | |||||
ldns_status | |||||
ldns_convert_ed448_rrsig_rdf2asn1(ldns_buffer *target_buffer, | |||||
const ldns_rdf *sig_rdf); | const ldns_rdf *sig_rdf); | ||||
#endif /* LDNS_BUILD_CONFIG_HAVE_SSL */ | #endif /* LDNS_BUILD_CONFIG_HAVE_SSL */ | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} | } | ||||
#endif | #endif | ||||
#endif /* LDNS_DNSSEC_H */ | #endif /* LDNS_DNSSEC_H */ |