summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/param_build.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/param_build.c b/crypto/param_build.c
index d5597c19fa..73ec3d3534 100644
--- a/crypto/param_build.c
+++ b/crypto/param_build.c
@@ -223,6 +223,10 @@ int OSSL_PARAM_BLD_push_BN_pad(OSSL_PARAM_BLD *bld, const char *key,
}
if (BN_get_flags(bn, BN_FLG_SECURE) == BN_FLG_SECURE)
secure = 1;
+
+ /* The BIGNUM is zero, we must transfer at least one byte */
+ if (sz == 0)
+ sz++;
}
pd = param_push(bld, key, sz, sz, OSSL_PARAM_UNSIGNED_INTEGER, secure);
if (pd == NULL)