Implement the Opaque PRF Input TLS extension
(draft-rescorla-tls-opaque-prf-input-00.txt), and do some cleanups and bugfixes on the way. In particular, this fixes the buffer bounds checks in ssl_add_clienthello_tlsext() and in ssl_add_serverhello_tlsext(). Note that the opaque PRF Input TLS extension is not compiled by default; see CHANGES.
This commit is contained in:
@@ -638,6 +638,11 @@ void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
|
||||
extname = "server ticket";
|
||||
break;
|
||||
|
||||
#ifdef TLSEXT_TYPE_opaque_prf_input
|
||||
case TLSEXT_TYPE_opaque_prf_input:
|
||||
extname = "opaque PRF input";
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
extname = "unknown";
|
||||
|
@@ -859,6 +859,11 @@ bad:
|
||||
}
|
||||
#endif /* OPENSSL_NO_KRB5 */
|
||||
/* SSL_set_cipher_list(con,"RC4-MD5"); */
|
||||
#if 0
|
||||
#ifdef TLSEXT_TYPE_opaque_prf_input
|
||||
SSL_set_tlsext_opaque_prf_input(con, "Test client", 1);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
re_start:
|
||||
|
||||
@@ -1073,11 +1078,13 @@ re_start:
|
||||
if (in_init)
|
||||
{
|
||||
in_init=0;
|
||||
#if 0 /* This test doesn't really work as intended (needs to be fixed) */
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
if (servername != NULL && !SSL_session_reused(con))
|
||||
{
|
||||
BIO_printf(bio_c_out,"Server did %sacknowledge servername extension.\n",tlsextcbp.ack?"":"not ");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
if (sess_out)
|
||||
{
|
||||
|
@@ -1575,6 +1575,11 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||
strlen((char *)context));
|
||||
}
|
||||
SSL_clear(con);
|
||||
#if 0
|
||||
#ifdef TLSEXT_TYPE_opaque_prf_input
|
||||
SSL_set_tlsext_opaque_prf_input(con, "Test server", 1);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (SSL_version(con) == DTLS1_VERSION)
|
||||
{
|
||||
|
Reference in New Issue
Block a user