missing server cert is error
authorMarcel Poul <marcel.poul@cern.ch>
Wed, 1 Feb 2012 14:53:00 +0000 (14:53 +0000)
committerMarcel Poul <marcel.poul@cern.ch>
Wed, 1 Feb 2012 14:53:00 +0000 (14:53 +0000)
emi.canl.canl-c/src/canl_ssl.c

index a8226b2..b9732f6 100644 (file)
@@ -320,7 +320,9 @@ static int check_hostname_cert(glb_ctx *cc, io_handler *io,
      *  to subj. alt. name*/
     serv_cert = SSL_get_peer_certificate(ssl);
     if (!serv_cert)
-        return 0; //TODO is missing certificate 
+        return set_error(cc, CANL_ERR_unknownMsg, CANL_ERROR,
+                "Server certificate missing");
+    return 2; //TODO is missing certificate error?, sure.
     i = X509_get_ext_by_NID(serv_cert, NID_subject_alt_name, -1);
     if (i != -1) {
         /* subj. alt. name extention present */