void SslCheck(bool b) { if (!b) { #ifdef OPENSSL_NO_ERR throw OpenSslException(1, "OpenSSL Error"); //!!! code? #else ERR_load_crypto_strings(); int rc = ::ERR_get_error(); throw OpenSslException(ERR_GET_REASON(rc)); #endif } }
void SslCheck(bool b) { if (!b) { #ifdef OPENSSL_NO_ERR throw OpenSslException(MAKE_HRESULT(SEVERITY_ERROR, FACILITY_OPENSSL, 1), "OpenSSL Error"); //!!! code? #else ERR_load_crypto_strings(); int rc = ::ERR_get_error(); String sErr = ERR_error_string(rc, 0); throw OpenSslException(MAKE_HRESULT(SEVERITY_ERROR, FACILITY_OPENSSL, ERR_GET_REASON(rc)), sErr); #endif } }