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-07 21:10:41 +0300
committerAdam Langley <alangley@gmail.com>2016-01-28 01:02:53 +0300
commitcdd0b7e775378cf30a9d30f734a01cf5350d3ff8 (patch)
tree976399cdb4cbf9167ed04f640c34ccfa6aa7146d /include/openssl/ssl.h
parent4b9205b5834c2318a966654c6c0cb14f9102e240 (diff)
Add SSL_CTX_set_retain_only_sha256_of_client_certs.
We have the hook on the SSL_CTX, but it should be possible to set it without reaching into SSL_CTX. Change-Id: I93db070c7c944be374543442a8de3ce655a28928 Reviewed-on: https://boringssl-review.googlesource.com/6880 Reviewed-by: Adam Langley <alangley@gmail.com>
Diffstat (limited to 'include/openssl/ssl.h')
-rw-r--r--include/openssl/ssl.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index 1723ba90..8efbd4f9 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -2886,6 +2886,14 @@ OPENSSL_EXPORT size_t SSL_get_server_random(const SSL *ssl, uint8_t *out,
* NULL if one has not been negotiated yet or there is no pending handshake. */
OPENSSL_EXPORT const SSL_CIPHER *SSL_get_pending_cipher(const SSL *ssl);
+/* SSL_CTX_retain_only_sha256_of_client_certs, on a server, sets whether only
+ * the SHA-256 hash of peer's certificate should be saved in memory and in the
+ * session. This can save memory, ticket size and session cache space. If
+ * enabled, |SSL_get_peer_certificate| will return NULL after the handshake
+ * completes. See the |peer_sha256| field of |SSL_SESSION| for the hash. */
+OPENSSL_EXPORT void SSL_CTX_set_retain_only_sha256_of_client_certs(SSL_CTX *ctx,
+ int enable);
+
/* Deprecated functions. */
@@ -3655,7 +3663,7 @@ struct ssl_ctx_st {
/* retain_only_sha256_of_client_certs is true if we should compute the SHA256
- * hash of the peer's certifiate and then discard it to save memory and
+ * hash of the peer's certificate and then discard it to save memory and
* session space. Only effective on the server side. */
char retain_only_sha256_of_client_certs;