From c09baf8e10e14b53e868764f9731e44567924853 Mon Sep 17 00:00:00 2001 From: Marcel Poul Date: Mon, 2 Jul 2012 13:05:32 +0000 Subject: [PATCH] error codes correction --- emi.canl.canl-c/src/canl_error_codes | 5 ++++- emi.canl.canl-c/src/canl_error_desc | 2 ++ emi.canl.canl-c/src/canl_ssl.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/emi.canl.canl-c/src/canl_error_codes b/emi.canl.canl-c/src/canl_error_codes index 7795b38..05c802c 100644 --- a/emi.canl.canl-c/src/canl_error_codes +++ b/emi.canl.canl-c/src/canl_error_codes @@ -100,7 +100,10 @@ totalPathLength trustAnchorIssuerError trustDNInvalid trustPubKeyError +# +# Recently added error codes without appropriate desc. +# GeneralSSLError HostNotFound ResolverError -NoClientCertificate +NoPeerCertificate diff --git a/emi.canl.canl-c/src/canl_error_desc b/emi.canl.canl-c/src/canl_error_desc index c33e51e..56b24af 100644 --- a/emi.canl.canl-c/src/canl_error_desc +++ b/emi.canl.canl-c/src/canl_error_desc @@ -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 diff --git a/emi.canl.canl-c/src/canl_ssl.c b/emi.canl.canl-c/src/canl_ssl.c index c640cbf..961ed6e 100644 --- a/emi.canl.canl-c/src/canl_ssl.c +++ b/emi.canl.canl-c/src/canl_ssl.c @@ -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) -- 1.8.2.3