error codes correction
authorMarcel Poul <marcel.poul@cern.ch>
Mon, 2 Jul 2012 13:05:32 +0000 (13:05 +0000)
committerMarcel Poul <marcel.poul@cern.ch>
Mon, 2 Jul 2012 13:05:32 +0000 (13:05 +0000)
emi.canl.canl-c/src/canl_error_codes
emi.canl.canl-c/src/canl_error_desc
emi.canl.canl-c/src/canl_ssl.c

index 7795b38..05c802c 100644 (file)
@@ -100,7 +100,10 @@ totalPathLength
 trustAnchorIssuerError
 trustDNInvalid
 trustPubKeyError
+# 
+# Recently added error codes without appropriate desc.
+# 
 GeneralSSLError
 HostNotFound
 ResolverError
-NoClientCertificate
+NoPeerCertificate
index c33e51e..56b24af 100644 (file)
@@ -103,6 +103,7 @@ certificateNotYetValid.category=X509_BASIC
 
 certificateExpired=Certificate has expired at: {0}
 certificateExpired.category=X509_BASIC
+certificateExpired.openssl_code=ERR_LIB_SSL,SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED
 
 noCACert=CA certificate was not found for the chain
 noCACert.category=X509_CHAIN
@@ -115,6 +116,7 @@ unknownCriticalExt.category=X509_BASIC
 
 certRevoked=Certificate was revoked at: {0}, the reason reported is: {1}
 certRevoked.category=CRL
+certRevoked.openssl_code=ERR_LIB_SSL,SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED
 
 noBaseCRL=Base CRL for the delta CRL was not found
 noBaseCRL.category=CRL
index c640cbf..961ed6e 100644 (file)
@@ -1257,7 +1257,7 @@ ssl_get_peer(glb_ctx *cc, io_handler *io, void *auth_ctx, canl_principal *peer)
 
     cert = SSL_get_peer_certificate(ssl);
     if (cert == NULL)
-       return set_error(cc, CANL_ERR_NoClientCertificate, CANL_ERROR, "No peer certificate");
+       return set_error(cc, CANL_ERR_NoPeerCertificate, CANL_ERROR, "No peer certificate");
 
     princ = calloc(1, sizeof(*princ));
     if (princ == NULL)