if ((ret = dsa_paramgen_check(ctx)) <= 0)
return ret;
-#if !defined(FIPS_MODULE)
- /* TODO(3.0): Remove this eventually when no more legacy */
- if (ctx->op.keymgmt.genctx == NULL)
- return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN,
- EVP_PKEY_CTRL_DSA_PARAMGEN_BITS, nbits, NULL);
-#endif
-
*p++ = OSSL_PARAM_construct_size_t(OSSL_PKEY_PARAM_FFC_PBITS, &bits);
*p++ = OSSL_PARAM_construct_end();
if ((ret = dsa_paramgen_check(ctx)) <= 0)
return ret;
-#if !defined(FIPS_MODULE)
- /* TODO(3.0): Remove this eventually when no more legacy */
- if (ctx->op.keymgmt.genctx == NULL)
- return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN,
- EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS, qbits, NULL);
-#endif
-
*p++ = OSSL_PARAM_construct_size_t(OSSL_PKEY_PARAM_FFC_QBITS, &bits2);
*p++ = OSSL_PARAM_construct_end();
if ((ret = dsa_paramgen_check(ctx)) <= 0)
return ret;
-#if !defined(FIPS_MODULE)
- /* TODO(3.0): Remove this eventually when no more legacy */
- if (ctx->op.keymgmt.genctx == NULL) {
- const EVP_MD *md = EVP_get_digestbyname(md_name);
-
- EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN,
- EVP_PKEY_CTRL_DSA_PARAMGEN_MD, 0, (void *)(md));
- }
-#endif
-
*p++ = OSSL_PARAM_construct_utf8_string(OSSL_PKEY_PARAM_FFC_DIGEST,
(char *)md_name, 0);
if (md_properties != NULL)
}
#if !defined(FIPS_MODULE)
+/* TODO(3.0): deprecate as this is needed only for legacy? */
int EVP_PKEY_CTX_set_dsa_paramgen_md(EVP_PKEY_CTX *ctx, const EVP_MD *md)
{
- const char *md_name = (md == NULL) ? "" : EVP_MD_name(md);
-
- return EVP_PKEY_CTX_set_dsa_paramgen_md_props(ctx, md_name, NULL);
+ return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN,
+ EVP_PKEY_CTRL_DSA_PARAMGEN_MD, 0, (void *)(md));
}
#endif
#include "internal/deprecated.h"
-#include <string.h>
-
#include <openssl/core_names.h>
#include <openssl/err.h>
#include <openssl/ec.h>
if (ret != 1)
return ret;
- /* TODO(3.0): Remove this eventually when no more legacy */
- if (ctx->op.kex.exchprovctx == NULL)
- return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC,
- EVP_PKEY_OP_DERIVE,
- EVP_PKEY_CTRL_GET_EC_KDF_UKM, 0,
- (void *)(pukm));
-
*p++ = OSSL_PARAM_construct_octet_ptr(OSSL_EXCHANGE_PARAM_KDF_UKM,
(void **)pukm, 0);
*p++ = OSSL_PARAM_construct_end();
*/
#include "internal/deprecated.h"
-#include <stdio.h>
#include <openssl/crypto.h>
#include <openssl/core_names.h>
#include <openssl/engine.h>
#include <openssl/evp.h>
+#include <openssl/param_build.h>
#include "internal/cryptlib.h"
#include "internal/refcount.h"
-#include "openssl/param_build.h"
#include "crypto/bn.h"
#include "crypto/evp.h"
#include "crypto/rsa.h"
if (!EVP_PKEY_CTX_is_a(ctx, "RSA"))
return -1;
- /* TODO(3.0) Shouldn't a set0 translate into setting an OCTET_PTR? */
-
/* Cast away the const. This is read only so should be safe */
*p++ = OSSL_PARAM_construct_octet_string(OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL,
(void *)label, (size_t)llen);
if (!evp_pkey_ctx_set_params_strict(ctx, rsa_params))
return 0;
- /* TODO(3.0) ????? */
+ /* Ownership is supposed to be transfered to the callee. */
OPENSSL_free(label);
return 1;
}