#include <openssl/core_names.h>
#include "crypto/evp.h"
#include "internal/numbers.h"
-#include "internal/provider_algs.h"
-#include "internal/provider_ctx.h"
-#include "internal/providercommonerr.h"
-#include "internal/provider_algs.h"
+#include "prov/implementations.h"
+#include "prov/provider_ctx.h"
+#include "prov/providercommonerr.h"
+#include "prov/implementations.h"
#ifndef OPENSSL_NO_SCRYPT
{
KDF_SCRYPT *ctx = (KDF_SCRYPT *)vctx;
- EVP_MD_meth_free(ctx->sha256);
- kdf_scrypt_reset(ctx);
- OPENSSL_free(ctx);
+ if (ctx != NULL) {
+ EVP_MD_meth_free(ctx->sha256);
+ kdf_scrypt_reset(ctx);
+ OPENSSL_free(ctx);
+ }
}
static void kdf_scrypt_reset(void *vctx)