X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;ds=sidebyside;f=test%2Fsslapitest.c;h=94719b23acbd3de31df5d090e3d9da4d8096ac1b;hb=104a733df65dfd8c3dd110de9bd56f6ebfc8f2f6;hp=0f90db92ba1b0ffed28e8d80d5e1936cf8e92984;hpb=5ce87e11de21835255ea11cc330ebf9931e21329;p=openssl.git diff --git a/test/sslapitest.c b/test/sslapitest.c index 0f90db92ba..94719b23ac 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -110,6 +110,17 @@ static unsigned char serverinfov2[] = { 0xff /* Dummy extension data */ }; +static int hostname_cb(SSL *s, int *al, void *arg) +{ + const char *hostname = SSL_get_servername(s, TLSEXT_NAMETYPE_host_name); + + if (hostname != NULL && (strcmp(hostname, "goodhost") == 0 + || strcmp(hostname, "altgoodhost") == 0)) + return SSL_TLSEXT_ERR_OK; + + return SSL_TLSEXT_ERR_NOACK; +} + static void client_keylog_callback(const SSL *ssl, const char *line) { int line_length = strlen(line); @@ -3196,17 +3207,6 @@ static int test_early_data_not_sent(int idx) return testresult; } -static int hostname_cb(SSL *s, int *al, void *arg) -{ - const char *hostname = SSL_get_servername(s, TLSEXT_NAMETYPE_host_name); - - if (hostname != NULL && (strcmp(hostname, "goodhost") == 0 - || strcmp(hostname, "altgoodhost") == 0)) - return SSL_TLSEXT_ERR_OK; - - return SSL_TLSEXT_ERR_NOACK; -} - static const char *servalpn; static int alpn_select_cb(SSL *ssl, const unsigned char **out,