@electerm/ssh2 1.10.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
#include <string.h>
|
|
11
11
|
#include <assert.h>
|
|
12
12
|
|
|
13
|
+
DISABLE_WCAST_FUNCTION_TYPE
|
|
13
14
|
#include <node.h>
|
|
14
15
|
#include <node_buffer.h>
|
|
15
|
-
DISABLE_WCAST_FUNCTION_TYPE
|
|
16
16
|
#include <nan.h>
|
|
17
17
|
DISABLE_WCAST_FUNCTION_TYPE_END
|
|
18
18
|
|
|
@@ -2221,37 +2221,45 @@ NAN_MODULE_INIT(init) {
|
|
|
2221
2221
|
#else
|
|
2222
2222
|
# define load_sym(name) dlsym(RTLD_DEFAULT, name)
|
|
2223
2223
|
#endif
|
|
2224
|
-
ctx_iv_len = reinterpret_cast<ctx_iv_len_func>(
|
|
2225
|
-
load_sym("EVP_CIPHER_CTX_get_iv_length")
|
|
2226
|
-
);
|
|
2227
2224
|
if (!ctx_iv_len) {
|
|
2228
2225
|
ctx_iv_len = reinterpret_cast<ctx_iv_len_func>(
|
|
2229
|
-
load_sym("
|
|
2226
|
+
load_sym("EVP_CIPHER_CTX_get_iv_length")
|
|
2230
2227
|
);
|
|
2228
|
+
if (!ctx_iv_len) {
|
|
2229
|
+
ctx_iv_len = reinterpret_cast<ctx_iv_len_func>(
|
|
2230
|
+
load_sym("EVP_CIPHER_CTX_iv_length")
|
|
2231
|
+
);
|
|
2232
|
+
}
|
|
2231
2233
|
}
|
|
2232
|
-
ctx_key_len = reinterpret_cast<ctx_key_len_func>(
|
|
2233
|
-
load_sym("EVP_CIPHER_CTX_get_key_length")
|
|
2234
|
-
);
|
|
2235
2234
|
if (!ctx_key_len) {
|
|
2236
2235
|
ctx_key_len = reinterpret_cast<ctx_key_len_func>(
|
|
2237
|
-
load_sym("
|
|
2236
|
+
load_sym("EVP_CIPHER_CTX_get_key_length")
|
|
2238
2237
|
);
|
|
2238
|
+
if (!ctx_key_len) {
|
|
2239
|
+
ctx_key_len = reinterpret_cast<ctx_key_len_func>(
|
|
2240
|
+
load_sym("EVP_CIPHER_CTX_key_length")
|
|
2241
|
+
);
|
|
2242
|
+
}
|
|
2239
2243
|
}
|
|
2240
|
-
cipher_flags = reinterpret_cast<cipher_flags_func>(
|
|
2241
|
-
load_sym("EVP_CIPHER_get_flags")
|
|
2242
|
-
);
|
|
2243
2244
|
if (!cipher_flags) {
|
|
2244
2245
|
cipher_flags = reinterpret_cast<cipher_flags_func>(
|
|
2245
|
-
load_sym("
|
|
2246
|
+
load_sym("EVP_CIPHER_get_flags")
|
|
2246
2247
|
);
|
|
2248
|
+
if (!cipher_flags) {
|
|
2249
|
+
cipher_flags = reinterpret_cast<cipher_flags_func>(
|
|
2250
|
+
load_sym("EVP_CIPHER_flags")
|
|
2251
|
+
);
|
|
2252
|
+
}
|
|
2247
2253
|
}
|
|
2248
|
-
ctx_get_block_size = reinterpret_cast<ctx_get_block_size_func>(
|
|
2249
|
-
load_sym("EVP_CIPHER_CTX_get_block_size")
|
|
2250
|
-
);
|
|
2251
2254
|
if (!ctx_get_block_size) {
|
|
2252
2255
|
ctx_get_block_size = reinterpret_cast<ctx_get_block_size_func>(
|
|
2253
|
-
load_sym("
|
|
2256
|
+
load_sym("EVP_CIPHER_CTX_get_block_size")
|
|
2254
2257
|
);
|
|
2258
|
+
if (!ctx_get_block_size) {
|
|
2259
|
+
ctx_get_block_size = reinterpret_cast<ctx_get_block_size_func>(
|
|
2260
|
+
load_sym("EVP_CIPHER_CTX_block_size")
|
|
2261
|
+
);
|
|
2262
|
+
}
|
|
2255
2263
|
}
|
|
2256
2264
|
|
|
2257
2265
|
ChaChaPolyCipher::Init(target);
|
|
@@ -2264,5 +2272,5 @@ NAN_MODULE_INIT(init) {
|
|
|
2264
2272
|
}
|
|
2265
2273
|
|
|
2266
2274
|
DISABLE_WCAST_FUNCTION_TYPE
|
|
2267
|
-
|
|
2275
|
+
NAN_MODULE_WORKER_ENABLED(sshcrypto, init)
|
|
2268
2276
|
DISABLE_WCAST_FUNCTION_TYPE_END
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@electerm/ssh2",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"author": "Brian White <mscdex@mscdex.net>",
|
|
5
5
|
"description": "SSH2 client and server modules written in pure JavaScript for node.js",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"bcrypt-pbkdf": "^1.0.2"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@mscdex/eslint-config": "^1.
|
|
15
|
+
"@mscdex/eslint-config": "^1.1.0",
|
|
16
16
|
"eslint": "^7.0.0"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|