NULL
#endif
);
-
-#endif
+#else
+ goto error;
+#endif /* GOST */
break;
-#ifdef USE_ECDSA
case LDNS_SIGN_ECDSAP256SHA256:
case LDNS_SIGN_ECDSAP384SHA384:
+#ifdef USE_ECDSA
ldns_buffer_printf(output, "Private-key-format: v1.2\n");
ldns_buffer_printf(output, "Algorithm: %d (", ldns_key_algorithm(k));
status=ldns_algorithm2buffer_str(output, (ldns_algorithm)ldns_key_algorithm(k));
EC_KEY_free(ec);
}
#endif /* splint */
+#else
+ goto error;
+#endif /* ECDSA */
break;
-#endif
case LDNS_SIGN_HMACMD5:
/* there's not much of a format defined for TSIG */
/* It's just a binary blob, Same for all algorithms */
return NULL;
}
#endif /* splint */
+#else
+ ldns_key_free(k);
+ return NULL;
#endif /* HAVE_SSL and USE_GOST */
break;
-#ifdef USE_ECDSA
case LDNS_SIGN_ECDSAP256SHA256:
case LDNS_SIGN_ECDSAP384SHA384:
+#ifdef USE_ECDSA
if(alg == LDNS_SIGN_ECDSAP256SHA256)
ec = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
else if(alg == LDNS_SIGN_ECDSAP384SHA384)
return NULL;
}
#endif /* splint */
+#else
+ ldns_key_free(k);
+ return NULL;
+#endif /* ECDSA */
break;
-#endif
}
ldns_key_set_algorithm(k, alg);
return k;
}
#endif /* splint */
internal_data = 1;
+#else
+ ldns_rr_free(pubkey);
+ return NULL;
#endif /* HAVE_SSL and USE_GOST */
break;
-#ifdef USE_ECDSA
case LDNS_SIGN_ECDSAP256SHA256:
case LDNS_SIGN_ECDSAP384SHA384:
+#ifdef USE_ECDSA
ldns_rr_push_rdf(pubkey, ldns_native2rdf_int8(
LDNS_RDF_TYPE_ALG, ldns_key_algorithm(k)));
bin = NULL;
* to the pkey */
EC_KEY_free(ec);
internal_data = 1;
+#else
+ ldns_rr_free(pubkey);
+ return NULL;
+#endif /* ECDSA */
break;
-#endif
case LDNS_SIGN_HMACMD5:
case LDNS_SIGN_HMACSHA1:
case LDNS_SIGN_HMACSHA256: