Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Langley <agl@chromium.org>2015-02-12 02:30:43 +0300
committerAdam Langley <agl@chromium.org>2015-02-13 22:00:48 +0300
commit6f8c3669894a1d8498d545efb33bd84440b4e9fc (patch)
tree3f54b1a405fdfe98aaadb27fb05b6eeb654b423d /crypto/x509
parentd0f5df2d71768e4ac68d5803529e850f88dd4107 (diff)
Set optional peername when X509_check_host() succeeds.
Pass address of X509_VERIFY_PARAM_ID peername to X509_check_host(). (Imported from upstream's 55fe56837a65ff505b492aa6aee748bf5fa91fec.) Change-Id: Ic21bfb361b8eb25677c4c2175882fa95ea44fc31
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 29a25455..51950199 100644
--- a/crypto/x509/x509_vfy.c
+++ b/crypto/x509/x509_vfy.c
@@ -713,7 +713,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, strlen((const char*) name), id->hostflags) > 0)
+ if (X509_check_host(x, name, strlen((const char*) name), id->hostflags,
+ &id->peername) > 0)
return 1;
}
return n == 0;