diff options
author | Romain Francoise <rfrancoise@debian.org> | 2014-04-15 19:35:31 +0200 |
---|---|---|
committer | Romain Francoise <rfrancoise@debian.org> | 2014-04-15 19:35:31 +0200 |
commit | df40590dead5696facf9943f46e222a5e831286d (patch) | |
tree | d701325b24c0e1c5676fa9cb8ed959254dd4367a /src/libtls/tls_peer.c | |
parent | 91b54afb0421705a4fb9d990d813007cd45bc2ce (diff) | |
parent | c5ebfc7b9c16551fe825dc1d79c3f7e2f096f6c9 (diff) | |
download | vyos-strongswan-df40590dead5696facf9943f46e222a5e831286d.tar.gz vyos-strongswan-df40590dead5696facf9943f46e222a5e831286d.zip |
Merge tag 'upstream/5.1.3'
Upstream version 5.1.3
* tag 'upstream/5.1.3':
Import upstream version 5.1.3
Diffstat (limited to 'src/libtls/tls_peer.c')
-rw-r--r-- | src/libtls/tls_peer.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libtls/tls_peer.c b/src/libtls/tls_peer.c index b429da300..a95b40f55 100644 --- a/src/libtls/tls_peer.c +++ b/src/libtls/tls_peer.c @@ -80,6 +80,11 @@ struct private_tls_peer_t { peer_state_t state; /** + * TLS version we offered in hello + */ + tls_version_t hello_version; + + /** * Hello random data selected by client */ char client_random[32]; @@ -724,6 +729,7 @@ static status_t send_client_hello(private_tls_peer_t *this, /* TLS version */ version = this->tls->get_version(this->tls); + this->hello_version = version; writer->write_uint16(writer, version); writer->write_data(writer, chunk_from_thing(this->client_random)); @@ -917,7 +923,7 @@ static status_t send_key_exchange_encrypt(private_tls_peer_t *this, return NEED_MORE; } rng->destroy(rng); - htoun16(premaster, TLS_1_2); + htoun16(premaster, this->hello_version); if (!this->crypto->derive_secrets(this->crypto, chunk_from_thing(premaster), this->session, this->server, |