openssl/openssl-1.0.2-test-use-localhost.patch

21 lines
833 B
Diff
Raw Normal View History

2016-09-13 11:10:42 +10:00
--- 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[])
2015-04-05 23:12:44 +10:00
#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 */