summaryrefslogtreecommitdiffstats
path: root/crypto/evp/pmeth_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/evp/pmeth_lib.c')
-rw-r--r--crypto/evp/pmeth_lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c
index 2548687cef..22b4ca5231 100644
--- a/crypto/evp/pmeth_lib.c
+++ b/crypto/evp/pmeth_lib.c
@@ -1045,6 +1045,8 @@ static int evp_pkey_ctx_add1_octet_string(EVP_PKEY_CTX *ctx, int fallback,
if (datalen < 0) {
ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_LENGTH);
return 0;
+ } else if (datalen == 0) {
+ return 1;
}
/* Get the original value length */