diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2012-01-05 00:23:17 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2012-01-05 00:23:17 +0000 |
commit | 192540b5222179809fd04457886c0e0e4efb882b (patch) | |
tree | 247de3075002b2904eda9c9d65addd7f6ec9ff4b /ssl/t1_lib.c | |
parent | e2ca32fc2b1b8f46316cacdbe42efa66bcedb0e1 (diff) | |
download | openssl-192540b5222179809fd04457886c0e0e4efb882b.tar.gz |
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
Reviewed by: steve
Send fatal alert if heartbeat extension has an illegal value.
Diffstat (limited to 'ssl/t1_lib.c')
-rw-r--r-- | ssl/t1_lib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 3430ea1a20..7150171c1d 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -825,6 +825,7 @@ unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned cha *(ret++) = SSL_TLSEXT_HB_DONT_SEND_REQUESTS; else *(ret++) = SSL_TLSEXT_HB_ENABLED; + } #endif @@ -1282,6 +1283,8 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in s->tlsext_heartbeat |= SSL_TLSEXT_HB_ENABLED; s->tlsext_heartbeat |= SSL_TLSEXT_HB_DONT_SEND_REQUESTS; break; + default: *al = SSL_AD_ILLEGAL_PARAMETER; + return 0; } } #endif @@ -1553,6 +1556,8 @@ int ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in s->tlsext_heartbeat |= SSL_TLSEXT_HB_ENABLED; s->tlsext_heartbeat |= SSL_TLSEXT_HB_DONT_SEND_REQUESTS; break; + default: *al = SSL_AD_ILLEGAL_PARAMETER; + return 0; } } #endif |