{
LDNS_RSAMD5 = 1, /* RFC 4034,4035 */
LDNS_DH = 2,
-#ifdef USE_DSA
+#if LDNS_BUILD_CONFIG_USE_DSA
LDNS_DSA = 3,
-#endif /* USE_DSA */
+#endif /* LDNS_BUILD_CONFIG_USE_DSA */
LDNS_ECC = 4,
LDNS_RSASHA1 = 5,
-#ifdef USE_DSA
+#if LDNS_BUILD_CONFIG_USE_DSA
LDNS_DSA_NSEC3 = 6,
-#endif /* USE_DSA */
+#endif /* LDNS_BUILD_CONFIG_USE_DSA */
LDNS_RSASHA1_NSEC3 = 7,
LDNS_RSASHA256 = 8, /* RFC 5702 */
LDNS_RSASHA512 = 10, /* RFC 5702 */
LDNS_ECC_GOST = 12, /* RFC 5933 */
LDNS_ECDSAP256SHA256 = 13, /* RFC 6605 */
LDNS_ECDSAP384SHA384 = 14, /* RFC 6605 */
-#ifdef USE_ED25519
- /* this ifdef is internal to ldns, because we do not want to export
- * the symbol. Users can define it if they want access,
- * the feature is not fully implemented at this time and openssl
- * does not support it fully either (also for ED448). */
- LDNS_ED25519 = 15, /* draft-ietf-curdle-dnskey-ed25519 */
-#endif
-#ifdef USE_ED448
- LDNS_ED448 = 16, /* draft-ietf-curdle-dnskey-ed448 */
-#endif
+ LDNS_ED25519 = 15, /* RFC 8080 */
+ LDNS_ED448 = 16, /* RFC 8080 */
LDNS_INDIRECT = 252,
LDNS_PRIVATEDNS = 253,
LDNS_PRIVATEOID = 254
{
LDNS_SIGN_RSAMD5 = LDNS_RSAMD5,
LDNS_SIGN_RSASHA1 = LDNS_RSASHA1,
-#ifdef USE_DSA
+#if LDNS_BUILD_CONFIG_USE_DSA
LDNS_SIGN_DSA = LDNS_DSA,
-#endif /* USE_DSA */
+#endif /* LDNS_BUILD_CONFIG_USE_DSA */
LDNS_SIGN_RSASHA1_NSEC3 = LDNS_RSASHA1_NSEC3,
LDNS_SIGN_RSASHA256 = LDNS_RSASHA256,
LDNS_SIGN_RSASHA512 = LDNS_RSASHA512,
-#ifdef USE_DSA
+#if LDNS_BUILD_CONFIG_USE_DSA
LDNS_SIGN_DSA_NSEC3 = LDNS_DSA_NSEC3,
-#endif /* USE_DSA */
+#endif /* LDNS_BUILD_CONFIG_USE_DSA */
LDNS_SIGN_ECC_GOST = LDNS_ECC_GOST,
LDNS_SIGN_ECDSAP256SHA256 = LDNS_ECDSAP256SHA256,
LDNS_SIGN_ECDSAP384SHA384 = LDNS_ECDSAP384SHA384,
-#ifdef USE_ED25519
LDNS_SIGN_ED25519 = LDNS_ED25519,
-#endif
-#ifdef USE_ED448
LDNS_SIGN_ED448 = LDNS_ED448,
-#endif
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 */
LDNS_SIGN_HMACSHA256 = 159, /* ditto */
* \return NULL on failure otherwise a RSA structure
*/
RSA *ldns_key_new_frm_fp_rsa(FILE *fp);
-#endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
-#if LDNS_BUILD_CONFIG_HAVE_SSL
/**
* frm_fp helper function. This function parses the
* remainder of the (RSA) priv. key file generated from bind9
* \return NULL on failure otherwise a RSA structure
*/
RSA *ldns_key_new_frm_fp_rsa_l(FILE *fp, int *line_nr);
-#endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
-#if LDNS_BUILD_CONFIG_HAVE_SSL
+
+# if LDNS_BUILD_CONFIG_USE_DSA
/**
* frm_fp helper function. This function parses the
* remainder of the (DSA) priv. key file
* \return NULL on failure otherwise a RSA structure
*/
DSA *ldns_key_new_frm_fp_dsa(FILE *fp);
-#endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
-#if LDNS_BUILD_CONFIG_HAVE_SSL
/**
* frm_fp helper function. This function parses the
* remainder of the (DSA) priv. key file
* \return NULL on failure otherwise a RSA structure
*/
DSA *ldns_key_new_frm_fp_dsa_l(FILE *fp, int *line_nr);
-#endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
+# endif /* LDNS_BUILD_CONFIG_USE_DSA */
-#if LDNS_BUILD_CONFIG_HAVE_SSL
/**
* frm_fp helper function. This function parses the
* remainder of the (HMAC-MD5) key file
* \return NULL on failure otherwise a newly allocated char buffer
*/
unsigned char *ldns_key_new_frm_fp_hmac(FILE *fp, size_t *hmac_size);
-#endif
-#if LDNS_BUILD_CONFIG_HAVE_SSL
/**
* frm_fp helper function. This function parses the
* remainder of the (HMAC-MD5) key file
* \param[in] l the algorithm
*/
void ldns_key_set_algorithm(ldns_key *k, ldns_signing_algorithm l);
+
#if LDNS_BUILD_CONFIG_HAVE_SSL
/**
* Set the key's evp key
*/
void ldns_key_set_rsa_key(ldns_key *k, RSA *r);
+# if LDNS_BUILD_CONFIG_USE_DSA
/**
* Set the key's dsa data
* The dsa data should be freed by the user.
* \param[in] d the dsa data
*/
void ldns_key_set_dsa_key(ldns_key *k, DSA *d);
+# endif /* LDNS_BUILD_CONFIG_USE_DSA */
/**
* Assign the key's rsa data
*/
void ldns_key_assign_rsa_key(ldns_key *k, RSA *r);
+# if LDNS_BUILD_CONFIG_USE_DSA
/**
* Assign the key's dsa data
* The dsa data will be freed automatically when the key is freed.
* \param[in] d the dsa data
*/
void ldns_key_assign_dsa_key(ldns_key *k, DSA *d);
+# endif /* LDNS_BUILD_CONFIG_USE_DSA */
/**
* Get the PKEY id for GOST, loads GOST into openssl as a side effect.
* \return the RSA * structure in the key
*/
EVP_PKEY *ldns_key_evp_key(const ldns_key *k);
-#endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
+# if LDNS_BUILD_CONFIG_USE_DSA
/**
* returns the (openssl) DSA struct contained in the key
*/
-#if LDNS_BUILD_CONFIG_HAVE_SSL
DSA *ldns_key_dsa_key(const ldns_key *k);
+# endif /* LDNS_BUILD_CONFIG_USE_DSA */
#endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
/**