]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix the "Report ERR_SECURE_CONNECT_FAIL details" patch (rev 11122)
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 14 Dec 2010 12:17:34 +0000 (14:17 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 14 Dec 2010 12:17:34 +0000 (14:17 +0200)
Looks that the error_t is a define in some platforms. Rename Ssl::error_t to
Ssl::ssl_error_t to avoid compile problems

src/acl/SslErrorData.cc
src/acl/SslErrorData.h
src/ssl/ErrorDetail.cc
src/ssl/ErrorDetail.h
src/ssl/support.cc

index 93381a61773aad132cfd33cce878b32d38f32a80..d565253f296c6579e6a6c93df5cd47e05cf06c47 100644 (file)
@@ -22,7 +22,7 @@ ACLSslErrorData::~ACLSslErrorData()
 }
 
 bool
-ACLSslErrorData::match(Ssl::error_t toFind)
+ACLSslErrorData::match(Ssl::ssl_error_t toFind)
 {
     return values->findAndTune (toFind);
 }
@@ -30,14 +30,14 @@ ACLSslErrorData::match(Ssl::error_t toFind)
 /* explicit instantiation required for some systems */
 /** \cond AUTODOCS-IGNORE */
 // AYJ: 2009-05-20 : Removing. clashes with template <int> instantiation for other ACLs.
