| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 786ed4d commit db5ee23
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -226,7 +226,7 @@ assert.throws(() => { | |||
| 226 | 226 | crypto.generateKeyPairSync('ec', { namedCurve: not256k1 })); | |
| 227 | 227 | }, common.hasOpenSSL3 ? { | |
| 228 | 228 | name: 'Error', | |
| 229 | - code: 'ERR_OSSL_EC_INCOMPATIBLE_OBJECTS' | ||
| 229 | + code: 'ERR_OSSL_MISMATCHING_SHARED_PARAMETERS' | ||
| 230 | 230 | } : { | |
| 231 | 231 | name: 'Error', | |
| 232 | 232 | code: 'ERR_OSSL_EVP_DIFFERENT_PARAMETERS' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -328,7 +328,10 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem', | |||
| 328 | 328 | type: 'pkcs1' | |
| 329 | 329 | }); | |
| 330 | 330 | createPrivateKey({ key, format: 'der', type: 'pkcs1' }); | |
| 331 | - }, { | ||
| 331 | + }, common.hasOpenSSL3 ? { | ||
| 332 | + message: /error:1E08010C:DECODER routines::unsupported/, | ||
| 333 | + library: 'DECODER routines' | ||
| 334 | + } : { | ||
| 332 | 335 | message: /asn1 encoding/, | |
| 333 | 336 | library: 'asn1 encoding routines' | |
| 334 | 337 | }); | |
@@ -514,7 +517,8 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem', | |||
| 514 | 517 | // Reading an encrypted key without a passphrase should fail. | |
| 515 | 518 | assert.throws(() => createPrivateKey(privateDsa), common.hasOpenSSL3 ? { | |
| 516 | 519 | name: 'Error', | |
| 517 | - message: 'Failed to read private key', | ||
| 520 | + message: 'error:07880109:common libcrypto routines::interrupted or ' + | ||
| 521 | + 'cancelled', | ||
| 518 | 522 | } : { | |
| 519 | 523 | name: 'TypeError', | |
| 520 | 524 | code: 'ERR_MISSING_PASSPHRASE', | |
@@ -540,7 +544,7 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem', | |||
| 540 | 544 | passphrase: Buffer.alloc(1024, 'a') | |
| 541 | 545 | }), { | |
| 542 | 546 | message: common.hasOpenSSL3 ? | |
| 543 | - 'Failed to read private key' : | ||
| 547 | + 'error:07880109:common libcrypto routines::interrupted or cancelled' : | ||
| 544 | 548 | /bad decrypt/ | |
| 545 | 549 | }); | |
| 546 | 550 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -213,7 +213,8 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher); | |||
| 213 | 213 | const publicKey = { key: publicKeyDER, ...publicKeyEncoding }; | |
| 214 | 214 | const expectedError = common.hasOpenSSL3 ? { | |
| 215 | 215 | name: 'Error', | |
| 216 | - message: 'Failed to read private key' | ||
| 216 | + message: 'error:07880109:common libcrypto routines::interrupted or ' + | ||
| 217 | + 'cancelled' | ||
| 217 | 218 | } : { | |
| 218 | 219 | name: 'TypeError', | |
| 219 | 220 | code: 'ERR_MISSING_PASSPHRASE', | |
@@ -477,7 +478,8 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher); | |||
| 477 | 478 | // Since the private key is encrypted, signing shouldn't work anymore. | |
| 478 | 479 | assert.throws(() => testSignVerify(publicKey, privateKey), | |
| 479 | 480 | common.hasOpenSSL3 ? { | |
| 480 | - message: 'Failed to read private key' | ||
| 481 | + message: 'error:07880109:common libcrypto ' + | ||
| 482 | + 'routines::interrupted or cancelled' | ||
| 481 | 483 | } : { | |
| 482 | 484 | name: 'TypeError', | |
| 483 | 485 | code: 'ERR_MISSING_PASSPHRASE', | |
@@ -510,7 +512,8 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher); | |||
| 510 | 512 | // Since the private key is encrypted, signing shouldn't work anymore. | |
| 511 | 513 | assert.throws(() => testSignVerify(publicKey, privateKey), | |
| 512 | 514 | common.hasOpenSSL3 ? { | |
| 513 | - message: 'Failed to read private key' | ||
| 515 | + message: 'error:07880109:common libcrypto ' + | ||
| 516 | + 'routines::interrupted or cancelled' | ||
| 514 | 517 | } : { | |
| 515 | 518 | name: 'TypeError', | |
| 516 | 519 | code: 'ERR_MISSING_PASSPHRASE', | |
@@ -546,7 +549,8 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher); | |||
| 546 | 549 | // Since the private key is encrypted, signing shouldn't work anymore. | |
| 547 | 550 | assert.throws(() => testSignVerify(publicKey, privateKey), | |
| 548 | 551 | common.hasOpenSSL3 ? { | |
| 549 | - message: 'Failed to read private key' | ||
| 552 | + message: 'error:07880109:common libcrypto ' + | ||
| 553 | + 'routines::interrupted or cancelled' | ||
| 550 | 554 | } : { | |
| 551 | 555 | name: 'TypeError', | |
| 552 | 556 | code: 'ERR_MISSING_PASSPHRASE', | |
@@ -583,7 +587,8 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher); | |||
| 583 | 587 | // Since the private key is encrypted, signing shouldn't work anymore. | |
| 584 | 588 | assert.throws(() => testSignVerify(publicKey, privateKey), | |
| 585 | 589 | common.hasOpenSSL3 ? { | |
| 586 | - message: 'Failed to read private key' | ||
| 590 | + message: 'error:07880109:common libcrypto ' + | ||
| 591 | + 'routines::interrupted or cancelled' | ||
| 587 | 592 | } : { | |
| 588 | 593 | name: 'TypeError', | |
| 589 | 594 | code: 'ERR_MISSING_PASSPHRASE', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,6 +35,7 @@ function decrypt(key) { | |||
| 35 | 35 | ||
| 36 | 36 | decrypt(pkey); | |
| 37 | 37 | assert.throws(() => decrypt(pkeyEncrypted), common.hasOpenSSL3 ? | |
| 38 | - { message: 'Failed to read asymmetric key' } : | ||
| 38 | + { message: 'error:07880109:common libcrypto routines::interrupted or ' + | ||
| 39 | + 'cancelled' } : | ||
| 39 | 40 | { code: 'ERR_MISSING_PASSPHRASE' }); | |
| 40 | 41 | decrypt(pkey); // Should not throw. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,10 +37,11 @@ const openssl1DecryptError = { | |||
| 37 | 37 | }; | |
| 38 | 38 | ||
| 39 | 39 | const decryptError = common.hasOpenSSL3 ? | |
| 40 | - { message: 'Failed to read asymmetric key' } : openssl1DecryptError; | ||
| 40 | + { message: 'error:1C800064:Provider routines::bad decrypt' } : | ||
| 41 | + openssl1DecryptError; | ||
| 41 | 42 | ||
| 42 | 43 | const decryptPrivateKeyError = common.hasOpenSSL3 ? { | |
| 43 | - message: 'Failed to read private key', | ||
| 44 | + message: 'error:1C800064:Provider routines::bad decrypt', | ||
| 44 | 45 | } : openssl1DecryptError; | |
| 45 | 46 | ||
| 46 | 47 | function getBufferCopy(buf) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -44,9 +44,7 @@ const keySize = 2048; | |||
| 44 | 44 | `-----BEGIN RSA PRIVATE KEY----- | |
| 45 | 45 | AAAAAAAAAAAA | |
| 46 | 46 | -----END RSA PRIVATE KEY-----`); | |
| 47 | - }, { message: common.hasOpenSSL3 ? | ||
| 48 | - 'Failed to read private key' : | ||
| 49 | - 'bye, bye, library' }); | ||
| 47 | + }, { message: 'bye, bye, library' }); | ||
| 50 | 48 | ||
| 51 | 49 | delete Object.prototype.library; | |
| 52 | 50 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -224,7 +224,7 @@ server.listen(0, common.mustCall(function() { | |||
| 224 | 224 | })).unref(); | |
| 225 | 225 | ||
| 226 | 226 | const errMessagePassword = common.hasOpenSSL3 ? | |
| 227 | - /Error: PEM_read_bio_PrivateKey/ : /bad decrypt/; | ||
| 227 | + /Error: error:1400006B:UI routines::processing error/ : /bad decrypt/; | ||
| 228 | 228 | ||
| 229 | 229 | // Missing passphrase | |
| 230 | 230 | assert.throws(function() { | |
@@ -254,8 +254,7 @@ assert.throws(function() { | |||
| 254 | 254 | }); | |
| 255 | 255 | }, errMessagePassword); | |
| 256 | 256 | ||
| 257 | - const errMessageDecrypt = common.hasOpenSSL3 ? | ||
| 258 | - /Error: PEM_read_bio_PrivateKey/ : /bad decrypt/; | ||
| 257 | + const errMessageDecrypt = /bad decrypt/; | ||
| 259 | 258 | ||
| 260 | 259 | // Invalid passphrase | |
| 261 | 260 | assert.throws(function() { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments