boringssl/ssl
David Benjamin ad8f5e1de9 Don't use long for timestamps.
This is the first part to fixing the SSL stack to be 2038-clean.
Internal structures and functions are switched to use OPENSSL_timeval
which, unlike timeval and long, are suitable for timestamps on all
platforms.

It is generally accepted that the year is now sometime after 1970, so
use uint64_t for the timestamps to avoid worrying about serializing
negative numbers in SSL_SESSION.

A follow-up change will fix SSL_CTX_set_current_time_cb to use
OPENSSL_timeval. This will require some coordinating with WebRTC.
DTLSv1_get_timeout is left alone for compatibility and because it stores
time remaining rather than an absolute time.

BUG=155

Change-Id: I1a5054813300874b6f29e348f9cd8ca80f6b9729
Reviewed-on: https://boringssl-review.googlesource.com/13944
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2017-03-01 21:58:38 +00:00
..
test Remove support for blocking DTLS timeout handling. 2017-03-01 19:59:28 +00:00
bio_ssl.c Move the SSL BIO into ssl/ from decrepit/. 2017-02-03 21:08:10 +00:00
CMakeLists.txt Moving transcript and PRF functions to SSL_TRANSCRIPT. 2017-02-10 16:33:42 +00:00
custom_extensions.c Pass explicit hs parameters into custom_extensions.c. 2016-12-06 19:49:36 +00:00
d1_both.c Moving transcript and PRF functions to SSL_TRANSCRIPT. 2017-02-10 16:33:42 +00:00
d1_lib.c Don't use long for timestamps. 2017-03-01 21:58:38 +00:00
d1_pkt.c Remove support for blocking DTLS timeout handling. 2017-03-01 19:59:28 +00:00
d1_srtp.c Fix ssl_ctx_make_profiles error handling. 2016-09-27 13:27:06 +00:00
dtls_method.c Add |X509_METHOD| and, using it, move many functions to ssl_x509.c. 2017-02-09 18:30:35 +00:00
dtls_record.c Don't use the buffer BIO in DTLS. 2017-01-25 23:35:32 +00:00
handshake_client.c Hang ssl_auto_chain_if_needed off |X509_METHOD|. 2017-02-28 23:07:02 +00:00
handshake_server.c Don't use long for timestamps. 2017-03-01 21:58:38 +00:00
internal.h Don't use long for timestamps. 2017-03-01 21:58:38 +00:00
s3_both.c Hold CA names as |CRYPTO_BUFFER|s. 2017-02-28 22:24:31 +00:00
s3_lib.c Move new_cipher and new_session to SSL_HANDSHAKE. 2017-02-17 20:48:31 +00:00
s3_pkt.c Establish that the default value of an out-arg for alerts is SSL_AD_DECODE_ERROR. 2017-02-09 18:07:30 +00:00
ssl_aead_ctx.c Allow dtls_seal_record to work in-place. 2017-01-25 16:27:32 +00:00
ssl_asn1.c Don't use long for timestamps. 2017-03-01 21:58:38 +00:00
ssl_buffer.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
ssl_cert.c Move X509-related verification code into ssl_x509.c. 2017-02-28 22:57:34 +00:00
ssl_cipher.c Remove SSL_CIPHER_has_MD5_HMAC. 2017-02-22 22:20:56 +00:00
ssl_ecdh.c Remove New Hope key agreement. 2016-12-10 01:06:31 +00:00
ssl_file.c Remove |X509| things from SSL_SESSION. 2017-02-10 19:12:04 +00:00
ssl_lib.c Don't use long for timestamps. 2017-03-01 21:58:38 +00:00
ssl_privkey_cc.cc Rename ssl_rsa.c to ssl_privkey.c. 2017-02-09 18:45:11 +00:00
ssl_privkey.c Support P-224 certificates as a server. 2017-02-27 21:27:39 +00:00
ssl_session.c Don't use long for timestamps. 2017-03-01 21:58:38 +00:00
ssl_stat.c Unexport the handshake's internal state. 2017-02-13 19:44:30 +00:00
ssl_test.cc Hold CA names as |CRYPTO_BUFFER|s. 2017-02-28 22:24:31 +00:00
ssl_transcript.c Moving transcript and PRF functions to SSL_TRANSCRIPT. 2017-02-10 16:33:42 +00:00
ssl_x509.c Name ssl_x509.c functions consistently. 2017-02-28 23:33:05 +00:00
t1_enc.c Move tmp.extended_master_secret to SSL_HANDSHAKE. 2017-02-17 21:36:37 +00:00
t1_lib.c Don't use long for timestamps. 2017-03-01 21:58:38 +00:00
tls13_both.c Move X509-related verification code into ssl_x509.c. 2017-02-28 22:57:34 +00:00
tls13_client.c Don't use long for timestamps. 2017-03-01 21:58:38 +00:00
tls13_enc.c Move new_cipher and new_session to SSL_HANDSHAKE. 2017-02-17 20:48:31 +00:00
tls13_server.c Move new_cipher and new_session to SSL_HANDSHAKE. 2017-02-17 20:48:31 +00:00
tls_method.c Add |TLS_with_buffers_method|. 2017-03-01 00:24:40 +00:00
tls_record.c Don't use the buffer BIO in DTLS. 2017-01-25 23:35:32 +00:00