mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
crypto: don't use transitionary ThrowException
Since the current environment is in scope use ThrowError on that, instead of having to lookup the Environment again. Added benefit, lint the source code. Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
This commit is contained in:
1 parent
bb1f68f9d6
commit
efe1781f3d
1 file changed
+3
-3
+3
-3
@@ -344,19 +344,19 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) {
|
||||
#ifndef OPENSSL_NO_SSL3
|
||||
method = SSLv3_method();
|
||||
#else
|
||||
return ThrowException(Exception::Error(String::New("SSLv3 methods disabled")));
|
||||
return env->ThrowError("SSLv3 methods disabled");
|
||||
#endif
|
||||
} else if (strcmp(*sslmethod, "SSLv3_server_method") == 0) {
|
||||
#ifndef OPENSSL_NO_SSL3
|
||||
method = SSLv3_server_method();
|
||||
#else
|
||||
return ThrowException(Exception::Error(String::New("SSLv3 methods disabled")));
|
||||
return env->ThrowError("SSLv3 methods disabled");
|
||||
#endif
|
||||
} else if (strcmp(*sslmethod, "SSLv3_client_method") == 0) {
|
||||
#ifndef OPENSSL_NO_SSL3
|
||||
method = SSLv3_client_method();
|
||||
#else
|
||||
return ThrowException(Exception::Error(String::New("SSLv3 methods disabled")));
|
||||
return env->ThrowError("SSLv3 methods disabled");
|
||||
#endif
|
||||
} else if (strcmp(*sslmethod, "SSLv23_method") == 0) {
|
||||
method = SSLv23_method();
|
||||
|
||||
Reference in new issue
Block a user