diff options
author | Rich Salz <rsalz@openssl.org> | 2016-12-08 14:18:40 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-01-09 22:26:47 -0500 |
commit | aff8c126fd8db84fa4ef623997a8c4200a14a44f (patch) | |
tree | 88739b836a2ed7f812fcb919cf3bfdae4d4f7b92 /ssl/ssl_asn1.c | |
parent | 18e3ab7bc4fd5711014d60ddf40cda25988e4e18 (diff) |
Move extension data into sub-structs
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2052)
Diffstat (limited to 'ssl/ssl_asn1.c')
-rw-r--r-- | ssl/ssl_asn1.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ssl/ssl_asn1.c b/ssl/ssl_asn1.c index fd13f90c28..401aeb5eaf 100644 --- a/ssl/ssl_asn1.c +++ b/ssl/ssl_asn1.c @@ -183,13 +183,13 @@ int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp) as.peer = in->peer; ssl_session_sinit(&as.tlsext_hostname, &tlsext_hostname, - in->tlsext_hostname); - if (in->tlsext_tick) { + in->ext.hostname); + if (in->ext.tick) { ssl_session_oinit(&as.tlsext_tick, &tlsext_tick, - in->tlsext_tick, in->tlsext_ticklen); + in->ext.tick, in->ext.ticklen); } - if (in->tlsext_tick_lifetime_hint > 0) - as.tlsext_tick_lifetime_hint = in->tlsext_tick_lifetime_hint; + if (in->ext.tick_lifetime_hint > 0) + as.tlsext_tick_lifetime_hint = in->ext.tick_lifetime_hint; #ifndef OPENSSL_NO_PSK ssl_session_sinit(&as.psk_identity_hint, &psk_identity_hint, in->psk_identity_hint); @@ -315,7 +315,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, /* NB: this defaults to zero which is X509_V_OK */ ret->verify_result = as->verify_result; - if (!ssl_session_strndup(&ret->tlsext_hostname, as->tlsext_hostname)) + if (!ssl_session_strndup(&ret->ext.hostname, as->tlsext_hostname)) goto err; #ifndef OPENSSL_NO_PSK @@ -325,13 +325,13 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, goto err; #endif - ret->tlsext_tick_lifetime_hint = as->tlsext_tick_lifetime_hint; + ret->ext.tick_lifetime_hint = as->tlsext_tick_lifetime_hint; if (as->tlsext_tick) { - ret->tlsext_tick = as->tlsext_tick->data; - ret->tlsext_ticklen = as->tlsext_tick->length; + ret->ext.tick = as->tlsext_tick->data; + ret->ext.ticklen = as->tlsext_tick->length; as->tlsext_tick->data = NULL; } else { - ret->tlsext_tick = NULL; + ret->ext.tick = NULL; } #ifndef OPENSSL_NO_COMP if (as->comp_id) { |