From 48593cb12afc9a8b9de8b3e25ee1097c4f6fe90d Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Sat, 13 Aug 2016 14:29:41 +0100 Subject: [PATCH] Convert SSL_SESSION* functions to use const getters Reviewed-by: Viktor Dukhovni Reviewed-by: Stephen Henson --- doc/ssl/SSL_SESSION_has_ticket.pod | 2 +- include/openssl/ssl.h | 2 +- ssl/ssl_sess.c | 2 +- test/handshake_helper.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/ssl/SSL_SESSION_has_ticket.pod b/doc/ssl/SSL_SESSION_has_ticket.pod index 2982c19a77..9e37255299 100644 --- a/doc/ssl/SSL_SESSION_has_ticket.pod +++ b/doc/ssl/SSL_SESSION_has_ticket.pod @@ -12,7 +12,7 @@ SSL_SESSION_has_ticket, SSL_SESSION_get_ticket_lifetime_hint, int SSL_SESSION_has_ticket(const SSL_SESSION *s); unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s); - void SSL_SESSION_get0_ticket(const SSL_SESSION *s, unsigned char **tick, + void SSL_SESSION_get0_ticket(const SSL_SESSION *s, const unsigned char **tick, size_t *len); =head1 DESCRIPTION diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index 288b018ed6..0f2892032a 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -1400,7 +1400,7 @@ __owur const char *SSL_SESSION_get0_hostname(const SSL_SESSION *s); __owur const SSL_CIPHER *SSL_SESSION_get0_cipher(const SSL_SESSION *s); __owur int SSL_SESSION_has_ticket(const SSL_SESSION *s); __owur unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s); -void SSL_SESSION_get0_ticket(const SSL_SESSION *s, unsigned char **tick, +void SSL_SESSION_get0_ticket(const SSL_SESSION *s, const unsigned char **tick, size_t *len); __owur int SSL_copy_session_id(SSL *to, const SSL *from); __owur X509 *SSL_SESSION_get0_peer(SSL_SESSION *s); diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index 4a58fa52df..1a2872c6e0 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -847,7 +847,7 @@ unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s) return s->tlsext_tick_lifetime_hint; } -void SSL_SESSION_get0_ticket(const SSL_SESSION *s, unsigned char **tick, +void SSL_SESSION_get0_ticket(const SSL_SESSION *s, const unsigned char **tick, size_t *len) { *len = s->tlsext_ticklen; diff --git a/test/handshake_helper.c b/test/handshake_helper.c index 07615adf65..c4b14e7c31 100644 --- a/test/handshake_helper.c +++ b/test/handshake_helper.c @@ -699,7 +699,7 @@ static HANDSHAKE_RESULT *do_handshake_internal( int client_turn = 1; connect_phase_t phase = HANDSHAKE; handshake_status_t status = HANDSHAKE_RETRY; - unsigned char* tick = NULL; + const unsigned char* tick = NULL; size_t tick_len = 0; SSL_SESSION* sess = NULL; const unsigned char *proto = NULL; -- 2.25.1