diff options
author | Emilia Kasper <emilia@openssl.org> | 2015-09-17 18:11:46 +0200 |
---|---|---|
committer | Emilia Kasper <emilia@openssl.org> | 2015-09-17 18:47:33 +0200 |
commit | 4bd16463b84efb13ce5fb35add284e284b0fd819 (patch) | |
tree | cfc82d3809a94065c8e00a70697a75f8be762580 /ssl/t1_lib.c | |
parent | 6e63c142f269c738e3820203ecec6fe74ad4efa0 (diff) |
Remove PACKET_(get|goto)_bookmark
The bookmark API results in a lot of boilerplate error checking that can
be much more easily achieved with a simple struct copy. It also lays the
path for removing the third PACKET field.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl/t1_lib.c')
-rw-r--r-- | ssl/t1_lib.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 95b4fb694d..463f34e687 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -2934,7 +2934,7 @@ int tls1_process_ticket(SSL *s, PACKET *pkt, unsigned char *session_id, int len, SSL_SESSION **ret) { unsigned int i; - size_t bookmark = 0; + PACKET bookmark = *pkt; int retv = -1; *ret = NULL; @@ -2949,10 +2949,6 @@ int tls1_process_ticket(SSL *s, PACKET *pkt, unsigned char *session_id, if ((s->version <= SSL3_VERSION)) return 0; - if (!PACKET_get_bookmark(pkt, &bookmark)) { - return -1; - } - /* Skip past DTLS cookie */ if (SSL_IS_DTLS(s)) { if (!PACKET_get_1(pkt, &i) @@ -3043,8 +3039,7 @@ int tls1_process_ticket(SSL *s, PACKET *pkt, unsigned char *session_id, } retv = 0; end: - if (!PACKET_goto_bookmark(pkt, bookmark)) - return -1; + *pkt = bookmark; return retv; } |