diff options
| author | Sam Varshavchik | 2020-04-20 07:32:45 -0400 |
|---|---|---|
| committer | Sam Varshavchik | 2020-04-20 07:32:45 -0400 |
| commit | dac56c010aad8943b85776c0c1f4d1c30064a2be (patch) | |
| tree | d7c68073458c57de47e6da53b4c49f69a478edf2 /tcpd | |
| parent | 5ca4c0a36278458c4af31dc8bdcc73b8eab3b349 (diff) | |
| download | courier-libs-dac56c010aad8943b85776c0c1f4d1c30064a2be.tar.bz2 | |
Fix TLS client connections.
Diffstat (limited to 'tcpd')
| -rw-r--r-- | tcpd/libcouriertls.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tcpd/libcouriertls.c b/tcpd/libcouriertls.c index ac05caf..fa47ea8 100644 --- a/tcpd/libcouriertls.c +++ b/tcpd/libcouriertls.c @@ -251,7 +251,7 @@ static int verifypeer1(const struct tls_info *info, X509 *x, X509_NAME *subj=NULL; int nentries, j; char domain[256]; - char errmsg[1000]; +char errmsg[1000]; if(subject_alt_names) { @@ -1277,13 +1277,15 @@ SSL *tls_connect(SSL_CTX *ctx, int fd) } else { - char *idn_domain1; - - if (idna_to_unicode_8z8z(info->peer_verify_domain, - &idn_domain1, 0) - != IDNA_SUCCESS) - idn_domain1=0; + char *idn_domain1=0; + if (info->peer_verify_domain) + { + if (idna_to_unicode_8z8z(info->peer_verify_domain, + &idn_domain1, 0) + != IDNA_SUCCESS) + idn_domain1=0; + } SSL_set_connect_state(ssl); #ifdef HAVE_OPENSSL_SNI |
