summaryrefslogtreecommitdiffstats
path: root/crypto/param_build.c
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-05-11 09:37:45 +1000
committerPauli <paul.dale@oracle.com>2020-06-24 20:05:41 +1000
commit5fdaa38febb7463dbd44f849b2930edcbd5f6bae (patch)
tree3763d73fb1ec5ae8d08de03e9107973e94ff8b5a /crypto/param_build.c
parentf3a2570794b45f7f6391cb7f447b27c1ee758441 (diff)
params: add OSSL_PARAM helpers for time_t.
POSIX mandates that time_t is a signed integer but it doesn't specify the lenght. Having wrappers lets uses ignore this. Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/11682)
Diffstat (limited to 'crypto/param_build.c')
-rw-r--r--crypto/param_build.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/param_build.c b/crypto/param_build.c
index 76522cd377..de829d354f 100644
--- a/crypto/param_build.c
+++ b/crypto/param_build.c
@@ -190,6 +190,13 @@ int OSSL_PARAM_BLD_push_size_t(OSSL_PARAM_BLD *bld, const char *key,
OSSL_PARAM_UNSIGNED_INTEGER);
}
+int OSSL_PARAM_BLD_push_time_t(OSSL_PARAM_BLD *bld, const char *key,
+ time_t num)
+{
+ return param_push_num(bld, key, &num, sizeof(num),
+ OSSL_PARAM_INTEGER);
+}
+
int OSSL_PARAM_BLD_push_double(OSSL_PARAM_BLD *bld, const char *key,
double num)
{