diff options
author | Pauli <pauli@openssl.org> | 2022-08-29 14:17:25 +1000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2022-09-13 21:13:22 +1000 |
commit | f0131dc04a39afcb1629f5bec2814ef3a4925bbf (patch) | |
tree | ef87562f06970c15ee98084df86beaec0f49c729 /ssl/ssl_asn1.c | |
parent | 364c3b7b1ac3172dbe2108be23ae215b86ef8e08 (diff) |
ssl: modify libssl so that it uses OSSL_TIME
This is instead of time_t and struct timeval. Some public APIs mandate a
presence of these two types, but they are converted to OSSL_TIME internally.
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19082)
Diffstat (limited to 'ssl/ssl_asn1.c')
-rw-r--r-- | ssl/ssl_asn1.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ssl/ssl_asn1.c b/ssl/ssl_asn1.c index 3503fdc210..9336fb2cc9 100644 --- a/ssl/ssl_asn1.c +++ b/ssl/ssl_asn1.c @@ -163,8 +163,8 @@ int i2d_SSL_SESSION(const SSL_SESSION *in, unsigned char **pp) ssl_session_oinit(&as.session_id_context, &sid_ctx, in->sid_ctx, in->sid_ctx_length); - as.time = (int64_t)in->time; - as.timeout = (int64_t)in->timeout; + as.time = (int64_t)ossl_time_to_time_t(in->time); + as.timeout = (int64_t)ossl_time2seconds(in->timeout); as.verify_result = in->verify_result; as.peer = in->peer; @@ -302,14 +302,14 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, ret->master_key_length = tmpl; if (as->time != 0) - ret->time = (time_t)as->time; + ret->time = ossl_time_from_time_t(as->time); else - ret->time = time(NULL); + ret->time = ossl_time_now(); if (as->timeout != 0) - ret->timeout = (time_t)as->timeout; + ret->timeout = ossl_seconds2time(as->timeout); else - ret->timeout = 3; + ret->timeout = ossl_seconds2time(3); ssl_session_calculate_timeout(ret); X509_free(ret->peer); |