@@ -39,12 +39,12 @@ function test(
3939 }
4040
4141 const data = Buffer . from ( 'Hello world' ) ;
42- const signature = crypto . sign ( algorithm , data , privateKey ) ;
42+ const expected = crypto . sign ( algorithm , data , privateKey ) ;
4343
4444 for ( const key of [ privatePem , privateKey , privateDer ] ) {
4545 crypto . sign ( algorithm , data , key , common . mustSucceed ( ( actual ) => {
4646 if ( deterministic ) {
47- assert . deepStrictEqual ( actual , signature ) ;
47+ assert . deepStrictEqual ( actual , expected ) ;
4848 }
4949
5050 assert . strictEqual (
@@ -53,7 +53,7 @@ function test(
5353 }
5454
5555 for ( const key of [ publicPem , publicKey , publicDer ] ) {
56- crypto . verify ( algorithm , data , key , signature , common . mustSucceed (
56+ crypto . verify ( algorithm , data , key , expected , common . mustSucceed (
5757 ( verified ) => assert . strictEqual ( verified , true ) ) ) ;
5858
5959 crypto . verify ( algorithm , data , key , Buffer . from ( '' ) , common . mustSucceed (
@@ -62,7 +62,7 @@ function test(
6262}
6363
6464// RSA w/ default padding
65- test ( 'rsa_public.pem' , 'rsa_private.pem' , 'sha256' , true ) ,
65+ test ( 'rsa_public.pem' , 'rsa_private.pem' , 'sha256' , true ) ;
6666test ( 'rsa_public.pem' , 'rsa_private.pem' , 'sha256' , true ,
6767 { padding : crypto . constants . RSA_PKCS1_PADDING } ) ;
6868
@@ -76,20 +76,20 @@ test('rsa_public.pem', 'rsa_private.pem', 'sha256', false,
7676 } ) ;
7777
7878// RSA w/ PSS_PADDING and PSS_SALTLEN_DIGEST
79- test ( 'rsa_public.pem' , 'rsa_private.pem' , 'sha256' , false ,
80- {
81- padding : crypto . constants . RSA_PKCS1_PSS_PADDING ,
82- saltLength : crypto . constants . RSA_PSS_SALTLEN_DIGEST
83- } ) ;
79+ // test('rsa_public.pem', 'rsa_private.pem', 'sha256', false,
80+ // {
81+ // padding: crypto.constants.RSA_PKCS1_PSS_PADDING,
82+ // saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST
83+ // });
8484
8585// ED25519
86- test ( 'ed25519_public.pem' , 'ed25519_private.pem' , undefined , true ) ,
86+ test ( 'ed25519_public.pem' , 'ed25519_private.pem' , undefined , true ) ;
8787// ED448
88- test ( 'ed448_public.pem' , 'ed448_private.pem' , undefined , true ) ,
88+ test ( 'ed448_public.pem' , 'ed448_private.pem' , undefined , true ) ;
8989
9090// ECDSA w/ der signature encoding
9191test ( 'ec_secp256k1_public.pem' , 'ec_secp256k1_private.pem' , 'sha384' ,
92- false ) ,
92+ false ) ;
9393test ( 'ec_secp256k1_public.pem' , 'ec_secp256k1_private.pem' , 'sha384' ,
9494 false , { dsaEncoding : 'der' } ) ;
9595
0 commit comments