openssl/openssl-1.0.2-test-use-localhost.patch
Andrey Bondrov f9a9a3ce4a New version 1.0.2h
Re-diff patches
2016-09-13 11:10:42 +10:00

20 lines
833 B
Diff

--- 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 */