summaryrefslogtreecommitdiffstats
path: root/crypto/param_build_set.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/param_build_set.c')
-rw-r--r--crypto/param_build_set.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/param_build_set.c b/crypto/param_build_set.c
index b74b0d59ee..1ea8097e88 100644
--- a/crypto/param_build_set.c
+++ b/crypto/param_build_set.c
@@ -30,6 +30,17 @@ int ossl_param_build_set_int(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
return 1;
}
+int ossl_param_build_set_long(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
+ const char *key, long num)
+{
+ if (bld != NULL)
+ return OSSL_PARAM_BLD_push_long(bld, key, num);
+ p = OSSL_PARAM_locate(p, key);
+ if (p != NULL)
+ return OSSL_PARAM_set_long(p, num);
+ return 1;
+}
+
int ossl_param_build_set_utf8_string(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
const char *key, const char *buf)
{