}
bool
-ACLSslErrorData::match(Ssl::error_t toFind)
+ACLSslErrorData::match(Ssl::ssl_error_t toFind)
{
return values->findAndTune (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));
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;
}
return values == NULL;
}
-ACLData<Ssl::error_t> *
+ACLData<Ssl::ssl_error_t> *
ACLSslErrorData::clone() const
{
/* Splay trees don't clone yet. */
#include "ssl/support.h"
#include "ssl/ErrorDetail.h"
-class ACLSslErrorData : public ACLData<Ssl::error_t>
+class ACLSslErrorData : public ACLData<Ssl::ssl_error_t>
{
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);
#include "ssl/ErrorDetail.h"
struct SslErrorDetailEntry {
- Ssl::error_t value;
+ Ssl::ssl_error_t value;
const char *name;
const char *detail;
};
{SSL_ERROR_NONE, NULL, NULL }
};
-Ssl::error_t
+Ssl::ssl_error_t
Ssl::parseErrorString(const char *name)
{
assert(name);
}
const char *
-Ssl::getErrorName(Ssl::error_t value)
+Ssl::getErrorName(Ssl::ssl_error_t value)
{
for (int i = 0; TheSslDetailMap[i].name; ++i) {
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)
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));
}
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
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
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
};
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));