Fixed encoding of TLS extensions (elliptic_curves and signature_algorithms)
authorTobias Brunner <tobias@strongswan.org>
Wed, 28 Nov 2012 09:18:28 +0000 (10:18 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 28 Nov 2012 09:20:14 +0000 (10:20 +0100)
src/libtls/tls_crypto.c
src/libtls/tls_peer.c

index 20a7da0..12aa049 100644 (file)
@@ -1110,6 +1110,7 @@ METHOD(tls_crypto_t, get_signature_algorithms, void,
        }
        enumerator->destroy(enumerator);
 
+       supported->wrap16(supported);
        writer->write_data16(writer, supported->get_buf(supported));
        supported->destroy(supported);
 }
index e9f967e..622df40 100644 (file)
@@ -760,6 +760,7 @@ static status_t send_client_hello(private_tls_peer_t *this,
        enumerator->destroy(enumerator);
        if (curves)
        {
+               curves->wrap16(curves);
                extensions->write_data16(extensions, curves->get_buf(curves));
                curves->destroy(curves);