mirror of
https://github.com/curl/curl.git
synced 2026-04-18 10:51:43 +03:00
Fixed the CN extraction
This commit is contained in:
parent
e02ab66120
commit
543fbe14ee
1 changed files with 5 additions and 1 deletions
|
|
@ -308,9 +308,13 @@ Curl_gtls_connect(struct connectdata *conn,
|
|||
size=sizeof(certbuf);
|
||||
rc = gnutls_x509_crt_get_dn_by_oid(x509_cert, GNUTLS_OID_X520_COMMON_NAME,
|
||||
0, /* the first and only one */
|
||||
TRUE, /* give to me raw please */
|
||||
FALSE,
|
||||
certbuf,
|
||||
&size);
|
||||
if(rc) {
|
||||
infof(data, "error fetching CN from cert:%s\n",
|
||||
gnutls_strerror(rc));
|
||||
}
|
||||
|
||||
/* This function will check if the given certificate's subject matches the
|
||||
given hostname. This is a basic implementation of the matching described
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue