mirror of https://github.com/opencardev/aasdk
Add Log output for SSLWraper getError()
parent
1d46df4883
commit
c3f6a2887f
|
@ -22,6 +22,7 @@
|
|||
#include <openssl/ssl.h>
|
||||
#include <openssl/conf.h>
|
||||
#include <f1x/aasdk/Transport/SSLWrapper.hpp>
|
||||
#include <f1x/aasdk/Common/Log.hpp>
|
||||
|
||||
namespace f1x
|
||||
{
|
||||
|
@ -49,6 +50,8 @@ SSLWrapper::~SSLWrapper()
|
|||
ERR_remove_state(0);
|
||||
#endif
|
||||
ERR_free_strings();
|
||||
ERR_load_crypto_strings();
|
||||
ERR_load_ERR_strings();
|
||||
}
|
||||
|
||||
X509* SSLWrapper::readCertificate(const std::string& certificate)
|
||||
|
@ -188,6 +191,9 @@ int SSLWrapper::sslWrite(SSL *ssl, const void *buf, int num)
|
|||
|
||||
int SSLWrapper::getError(SSL* ssl, int returnCode)
|
||||
{
|
||||
while (auto err = ERR_get_error()) {
|
||||
AASDK_LOG(error) << "[SSLWrapper] SSL Error " << ERR_error_string(err, NULL);
|
||||
}
|
||||
return SSL_get_error(ssl, returnCode);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue