Conversation
tmshort
left a comment
There was a problem hiding this comment.
There are a few places where calculations with a constant are still performed, but there are macros/functions that could be used instead.
I would also suggest changing the SSL_METHOD get_timeout() function to return OSSL_TIME.
|
I added the extra helper functions late in the process (when I got sick of repeating the same bits of code). I missed a few, thanks for pointing these out. One thing I was struggling with was duration vs time. I considered adding an OSSL_DURATION to make this distinction typesafe. Existing uses of time_t and struct timeval are problematic because they do not distinguish between the two flavours. |
I completely agree that duration vs "calendar time" are different but related, and are bound by the same type constraints... kinda. A duration is nominally positive. "Calendar time" can be negative. But both represent a time offset. Edit: While a duration is positive, the difference between times could be negative (time a is before time b). So is this an |
|
Merged, thanks for the feedbacks. |
Some of the recently added functions were not documents. This has been addressed. Also added utility functions for conversions between time_t, seconds and struct timeval to/from OSSL_TIME. Reviewed-by: Todd Short <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from #19082)
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 <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from #19082)
Reviewed-by: Todd Short <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from #19082)
Keep building it for libssl without exposing any symbols. Reviewed-by: Todd Short <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from #19082)
Reviewed-by: Todd Short <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from #19082)
Reviewed-by: Todd Short <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from #19082)
Some of the recently added functions were not documents. This has been addressed. Also added utility functions for conversions between time_t, seconds and struct timeval to/from OSSL_TIME. Reviewed-by: Todd Short <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from openssl#19082)
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 <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from openssl#19082)
Reviewed-by: Todd Short <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from openssl#19082)
Keep building it for libssl without exposing any symbols. Reviewed-by: Todd Short <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from openssl#19082)
Reviewed-by: Todd Short <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from openssl#19082)
Reviewed-by: Todd Short <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from openssl#19082)
Some of the recently added functions were not documents. This has been addressed. Also added utility functions for conversions between time_t, seconds and struct timeval to/from OSSL_TIME. Reviewed-by: Todd Short <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from openssl#19082)
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 <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from openssl#19082)
Reviewed-by: Todd Short <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from openssl#19082)
Keep building it for libssl without exposing any symbols. Reviewed-by: Todd Short <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from openssl#19082)
Reviewed-by: Todd Short <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from openssl#19082)
Reviewed-by: Todd Short <[email protected]> Reviewed-by: Richard Levitte <[email protected]> Reviewed-by: Matt Caswell <[email protected]> (Merged from openssl#19082)
For historical reasons, the second argument of SSL_CTX_set_timeout is a signed integer, and Node.js has so far passed arbitrary (signed) int32_t values. However, new versions of OpenSSL have changed the handling of negative values inside SSL_CTX_set_timeout, and we should shield users of Node.js from both the old and the new behavior. Hence, reject any negative values by throwing an error from within createSecureContext. Refs: openssl/openssl#19082
For historical reasons, the second argument of SSL_CTX_set_timeout is a signed integer, and Node.js has so far passed arbitrary (signed) int32_t values. However, new versions of OpenSSL have changed the handling of negative values inside SSL_CTX_set_timeout, and we should shield users of Node.js from both the old and the new behavior. Hence, reject any negative values by throwing an error from within createSecureContext. Refs: openssl/openssl#19082 PR-URL: #53002 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tim Perry <[email protected]>
For historical reasons, the second argument of SSL_CTX_set_timeout is a signed integer, and Node.js has so far passed arbitrary (signed) int32_t values. However, new versions of OpenSSL have changed the handling of negative values inside SSL_CTX_set_timeout, and we should shield users of Node.js from both the old and the new behavior. Hence, reject any negative values by throwing an error from within createSecureContext. Refs: openssl/openssl#19082 PR-URL: #53002 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tim Perry <[email protected]>
For historical reasons, the second argument of SSL_CTX_set_timeout is a signed integer, and Node.js has so far passed arbitrary (signed) int32_t values. However, new versions of OpenSSL have changed the handling of negative values inside SSL_CTX_set_timeout, and we should shield users of Node.js from both the old and the new behavior. Hence, reject any negative values by throwing an error from within createSecureContext. Refs: openssl/openssl#19082 PR-URL: nodejs#53002 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tim Perry <[email protected]>
For historical reasons, the second argument of SSL_CTX_set_timeout is a signed integer, and Node.js has so far passed arbitrary (signed) int32_t values. However, new versions of OpenSSL have changed the handling of negative values inside SSL_CTX_set_timeout, and we should shield users of Node.js from both the old and the new behavior. Hence, reject any negative values by throwing an error from within createSecureContext. Refs: openssl/openssl#19082 PR-URL: nodejs#53002 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tim Perry <[email protected]>
For historical reasons, the second argument of SSL_CTX_set_timeout is a signed integer, and Node.js has so far passed arbitrary (signed) int32_t values. However, new versions of OpenSSL have changed the handling of negative values inside SSL_CTX_set_timeout, and we should shield users of Node.js from both the old and the new behavior. Hence, reject any negative values by throwing an error from within createSecureContext. Refs: openssl/openssl#19082 PR-URL: #53002 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tim Perry <[email protected]>
For historical reasons, the second argument of SSL_CTX_set_timeout is a signed integer, and Node.js has so far passed arbitrary (signed) int32_t values. However, new versions of OpenSSL have changed the handling of negative values inside SSL_CTX_set_timeout, and we should shield users of Node.js from both the old and the new behavior. Hence, reject any negative values by throwing an error from within createSecureContext. Refs: openssl/openssl#19082 PR-URL: #53002 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tim Perry <[email protected]>
This unifies out time handle and will help avoid 2038 problems.
Because we have some public APIs that accept time_t and struct timeval, it's impossible to completely convert.
Checklist