]> granicus.if.org Git - curl/commitdiff
Fixed the CN extraction
authorDaniel Stenberg <daniel@haxx.se>
Fri, 22 Apr 2005 20:56:26 +0000 (20:56 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 22 Apr 2005 20:56:26 +0000 (20:56 +0000)
lib/gtls.c

index fff5d5e62c80377e485892467d23a1bdabc0f15c..7ca8a0f4253a4e620ba4cfb4d9893ad868ea6373 100644 (file)
@@ -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