#include "internal/cryptlib.h"
#include "internal/numbers.h"
#include "crypto/evp.h"
-#include "internal/provider_ctx.h"
-#include "internal/providercommonerr.h"
-#include "internal/provider_algs.h"
-#include "internal/provider_util.h"
+#include "prov/provider_ctx.h"
+#include "prov/providercommonerr.h"
+#include "prov/implementations.h"
+#include "prov/provider_util.h"
#include "pbkdf2.h"
/* Constants specified in SP800-132 */
{
KDF_PBKDF2 *ctx = (KDF_PBKDF2 *)vctx;
- kdf_pbkdf2_cleanup(ctx);
- OPENSSL_free(ctx);
+ if (ctx != NULL) {
+ kdf_pbkdf2_cleanup(ctx);
+ OPENSSL_free(ctx);
+ }
}
static void kdf_pbkdf2_reset(void *vctx)