Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2016-01-22 00:39:58 +0300
committerAdam Langley <alangley@gmail.com>2016-01-28 01:03:57 +0300
commit91b2501f02e9cfa1643f90b5dfd3ae397b75922b (patch)
tree16af3be8bf77ef3c01a33bba9d167eb490e6b583 /include/openssl/ssl.h
parentcdd0b7e775378cf30a9d30f734a01cf5350d3ff8 (diff)
Add functions for accessing read_sequence and write_sequence.
OpenSSL 1.1.0 doesn't seem to have these two, so this isn't based on anything. Have them return uint64_t in preparation for switching the internal representation to uint64_t so ssl_record_sequence_update can go away. Change-Id: I21d55e9a29861c992f409ed293e0930a7aaef7a3 Reviewed-on: https://boringssl-review.googlesource.com/6941 Reviewed-by: Adam Langley <alangley@gmail.com>
Diffstat (limited to 'include/openssl/ssl.h')
-rw-r--r--include/openssl/ssl.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index 8efbd4f9..e8fbceda 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -2574,7 +2574,7 @@ OPENSSL_EXPORT int SSL_CTX_get_ex_new_index(long argl, void *argp,
CRYPTO_EX_free *free_func);
-/* Obscure functions. */
+/* Low-level record-layer state. */
/* SSL_get_rc4_state sets |*read_key| and |*write_key| to the RC4 states for
* the read and write directions. It returns one on success or zero if |ssl|
@@ -2600,6 +2600,17 @@ OPENSSL_EXPORT size_t SSL_get_key_block_len(const SSL *ssl);
OPENSSL_EXPORT int SSL_generate_key_block(const SSL *ssl, uint8_t *out,
size_t out_len);
+/* SSL_get_read_sequence returns the expected sequence number of the next
+ * incoming record in the current epoch. It always returns zero in DTLS. */
+OPENSSL_EXPORT uint64_t SSL_get_read_sequence(const SSL *ssl);
+
+/* SSL_get_write_sequence returns the sequence number of the next outgoing
+ * record in the current epoch. */
+OPENSSL_EXPORT uint64_t SSL_get_write_sequence(const SSL *ssl);
+
+
+/* Obscure functions. */
+
/* SSL_get_structure_sizes returns the sizes of the SSL, SSL_CTX and
* SSL_SESSION structures so that a test can ensure that outside code agrees on
* these values. */