diff options
author | Scott Deboy <sdeboy@secondstryke.com> | 2013-09-12 12:03:40 -0700 |
---|---|---|
committer | Ben Laurie <ben@links.org> | 2014-02-05 18:25:46 +0000 |
commit | ac20719d994729970eb3b775c7bffa81f0e9f960 (patch) | |
tree | 968d561cc089196fff817ca36bee1bdc9cbc2f78 /ssl/s23_clnt.c | |
parent | a51f767645c117667d337f77fe1dd9c0a66d8410 (diff) |
Update custom TLS extension and supplemental data 'generate' callbacks to support sending an alert.
If multiple TLS extensions are expected but not received, the TLS extension and supplemental data 'generate' callbacks are the only chance for the receive-side to trigger a specific TLS alert during the handshake.
Removed logic which no-op'd TLS extension generate callbacks (as the generate callbacks need to always be called in order to trigger alerts), and updated the serverinfo-specific custom TLS extension callbacks to track which custom TLS extensions were received by the client, where no-ops for 'generate' callbacks are appropriate.
Diffstat (limited to 'ssl/s23_clnt.c')
-rw-r--r-- | ssl/s23_clnt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c index fa20c1c3bd..452a19c171 100644 --- a/ssl/s23_clnt.c +++ b/ssl/s23_clnt.c @@ -553,8 +553,9 @@ static int ssl23_client_hello(SSL *s) SSLerr(SSL_F_SSL23_CLIENT_HELLO,SSL_R_CLIENTHELLO_TLSEXT); return -1; } - if ((p = ssl_add_clienthello_tlsext(s, p, buf+SSL3_RT_MAX_PLAIN_LENGTH)) == NULL) + if ((p = ssl_add_clienthello_tlsext(s, p, buf+SSL3_RT_MAX_PLAIN_LENGTH, &al)) == NULL) { + ssl3_send_alert(s,SSL3_AL_FATAL,al); SSLerr(SSL_F_SSL23_CLIENT_HELLO,ERR_R_INTERNAL_ERROR); return -1; } |