* The array of hex_data is used to get around compilers that dont like
* strings longer than 509 bytes,
*/
+#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_DSA)
static int hextobn(const char *hex_data[], BIGNUM **bn)
{
int ret = 0;
OPENSSL_free(str);
return ret;
}
+#endif /* !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_DSA) */
+#ifndef OPENSSL_NO_DH
static int hextobin(const char *hex_data[], unsigned char **out, size_t *len)
{
int ret = 0, sz;
BN_free(bn);
return ret;
}
+#endif
#ifndef OPENSSL_NO_DSA
static int dsa_key_signature_test(OPENSSL_CTX *libctx)
goto err;
/* Create a EVP_PKEY_CTX to use for the signing operation */
- sctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey);
+ sctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, NULL);
if (sctx == NULL
|| EVP_PKEY_sign_init(sctx) <= 0)
goto err;
/* set signature parameters */
ossl_param_bld_init(&bld);
if (!ossl_param_bld_push_utf8_string(&bld, OSSL_SIGNATURE_PARAM_DIGEST,
- SN_sha256,strlen(SN_sha256) + 1)
- || !ossl_param_bld_push_size_t(&bld, OSSL_SIGNATURE_PARAM_DIGEST_SIZE,
- SHA256_DIGEST_LENGTH))
+ SN_sha256,strlen(SN_sha256) + 1))
goto err;
params_sig = ossl_param_bld_to_param(&bld);
if (EVP_PKEY_CTX_set_params(sctx, params_sig) <= 0)
goto err;
/* Create a EVP_PKEY_CTX to perform key derivation */
- dctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey);
+ dctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, NULL);
if (dctx == NULL)
goto err;