Browse Source

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

v0.8.7-release
Ben Noordhuis 13 years ago
parent
commit
ea44d3031d
  1. 5
      src/node_crypto.cc

5
src/node_crypto.cc

@ -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) { if (where & SSL_CB_HANDSHAKE_START) {
HandleScope scope; HandleScope scope;
Connection* c = static_cast<Connection*>(SSL_get_app_data(ssl)); Connection* c = static_cast<Connection*>(SSL_get_app_data(ssl));

Loading…
Cancel
Save