crypto: fix compile-time error with openssl <= 0.9.7e

This commit is contained in:
Ben Noordhuis
2012-03-22 15:52:12 +01:00
parent 851b3970e7
commit ea44d3031d

View File

@@ -993,7 +993,10 @@ Handle<Value> Connection::New(const Arguments& args) {
}
void Connection::SSLInfoCallback(const SSL *ssl, int where, int ret) {
void Connection::SSLInfoCallback(const SSL *ssl_, int where, int ret) {
// Be compatible with older versions of OpenSSL. SSL_get_app_data() wants
// a non-const SSL* in OpenSSL <= 0.9.7e.
SSL* ssl = const_cast<SSL*>(ssl_);
if (where & SSL_CB_HANDSHAKE_START) {
HandleScope scope;
Connection* c = static_cast<Connection*>(SSL_get_app_data(ssl));