From b735b1b6e48a3f8ce50c44c7255390b892d118f1 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Wed, 7 Oct 2015 09:36:23 -0400 Subject: [PATCH] Document that SSL_CTX_sess_set_get_cb's id parameter should be const. See also upstream's bf0fc41266f17311c5db1e0541d3dd12eb27deb6. Change-Id: Ib692b0ad608f2e3291f2aeab2ad98a7e177d5851 Reviewed-on: https://boringssl-review.googlesource.com/6150 Reviewed-by: Adam Langley --- include/openssl/ssl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index 6a4676d7..c8e8872f 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -1576,7 +1576,10 @@ OPENSSL_EXPORT void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx))( * |SSL_ERROR_PENDING_SESSION|. * * If the internal session cache is enabled, the callback is only consulted if - * the internal cache does not return a match. */ + * the internal cache does not return a match. + * + * The callback's |id| parameter is not const for historical reasons, but the + * contents may not be modified. */ OPENSSL_EXPORT void SSL_CTX_sess_set_get_cb( SSL_CTX *ctx, SSL_SESSION *(*get_session_cb)(SSL *ssl, uint8_t *id, int id_len,