#include "internal/provider.h"
#include "evp_local.h"
+#ifndef FIPS_MODE
+
static int update(EVP_MD_CTX *ctx, const void *data, size_t datalen)
{
EVPerr(EVP_F_UPDATE, EVP_R_ONLY_ONESHOT_SUPPORTED);
void *provkey = NULL;
int ret;
+ if (ctx->provctx != NULL) {
+ if (!ossl_assert(ctx->digest != NULL)) {
+ ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
+ return 0;
+ }
+ if (ctx->digest->freectx != NULL)
+ ctx->digest->freectx(ctx->provctx);
+ ctx->provctx = NULL;
+ }
+
if (ctx->pctx == NULL) {
ctx->pctx = EVP_PKEY_CTX_new(pkey, e);
if (ctx->pctx == NULL)
* algorithms are moved to providers.
*/
switch (locpctx->pkey->type) {
+ case NID_dsa:
+ break;
default:
goto legacy;
}
ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
goto err;
}
- provkey = evp_keymgmt_export_to_provider(locpctx->pkey, signature->keymgmt);
+ provkey =
+ evp_keymgmt_export_to_provider(locpctx->pkey, signature->keymgmt, 0);
if (provkey == NULL) {
ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
goto err;
{
return do_sigver_init(ctx, pctx, type, NULL, NULL, e, pkey, NULL, 1);
}
+#endif /* FIPS_MDOE */
int EVP_DigestSignUpdate(EVP_MD_CTX *ctx, const void *data, size_t dsize)
{
return EVP_DigestUpdate(ctx, data, dsize);
}
-
+#ifndef FIPS_MODE
int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,
size_t *siglen)
{
return -1;
return EVP_DigestVerifyFinal(ctx, sigret, siglen);
}
+#endif /* FIPS_MODE */