Index: xymonnet/httptest.c =================================================================== --- xymonnet/httptest.c (revision 7254) +++ xymonnet/httptest.c (working copy) @@ -681,5 +681,7 @@ t->testspec, t->silenttest, grabstrbuffer(httprequest), httptest, tcp_http_data_callback, tcp_http_final_callback); } + + httptest->tcptest->sni = httptest->weburl.desturl->host; } Index: xymonnet/contest.c =================================================================== --- xymonnet/contest.c (revision 7224) +++ xymonnet/contest.c (working copy) @@ -571,6 +571,11 @@ } } + +#if (SSLEAY_VERSION_NUMBER >= 0x00908070) + if (item->sni) SSL_set_tlsext_host_name(item->ssldata, item->sni); +#endif + /* SSL setup is done. Now attach the socket FD to the SSL protocol handler */ if (SSL_set_fd(item->ssldata, item->fd) != 1) { char sslerrmsg[256]; Index: xymonnet/contest.h =================================================================== --- xymonnet/contest.h (revision 7224) +++ xymonnet/contest.h (working copy) @@ -108,6 +108,7 @@ /* For testing SSL-wrapped services */ ssloptions_t *ssloptions; /* Specific SSL options requested by user */ + char *sni; SSL_CTX *sslctx; /* SSL context pointer */ SSL *ssldata; /* SSL data (socket) pointer */ char *certinfo; /* Certificate info (subject+expiretime) */