diff options
author | Pauli <paul.dale@oracle.com> | 2020-05-11 01:37:45 +0200 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-06-24 12:05:41 +0200 |
commit | 5fdaa38febb7463dbd44f849b2930edcbd5f6bae (patch) | |
tree | 3763d73fb1ec5ae8d08de03e9107973e94ff8b5a /crypto/param_build.c | |
parent | test: add a test RNG. (diff) | |
download | openssl-5fdaa38febb7463dbd44f849b2930edcbd5f6bae.tar.xz openssl-5fdaa38febb7463dbd44f849b2930edcbd5f6bae.zip |
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.c | 7 |
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) { |