summaryrefslogtreecommitdiffstats
path: root/crypto/x509
diff options
context:
space:
mode:
authorViktor Dukhovni <ietf-dane@dukhovni.org>2014-07-06 01:47:29 +1000
committerViktor Dukhovni <ietf-dane@dukhovni.org>2014-07-06 01:50:50 +1000
commitced3d9158a7a8c676be504bb6cd3b5ffb7cc7f13 (patch)
tree5378db291b7a10706d1dcb3c25b92b54c7df2bec /crypto/x509
parent6e661d458f5aa8f52bf3d9098bd10025de5f08ea (diff)
Set optional peername when X509_check_host() succeeds.
Pass address of X509_VERIFY_PARAM_ID peername to X509_check_host(). Document modified interface.
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/x509_vfy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c
index b0e1dc036a..7e2916ce09 100644
--- a/crypto/x509/x509_vfy.c
+++ b/crypto/x509/x509_vfy.c
@@ -752,7 +752,8 @@ static int check_hosts(X509 *x, X509_VERIFY_PARAM_ID *id)
for (i = 0; i < n; ++i)
{
name = (unsigned char *)sk_OPENSSL_STRING_value(id->hosts, i);
- if (X509_check_host(x, name, 0, id->hostflags) > 0)
+ if (X509_check_host(x, name, 0, id->hostflags,
+ &id->peername) > 0)
return 1;
}
return n == 0;