Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

openssl 1.0.0 constification

  • Loading branch information...
commit 7a34afba773a09c7862759872905657ec9629351 1 parent 40820ec
@blazzy blazzy authored ry committed
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/node_crypto.cc
View
10 src/node_crypto.cc
@@ -9,6 +9,12 @@
#include <errno.h>
+#if OPENSSL_VERSION_NUMBER >= 0x1000000fL
+# define OPENSSL_CONST const
+#else
+# define OPENSSL_CONST
+#endif
+
namespace node {
using namespace v8;
@@ -383,7 +389,7 @@ Handle<Value> SecureContext::Init(const Arguments& args) {
SecureContext *sc = ObjectWrap::Unwrap<SecureContext>(args.Holder());
- SSL_METHOD *method = SSLv23_method();
+ OPENSSL_CONST SSL_METHOD *method = SSLv23_method();
if (args.Length() == 1) {
if (!args[0]->IsString())
@@ -901,7 +907,7 @@ Handle<Value> SecureStream::GetCurrentCipher(const Arguments& args) {
HandleScope scope;
SecureStream *ss = ObjectWrap::Unwrap<SecureStream>(args.Holder());
- SSL_CIPHER *c;
+ OPENSSL_CONST SSL_CIPHER *c;
if ( ss->pSSL == NULL ) return Undefined();
c = SSL_get_current_cipher(ss->pSSL);
Please sign in to comment.
Something went wrong with that request. Please try again.