Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/fetch/dist/libfetch Use SNI.



details:   https://anonhg.NetBSD.org/src/rev/083426d14dae
branches:  trunk
changeset: 373214:083426d14dae
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Tue Jan 24 08:01:25 2023 +0000

description:
Use SNI.

diffstat:

 external/bsd/fetch/dist/libfetch/common.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 4a43f853bd57 -r 083426d14dae external/bsd/fetch/dist/libfetch/common.c
--- a/external/bsd/fetch/dist/libfetch/common.c Tue Jan 24 07:57:20 2023 +0000
+++ b/external/bsd/fetch/dist/libfetch/common.c Tue Jan 24 08:01:25 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: common.c,v 1.2 2011/06/25 20:27:01 christos Exp $      */
+/*     $NetBSD: common.c,v 1.3 2023/01/24 08:01:25 mlelstv Exp $       */
 /*-
  * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
  * Copyright (c) 2008, 2010 Joerg Sonnenberger <joerg%NetBSD.org@localhost>
@@ -452,6 +452,10 @@
                return (-1);
        }
        SSL_set_fd(conn->ssl, conn->sd);
+       if (!SSL_set_tlsext_host_name(conn->ssl, conn->cache_url->host)) {
+               fprintf(stderr, "SSL hostname setting failed\n"); 
+               return (-1);
+       }
        if (SSL_connect(conn->ssl) == -1){
                ERR_print_errors_fp(stderr);
                return (-1);



Home | Main Index | Thread Index | Old Index