From: Pauli Date: Mon, 29 Aug 2022 04:52:44 +0000 (+1000) Subject: time: move OSSL_TIME to libcrypto X-Git-Tag: openssl-3.2.0-alpha1~2093 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02d0f87a8ba143eaeaee3334a2f63543b10148a9;p=thirdparty%2Fopenssl.git time: move OSSL_TIME to libcrypto Keep building it for libssl without exposing any symbols. Reviewed-by: Todd Short Reviewed-by: Richard Levitte Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/19082) --- diff --git a/crypto/build.info b/crypto/build.info index e384b94d57f..35e012d5d2c 100644 --- a/crypto/build.info +++ b/crypto/build.info @@ -99,7 +99,7 @@ $UTIL_COMMON=\ threads_pthread.c threads_win.c threads_none.c initthread.c \ context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ param_build_set.c der_writer.c threads_lib.c params_dup.c \ - quic_vlint.c + quic_vlint.c time.c SOURCE[../libssl]=sparse_array.c diff --git a/ssl/time.c b/crypto/time.c similarity index 95% rename from ssl/time.c rename to crypto/time.c index 628aaed7ecf..a90aa767881 100644 --- a/ssl/time.c +++ b/crypto/time.c @@ -31,7 +31,7 @@ OSSL_TIME ossl_time_now(void) now.ul -= 116444736000000000UI64; # endif r.t = ((uint64_t)now.ul) * (OSSL_TIME_SECOND / 10000000); -#else +#else /* defined(_WIN32) */ struct timeval t; if (gettimeofday(&t, NULL) < 0) { @@ -43,6 +43,6 @@ OSSL_TIME ossl_time_now(void) r.t = t.tv_usec <= 0 ? 0 : t.tv_usec * OSSL_TIME_US; else r.t = ((uint64_t)t.tv_sec * 1000000 + t.tv_usec) * OSSL_TIME_US; -#endif +#endif /* defined(_WIN32) */ return r; } diff --git a/ssl/build.info b/ssl/build.info index ea35779f07b..81631c7497b 100644 --- a/ssl/build.info +++ b/ssl/build.info @@ -7,7 +7,7 @@ IF[{- !$disabled{quic} -}] ENDIF SOURCE[../libssl]=\ - pqueue.c time.c \ + pqueue.c \ statem/statem_srvr.c statem/statem_clnt.c s3_lib.c s3_enc.c \ statem/statem_lib.c statem/extensions.c statem/extensions_srvr.c \ statem/extensions_clnt.c statem/extensions_cust.c s3_msg.c \ @@ -23,7 +23,8 @@ SOURCE[../libssl]=\ # For shared builds we need to include the libcrypto packet.c and quic_vlint.c # in libssl as well. -SHARED_SOURCE[../libssl]=../crypto/packet.c ../crypto/quic_vlint.c +SHARED_SOURCE[../libssl]=\ + ../crypto/packet.c ../crypto/quic_vlint.c ../crypto/time.c IF[{- !$disabled{'deprecated-3.0'} -}] SOURCE[../libssl]=ssl_rsa_legacy.c