openssl/openssl-1.0.2-test-use-localhost.patch
2018-03-31 19:17:02 +03:00

21 lines
865 B
Diff

diff -Naur openssl-1.0.2o.orig/ssl/ssltest.c openssl-1.0.2o/ssl/ssltest.c
--- openssl-1.0.2o.orig/ssl/ssltest.c 2018-03-31 19:02:09.054769078 +0300
+++ openssl-1.0.2o/ssl/ssltest.c 2018-03-31 19:02:09.070769368 +0300
@@ -1859,16 +1859,7 @@
#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 */