summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
Diffstat (limited to 'providers')
-rw-r--r--providers/implementations/kdfs/krb5kdf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/providers/implementations/kdfs/krb5kdf.c b/providers/implementations/kdfs/krb5kdf.c
index b6cf0e3a2b..19dcd83835 100644
--- a/providers/implementations/kdfs/krb5kdf.c
+++ b/providers/implementations/kdfs/krb5kdf.c
@@ -416,6 +416,12 @@ static int KRB5KDF(const EVP_CIPHER *cipher, ENGINE *engine,
/* Initialize input block */
blocksize = EVP_CIPHER_CTX_get_block_size(ctx);
+ if (blocksize == 0) {
+ ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_CIPHER);
+ ret = 0;
+ goto out;
+ }
+
if (constant_len > blocksize) {
ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_CONSTANT_LENGTH);
ret = 0;