-// template cbdata_type CbDataList<Ssl::error_t>::CBDATA_CbDataList;
+// template cbdata_type CbDataList<Ssl::ssl_error_t>::CBDATA_CbDataList;
 /** \endcond */
 
 wordlist *
 ACLSslErrorData::dump()
 {
     wordlist *W = NULL;
-    CbDataList<Ssl::error_t> *data = values;
+    CbDataList<Ssl::ssl_error_t> *data = values;
 
     while (data != NULL) {
         wordlistAdd(&W, Ssl::getErrorName(data->element));
@@ -50,12 +50,12 @@ ACLSslErrorData::dump()
 void
 ACLSslErrorData::parse()
 {
-    CbDataList<Ssl::error_t> **Tail;
+    CbDataList<Ssl::ssl_error_t> **Tail;
     char *t = NULL;
 
     for (Tail = &values; *Tail; Tail = &((*Tail)->next));
     while ((t = strtokFile())) {
-        CbDataList<Ssl::error_t> *q = new CbDataList<Ssl::error_t>(Ssl::parseErrorString(t));
+        CbDataList<Ssl::ssl_error_t> *q = new CbDataList<Ssl::ssl_error_t>(Ssl::parseErrorString(t));
         *(Tail) = q;
         Tail = &q->next;
     }
@@ -67,7 +67,7 @@ ACLSslErrorData::empty() const
     return values == NULL;
 }
 
-ACLData<Ssl::error_t> *
+ACLData<Ssl::ssl_error_t> *
 ACLSslErrorData::clone() const
 {
     /* Splay trees don't clone yet. */
index d2974921a9c2df82f8097b742268a50528ef5fe5..1f21a7ceae0fe94b48d1f94b0ff162ecf45b72d1 100644 (file)
@@ -11,7 +11,7 @@
 #include "ssl/support.h"
 #include "ssl/ErrorDetail.h"
 
-class ACLSslErrorData : public ACLData<Ssl::error_t>
+class ACLSslErrorData : public ACLData<Ssl::ssl_error_t>
 {
 
 public:
@@ -21,13 +21,13 @@ public:
     ACLSslErrorData(ACLSslErrorData const &);
     ACLSslErrorData &operator= (ACLSslErrorData const &);
     virtual ~ACLSslErrorData();
-    bool match(Ssl::error_t);
+    bool match(Ssl::ssl_error_t);
     wordlist *dump();
     void parse();
     bool empty() const;
-    virtual ACLData<Ssl::error_t> *clone() const;
+    virtual ACLData<Ssl::ssl_error_t> *clone() const;
 
-    CbDataList<Ssl::error_t> *values;
+    CbDataList<Ssl::ssl_error_t> *values;
 };
 
 MEMPROXY_CLASS_INLINE(ACLSslErrorData);
index 26ed64d481ea338ccc3a906ff0264580fb3972a0..a7f8f383d2c2818380e0ef13b2649720e057f558 100644 (file)
@@ -2,7 +2,7 @@
 #include "ssl/ErrorDetail.h"
 
 struct SslErrorDetailEntry {
-    Ssl::error_t value;
+    Ssl::ssl_error_t value;
     const char *name;
     const char *detail;
 };
@@ -37,7 +37,7 @@ static SslErrorDetailEntry TheSslDetailMap[] = {
     {SSL_ERROR_NONE, NULL, NULL }
 };
 
-Ssl::error_t
+Ssl::ssl_error_t
 Ssl::parseErrorString(const char *name)
 {
     assert(name);
@@ -59,7 +59,7 @@ Ssl::parseErrorString(const char *name)
 }
 
 const char *
-Ssl::getErrorName(Ssl::error_t value)
+Ssl::getErrorName(Ssl::ssl_error_t value)
 {
 
     for (int i = 0; TheSslDetailMap[i].name; ++i) {
@@ -70,7 +70,7 @@ Ssl::getErrorName(Ssl::error_t value)
     return NULL;
 }
 
-static const char *getErrorDetail(Ssl::error_t value)
+static const char *getErrorDetail(Ssl::ssl_error_t value)
 {
     for (int i = 0; TheSslDetailMap[i].name; ++i) {
         if (TheSslDetailMap[i].value == value)
@@ -247,7 +247,7 @@ const String &Ssl::ErrorDetail::toString() const
    CRYPTO_add(&(cert->references),1,CRYPTO_LOCK_X509);
    peer_cert.reset(cert);
 */
-Ssl::ErrorDetail::ErrorDetail( error_t err_no, X509 *cert): error_no (err_no)
+Ssl::ErrorDetail::ErrorDetail( Ssl::ssl_error_t err_no, X509 *cert): error_no (err_no)
 {
     peer_cert.reset(X509_dup(cert));
 }
index fd3a7ae1cb5994b32df2be3e5bd4e55a01338fe9..c1e08150a077e51617d1bc608231090dbb13e564 100644 (file)
 namespace Ssl
 {
 /// Squid defined error code (<0),  an error code returned by SSL X509 api, or SSL_ERROR_NONE
-typedef int error_t;
+typedef int ssl_error_t;
 
 /**
    \ingroup ServerProtocolSSLAPI
- * The error_t representation of the error described by "name".
+ * The ssl_error_t representation of the error described by "name".
  */
-error_t parseErrorString(const char *name);
+ssl_error_t parseErrorString(const char *name);
 
 /**
    \ingroup ServerProtocolSSLAPI
  * The string representation of the SSL error "value"
  */
-const char *getErrorName(error_t value);
+const char *getErrorName(ssl_error_t value);
 
 /**
    \ingroup ServerProtocolSSLAPI
@@ -40,7 +40,7 @@ const char *getErrorName(error_t value);
 class ErrorDetail
 {
 public:
-    ErrorDetail(error_t err_no, X509 *cert);
+    ErrorDetail(ssl_error_t err_no, X509 *cert);
     ErrorDetail(ErrorDetail const &);
     const String &toString() const;  ///< An error detail string to embed in squid error pages
 
@@ -68,7 +68,7 @@ private:
     void buildDetail() const;
 
     mutable String errDetailStr; ///< Caches the error detail message
-    error_t error_no;   ///< The error code
+    ssl_error_t error_no;   ///< The error code
     X509_Pointer peer_cert; ///< A pointer to the peer certificate
 };
 
index 3e682b9b244334155f6ea9ed6dfb89006a9e17f3..e68774aeb396e49032c0641892585243848b0be9 100644 (file)
@@ -211,7 +211,7 @@ ssl_verify_cb(int ok, X509_STORE_CTX * ctx)
     void *dont_verify_domain = SSL_CTX_get_ex_data(sslctx, ssl_ctx_ex_index_dont_verify_domain);
     ACLChecklist *check = (ACLChecklist*)SSL_get_ex_data(ssl, ssl_ex_index_cert_error_check);
     X509 *peer_cert = ctx->cert;
-    Ssl::error_t error_no = SSL_ERROR_NONE;
+    Ssl::ssl_error_t error_no = SSL_ERROR_NONE;
 
     X509_NAME_oneline(X509_get_subject_name(peer_cert), buffer,
                       sizeof(buffer));