File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 66 tests :
77 uses : ljharb/actions/.github/workflows/node.yml@main
88 with :
9- range : ' 0.12 - 10'
9+ range : ' 0.10 - 10'
1010 type : minors
1111 command : npm run tests-only
1212
Original file line number Diff line number Diff line change 4848 },
4949 "browser" : " browser/index.js" ,
5050 "engines" : {
51- "node" : " >= 0.12 "
51+ "node" : " >= 0.10 "
5252 },
5353 "auto-changelog" : {
5454 "output" : " CHANGELOG.md" ,
Original file line number Diff line number Diff line change @@ -11,12 +11,18 @@ var parseKeys = require('parse-asn1');
1111var bCrypto = require ( '../browser' ) ;
1212var fixtures = require ( './fixtures' ) ;
1313
14+ var supportsPassphrases = semver . satisfies ( process . versions . node , '>= 0.11.8' ) ;
15+
1416fixtures . valid . rsa . forEach ( function ( f ) {
1517 var message = Buffer . from ( f . message ) ;
1618 var pub = Buffer . from ( f [ 'public' ] , 'base64' ) ;
1719 var priv ;
1820
1921 if ( f . passphrase ) {
22+ if ( ! supportsPassphrases ) {
23+ console . info ( 'skipping passphrase test on a node version that lacks support for it' ) ;
24+ return ;
25+ }
2026 priv = {
2127 key : Buffer . from ( f [ 'private' ] , 'base64' ) ,
2228 passphrase : f . passphrase
@@ -96,6 +102,10 @@ fixtures.valid.ec.forEach(function (f) {
96102 var priv ;
97103
98104 if ( f . passphrase ) {
105+ if ( ! supportsPassphrases ) {
106+ console . info ( 'skipping passphrase test on a node version that lacks support for it' ) ;
107+ return ;
108+ }
99109 priv = {
100110 key : Buffer . from ( f [ 'private' ] , 'base64' ) ,
101111 passphrase : f . passphrase
You can’t perform that action at this time.
0 commit comments