Skip to content

Commit 6cb4e9d

Browse files
crypto.constants are missing #159 (#164)
* crypto.constants are missing #159 According to https://nodejs.org/dist/latest-v6.x/docs/api/crypto.html#crypto_crypto_constants I should be able to use crypto.constants.RSA_PKCS1_OAEP_PADDING with privateDecrypt. Instead of using the constant I used it's value (4) instead and it works fine. For now this includes only the constants of `Other OpenSSL Constants` * update the tests * further update tests
1 parent eea13e5 commit 6cb4e9d

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

.travis.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ sudo: false
22
language: node_js
33
matrix:
44
include:
5-
- node_js: '0.10'
6-
env: TEST_SUITE=unit
75
- node_js: '0.11'
86
env: TEST_SUITE=unit
97
- node_js: '0.12'
@@ -15,15 +13,13 @@ matrix:
1513
- node_js: '4'
1614
env: TEST_SUITE=browser BROWSER_NAME=ie BROWSER_VERSION="10..latest"
1715
- node_js: '4'
18-
env: TEST_SUITE=browser BROWSER_NAME=chrome BROWSER_VERSION="44..beta"
19-
- node_js: '4'
20-
env: TEST_SUITE=browser BROWSER_NAME=firefox BROWSER_VERSION="40..latest"
16+
env: TEST_SUITE=browser BROWSER_NAME=chrome BROWSER_VERSION="-2..beta"
2117
- node_js: '4'
22-
env: TEST_SUITE=browser BROWSER_NAME=iphone BROWSER_VERSION="8.0..latest"
18+
env: TEST_SUITE=browser BROWSER_NAME=firefox BROWSER_VERSION="-2..latest"
2319
- node_js: '4'
2420
env: TEST_SUITE=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest"
2521
- node_js: '4'
26-
env: TEST_SUITE=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest"
22+
env: TEST_SUITE=browser BROWSER_NAME=android BROWSER_VERSION="5.0..latest"
2723
script: "npm run-script $TEST_SUITE"
2824
env:
2925
global:

index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,22 @@ var publicEncrypt = require('public-encrypt')
7575
].join('\n'))
7676
}
7777
})
78+
79+
exports.constants = {
80+
'DH_CHECK_P_NOT_SAFE_PRIME': 2,
81+
'DH_CHECK_P_NOT_PRIME': 1,
82+
'DH_UNABLE_TO_CHECK_GENERATOR': 4,
83+
'DH_NOT_SUITABLE_GENERATOR': 8,
84+
'NPN_ENABLED': 1,
85+
'ALPN_ENABLED': 1,
86+
'RSA_PKCS1_PADDING': 1,
87+
'RSA_SSLV23_PADDING': 2,
88+
'RSA_NO_PADDING': 3,
89+
'RSA_PKCS1_OAEP_PADDING': 4,
90+
'RSA_X931_PADDING': 5,
91+
'RSA_PKCS1_PSS_PADDING': 6,
92+
'POINT_CONVERSION_COMPRESSED': 2,
93+
'POINT_CONVERSION_UNCOMPRESSED': 4,
94+
'POINT_CONVERSION_HYBRID': 6
95+
}
96+

0 commit comments

Comments
 (0)