Use a variable on the stack to not have a temporary in the call
[ACE_TAO.git] / ACE / protocols / ace / INet / SSL_CertificateCallback.cpp
blob929be0e85dbb2208c7a0f1c28ed1ccdc6b29b3f5
1 #include "ace/INet/SSL_CertificateCallback.h"
3 #if !defined (__ACE_INLINE__)
4 #include "ace/INet/SSL_CertificateCallback.inl"
5 #endif
7 #include "ace/Log_Msg.h"
8 #include "ace/INet/INet_Log.h"
10 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
12 namespace ACE
14 namespace INet
16 SSL_CertificateCallbackArg::SSL_CertificateCallbackArg (const ACE_SSL_Context* ssl_ctx,
17 ::X509_STORE_CTX* cert_ctx)
18 : ssl_ctx_ (ssl_ctx),
19 err_depth_ (0),
20 err_code_ (0),
21 ignore_err_ (false)
23 this->ssl_cert_ = ::X509_STORE_CTX_get_current_cert (cert_ctx);
24 this->err_depth_ = ::X509_STORE_CTX_get_error_depth (cert_ctx);
25 this->err_code_ = ::X509_STORE_CTX_get_error (cert_ctx);
28 SSL_CertificateCallbackArg::~SSL_CertificateCallbackArg ()
32 SSL_CertificateCallback::SSL_CertificateCallback ()
36 SSL_CertificateCallback::~SSL_CertificateCallback ()
40 SSL_CertificateAcceptor::SSL_CertificateAcceptor ()
44 SSL_CertificateAcceptor::~SSL_CertificateAcceptor ()
48 void SSL_CertificateAcceptor::handle_certificate_failure (SSL_CertificateCallbackArg& arg)
50 INET_DEBUG (3, (LM_INFO, DLINFO
51 ACE_TEXT ("SSL_CertificateAcceptor::handle_certificate_failure - ")
52 ACE_TEXT ("ignored certificate verification error: %C\n"),
53 arg.error_message ().c_str ()));
54 arg.ignore_error (true);
59 ACE_END_VERSIONED_NAMESPACE_DECL