Convert SSL_SESSION* functions to use const getters
authorMatt Caswell <matt@openssl.org>
Sat, 13 Aug 2016 13:29:41 +0000 (14:29 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 16 Aug 2016 22:36:28 +0000 (23:36 +0100)
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Stephen Henson <steve@openssl.org>
doc/ssl/SSL_SESSION_has_ticket.pod
include/openssl/ssl.h
ssl/ssl_sess.c
test/handshake_helper.c

index 2982c19a7719585fa4fda425a6c956bcaf3ad42f..9e37255299ce0665c118af01b470899a9072f192 100644 (file)
@@ -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
index 288b018ed6dda84adc22d2f63bc001f348062a5c..0f2892032af95b19ff9c30ce3effd91709b9159d 100644 (file)
@@ -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);
index 4a58fa52df63024805f9aad7ee31e6be04a25a3f..1a2872c6e04085ecdb2f1e5a618627f37e7da2d0 100644 (file)
@@ -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;
index 07615adf6593a8501209c8700b9e5405d7d14337..c4b14e7c31e2bb3a0ff814fafdcbb6948fb525bf 100644 (file)
@@ -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;