Skip to content

Commit

Permalink
Search from the beginning for altname. Closes #1946
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Mar 20, 2017
1 parent fcf39a0 commit dae5661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/tls.c
Expand Up @@ -2149,7 +2149,7 @@ int cbtls_verify(int ok, X509_STORE_CTX *ctx)
/*
* Get the RFC822 Subject Alternative Name
*/
loc = X509_get_ext_by_NID(client_cert, NID_subject_alt_name, 0);
loc = X509_get_ext_by_NID(client_cert, NID_subject_alt_name, -1);
if (certs && (lookup <= 1) && (loc >= 0)) {
X509_EXTENSION *ext = NULL;
GENERAL_NAMES *names = NULL;
Expand Down

0 comments on commit dae5661

Please sign in to comment.