aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/https/x509/rfc2818_hostname.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/https/x509/rfc2818_hostname.c')
-rw-r--r--src/daemon/https/x509/rfc2818_hostname.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/daemon/https/x509/rfc2818_hostname.c b/src/daemon/https/x509/rfc2818_hostname.c
index fe03af33..be49a778 100644
--- a/src/daemon/https/x509/rfc2818_hostname.c
+++ b/src/daemon/https/x509/rfc2818_hostname.c
@@ -84,7 +84,8 @@ MHD__gnutls_hostname_compare (const char *certname, const char *hostname)
84 * Returns non zero for a successful match, and zero on failure. 84 * Returns non zero for a successful match, and zero on failure.
85 **/ 85 **/
86int 86int
87MHD_gnutls_x509_crt_check_hostname (MHD_gnutls_x509_crt_t cert, const char *hostname) 87MHD_gnutls_x509_crt_check_hostname (MHD_gnutls_x509_crt_t cert,
88 const char *hostname)
88{ 89{
89 90
90 char dnsname[MAX_CN]; 91 char dnsname[MAX_CN];
@@ -112,8 +113,8 @@ MHD_gnutls_x509_crt_check_hostname (MHD_gnutls_x509_crt_t cert, const char *host
112 113
113 dnsnamesize = sizeof (dnsname); 114 dnsnamesize = sizeof (dnsname);
114 ret = MHD_gnutls_x509_crt_get_subject_alt_name (cert, i, 115 ret = MHD_gnutls_x509_crt_get_subject_alt_name (cert, i,
115 dnsname, &dnsnamesize, 116 dnsname, &dnsnamesize,
116 NULL); 117 NULL);
117 118
118 if (ret == GNUTLS_SAN_DNSNAME) 119 if (ret == GNUTLS_SAN_DNSNAME)
119 { 120 {
@@ -141,7 +142,7 @@ MHD_gnutls_x509_crt_check_hostname (MHD_gnutls_x509_crt_t cert, const char *host
141 */ 142 */
142 dnsnamesize = sizeof (dnsname); 143 dnsnamesize = sizeof (dnsname);
143 if (MHD_gnutls_x509_crt_get_dn_by_oid (cert, OID_X520_COMMON_NAME, 0, 144 if (MHD_gnutls_x509_crt_get_dn_by_oid (cert, OID_X520_COMMON_NAME, 0,
144 0, dnsname, &dnsnamesize) < 0) 145 0, dnsname, &dnsnamesize) < 0)
145 { 146 {
146 /* got an error, can't find a name 147 /* got an error, can't find a name
147 */ 148 */