summaryrefslogtreecommitdiffstats
path: root/ssl/t1_lib.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2006-01-11 06:10:40 +0000
committerBodo Möller <bodo@openssl.org>2006-01-11 06:10:40 +0000
commit241520e66d3ece1054beae93ff96978d0299cae4 (patch)
tree11e6149f50fb9e45aaba9635a138c93059c1c988 /ssl/t1_lib.c
parenta13c20f60353d3cd3fdd4f23563819eeb4234528 (diff)
More TLS extension related changes.
Submitted by: Peter Sylvester
Diffstat (limited to 'ssl/t1_lib.c')
-rw-r--r--ssl/t1_lib.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index cea8b8e851..1aa5e90bbf 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -389,22 +389,17 @@ int ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in
int ssl_check_tlsext(SSL *s,int *al)
{
- int ret;
+ int ret=SSL_TLSEXT_ERR_NOACK;
*al = SSL_AD_UNRECOGNIZED_NAME;
- if (s->ctx != NULL && s->ctx->tlsext_servername_callback != 0)
- {
+
+ if (s->ctx != NULL && s->ctx->tlsext_servername_callback != 0)
ret = s->ctx->tlsext_servername_callback(s, al, s->ctx->tlsext_servername_arg);
- if (ret <= 0)
- return ret;
- }
- else if (s->initial_ctx != NULL && s->initial_ctx->tlsext_servername_callback != 0)
- {
+ else if (s->initial_ctx != NULL && s->initial_ctx->tlsext_servername_callback != 0)
ret = s->initial_ctx->tlsext_servername_callback(s, al, s->initial_ctx->tlsext_servername_arg);
- if (ret <= 0)
- return ret;
- }
-
- return 1;
+
+ if (ret == SSL_TLSEXT_ERR_NOACK)
+ s->servername_done=0;
+ return ret;
}
#endif