~ubuntu-branches/ubuntu/wily/irssi/wily

« back to all changes in this revision

Viewing changes to debian/patches/20fix_ssl_proxy_hostname_check

  • Committer: Package Import Robot
  • Author(s): Steve Langasek
  • Date: 2014-09-06 23:15:51 UTC
  • Revision ID: package-import@ubuntu.com-20140906231551-7z4uu0h68rurtw5w
Tags: 0.8.16-1ubuntu4
Refresh and re-enable 20fix_ssl_proxy_hostname_check.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Description: fix SSL CN check for proxy setup
2
2
Origin: Ubuntu, https://bugs.launchpad.net/ubuntu/+source/irssi/+bug/565182
3
 
Author: Steve Langasek
 
3
Author: Steve Langasek <vorlon@debian.org>
4
4
 
5
 
--- a/src/core/servers.c
6
 
+++ b/src/core/servers.c
7
 
@@ -209,6 +209,7 @@
8
 
        char *errmsg2;
9
 
        char ipaddr[MAX_IP_LEN];
10
 
         int port;
11
 
+       char *hostname;
12
 
 
13
 
        g_return_if_fail(ip != NULL || unix_socket != NULL);
14
 
 
15
 
@@ -223,8 +224,10 @@
16
 
                         server->connrec->own_ip4);
17
 
                port = server->connrec->proxy != NULL ?
18
 
                        server->connrec->proxy_port : server->connrec->port;
19
 
+               hostname = server->connrec->proxy != NULL ?
20
 
+                       server->connrec->proxy : server->connrec->address;
21
 
                handle = server->connrec->use_ssl ?
22
 
-                       net_connect_ip_ssl(ip, port, server->connrec->address, own_ip, server->connrec->ssl_cert, server->connrec->ssl_pkey,
23
 
+                       net_connect_ip_ssl(ip, port, hostname, own_ip, server->connrec->ssl_cert, server->connrec->ssl_pkey,
24
 
 server->connrec->ssl_cafile, server->connrec->ssl_capath, server->connrec->ssl_verify) :
25
 
                        net_connect_ip(ip, port, own_ip);
26
 
        } else {
 
5
Index: irssi/src/core/network-openssl.c
 
6
===================================================================
 
7
--- irssi.orig/src/core/network-openssl.c
 
8
+++ irssi/src/core/network-openssl.c
 
9
@@ -240,6 +240,9 @@
 
10
        }
 
11
 #endif
 
12
 
 
13
+         if (server->connrec->proxy != NULL)
 
14
+                hostname = server->connrec->proxy;
 
15
+
 
16
        result = SSL_get_verify_result(ssl);
 
17
        if (result != X509_V_OK) {
 
18
                unsigned char md[EVP_MAX_MD_SIZE];