--- openssl-1.0.2/ssl/ssltest.c.test-use-localhost 2015-01-25 13:57:41.440606522 +0100 +++ openssl-1.0.2/ssl/ssltest.c 2015-01-25 13:59:04.039611530 +0100 @@ -1516,16 +1516,7 @@ int main(int argc, char *argv[]) #ifndef OPENSSL_NO_KRB5 if (c_ssl && c_ssl->kssl_ctx) { - char localhost[MAXHOSTNAMELEN + 2]; - - if (gethostname(localhost, sizeof localhost - 1) == 0) { - localhost[sizeof localhost - 1] = '\0'; - if (strlen(localhost) == sizeof localhost - 1) { - BIO_printf(bio_err, "localhost name too long\n"); - goto end; - } - kssl_ctx_setstring(c_ssl->kssl_ctx, KSSL_SERVER, localhost); - } + kssl_ctx_setstring(c_ssl->kssl_ctx, KSSL_SERVER, "localhost"); } #endif /* OPENSSL_NO_KRB5 */