diff options
Diffstat (limited to 'ssl/t1_lib.c')
-rw-r--r-- | ssl/t1_lib.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 8bed38d6d4..07cb096646 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -2364,19 +2364,19 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char record = &s->ctx->custom_srv_ext_records[i]; if (type == record->ext_type) { - /* Error on duplicate TLS Extensions */ size_t j; + /* Error on duplicate TLS Extensions */ for (j = 0; j < s->s3->tlsext_custom_types_count; j++) { - if (s->s3->tlsext_custom_types[j] == type) + if (type == s->s3->tlsext_custom_types[j]) { *al = TLS1_AD_DECODE_ERROR; return 0; } } - /* Callback */ + /* NULL callback still notes the extension */ if (record->fn1 && !record->fn1(s, type, data, size, al, record->arg)) return 0; @@ -2384,7 +2384,7 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char s->s3->tlsext_custom_types_count++; s->s3->tlsext_custom_types = OPENSSL_realloc( s->s3->tlsext_custom_types, - s->s3->tlsext_custom_types_count*2); + s->s3->tlsext_custom_types_count * 2); if (s->s3->tlsext_custom_types == NULL) { s->s3->tlsext_custom_types = 0; @@ -2392,7 +2392,7 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char return 0; } s->s3->tlsext_custom_types[ - s->s3->tlsext_custom_types_count-1] = type; + s->s3->tlsext_custom_types_count - 1] = type; } } } |