aboutsummaryrefslogtreecommitdiffstats
path: root/ssl/ssltest.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssl/ssltest.c')
-rw-r--r--ssl/ssltest.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ssl/ssltest.c b/ssl/ssltest.c
index b44a5ec48f..1e685346dd 100644
--- a/ssl/ssltest.c
+++ b/ssl/ssltest.c
@@ -74,6 +74,7 @@
#include <openssl/err.h>
#include <openssl/rand.h>
#ifdef WINDOWS
+#include <winsock.h>
#include "../crypto/bio/bss_file.c"
#endif
@@ -517,6 +518,19 @@ bad:
c_ssl=SSL_new(c_ctx);
s_ssl=SSL_new(s_ctx);
+#ifndef NO_KRB5
+ if (c_ssl && c_ssl->kssl_ctx)
+ {
+ char localhost[257];
+
+ if (gethostname(localhost, 256) == 0)
+ {
+ kssl_ctx_setstring(c_ssl->kssl_ctx, KSSL_SERVER,
+ localhost);
+ }
+ }
+#endif /* NO_KRB5 */
+
for (i=0; i<number; i++)
{
if (!reuse) SSL_set_session(c_ssl,NULL);