Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures with openssl 3.0.0 alpha 15 (quictls fork) #38373

Closed
richardlau opened this issue Apr 23, 2021 · 1 comment · Fixed by #38451
Closed

Test failures with openssl 3.0.0 alpha 15 (quictls fork) #38373

richardlau opened this issue Apr 23, 2021 · 1 comment · Fixed by #38451
Assignees

Comments

@richardlau
Copy link
Member

While testing nodejs/build#2613 it looks like a number of tests fail when dynamically linking Node.js (88bc864) against https://github.com/quictls/openssl/tree/openssl-3.0.0-alpha15%2Bquic

These are not showing up on the CI yet because the openssl300 job is currently dynamically linking against openssl3.0.0-alpha14 (the previous alpha of the non-forked version).

cc @nodejs/crypto @jasnell

I've opened #38372 for parallel/test-process-versions.

=== release test-crypto-async-sign-verify ===
Path: parallel/test-crypto-async-sign-verify
--- stderr ---
node:internal/crypto/sig:167
  const job = new SignJob(
              ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at Object.signOneShot [as sign] (node:internal/crypto/sig:167:15)
    at test (/home/iojs/node/test/parallel/test-crypto-async-sign-verify.js:46:12)
    at Object.<anonymous> (/home/iojs/node/test/parallel/test-crypto-async-sign-verify.js:68:1)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Function.Module._load (node:internal/modules/cjs/loader:828:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-crypto-async-sign-verify.js
=== release test-crypto-dh-stateless ===
Path: parallel/test-crypto-dh-stateless
--- stderr ---
node:internal/crypto/keys:637
    handle.init(kKeyTypePrivate, data, format, type, passphrase);
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at Object.createPrivateKey (node:internal/crypto/keys:637:12)
    at Object.<anonymous> (/home/iojs/node/test/parallel/test-crypto-dh-stateless.js:46:32)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Function.Module._load (node:internal/modules/cjs/loader:828:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-crypto-dh-stateless.js
=== release test-crypto-key-objects ===
Path: parallel/test-crypto-key-objects
--- stderr ---
node:assert:648
      throw err;
      ^

AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected

  Comparison {
+   library: 'DECODER routines',
+   message: 'error:1E08010C:DECODER routines::unsupported'
-   library: 'asn1 encoding routines',
-   message: /asn1 encoding/
  }
    at Object.<anonymous> (/home/iojs/node/test/parallel/test-crypto-key-objects.js:315:10)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Function.Module._load (node:internal/modules/cjs/loader:828:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: Error: error:1E08010C:DECODER routines::unsupported
      at createPrivateKey (node:internal/crypto/keys:637:12)
      at assert.throws.message (/home/iojs/node/test/parallel/test-crypto-key-objects.js:320:5)
      at getActual (node:assert:769:5)
      at Function.throws (node:assert:915:24)
      at Object.<anonymous> (/home/iojs/node/test/parallel/test-crypto-key-objects.js:315:10)
      at Module._compile (node:internal/modules/cjs/loader:1108:14)
      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
      at Module.load (node:internal/modules/cjs/loader:988:32)
      at Function.Module._load (node:internal/modules/cjs/loader:828:14)
      at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
    opensslErrorStack: [
      'error:0688010A:asn1 encoding routines::nested asn1 error',
      'error:0688010A:asn1 encoding routines::nested asn1 error',
      'error:068000A8:asn1 encoding routines::wrong tag',
      'error:0688010A:asn1 encoding routines::nested asn1 error',
      'error:068000DF:asn1 encoding routines::too large'
    ],
    library: 'DECODER routines',
    reason: 'unsupported',
    code: 'ERR_OSSL_UNSUPPORTED'
  },
  expected: { message: /asn1 encoding/, library: 'asn1 encoding routines' },
  operator: 'throws'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-crypto-key-objects.js
=== release test-crypto-keygen ===
Path: parallel/test-crypto-keygen
--- stderr ---
node:internal/crypto/cipher:80
    return method(data, format, type, passphrase, buffer, padding, oaepHash,
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at node:internal/crypto/cipher:80:12
    at testEncryptDecrypt (/home/iojs/node/test/parallel/test-crypto-keygen.js:41:22)
    at Object.<anonymous> (/home/iojs/node/test/parallel/test-crypto-keygen.js:114:3)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Function.Module._load (node:internal/modules/cjs/loader:828:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-crypto-keygen.js
=== release test-crypto-private-decrypt-gh32240 ===
Path: parallel/test-crypto-private-decrypt-gh32240
--- stderr ---
node:assert:648
      throw err;
      ^

AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected

  Comparison {
+   message: 'error:07880109:common libcrypto routines::interrupted or cancelled'
-   message: 'Failed to read asymmetric key'
  }
    at Object.<anonymous> (/home/iojs/node/test/parallel/test-crypto-private-decrypt-gh32240.js:37:8)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Function.Module._load (node:internal/modules/cjs/loader:828:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: Error: error:07880109:common libcrypto routines::interrupted or cancelled
      at node:internal/crypto/cipher:80:12
      at decrypt (/home/iojs/node/test/parallel/test-crypto-private-decrypt-gh32240.js:32:21)
      at assert.throws.common.hasOpenSSL3.message (/home/iojs/node/test/parallel/test-crypto-private-decrypt-gh32240.js:37:21)
      at getActual (node:assert:769:5)
      at Function.throws (node:assert:915:24)
      at Object.<anonymous> (/home/iojs/node/test/parallel/test-crypto-private-decrypt-gh32240.js:37:8)
      at Module._compile (node:internal/modules/cjs/loader:1108:14)
      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
      at Module.load (node:internal/modules/cjs/loader:988:32)
      at Function.Module._load (node:internal/modules/cjs/loader:828:14) {
    opensslErrorStack: [
      'error:1E08010C:DECODER routines::unsupported',
      'error:04800068:PEM routines::bad password read'
    ],
    library: 'common libcrypto routines',
    reason: 'interrupted or cancelled',
    code: 'ERR_OSSL_CRYPTO_INTERRUPTED_OR_CANCELLED'
  },
  expected: { message: 'Failed to read asymmetric key' },
  operator: 'throws'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-crypto-private-decrypt-gh32240.js
=== release test-crypto-rsa-dsa ===
Path: parallel/test-crypto-rsa-dsa
--- stderr ---
node:internal/crypto/cipher:80
    return method(data, format, type, passphrase, buffer, padding, oaepHash,
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at Object.privateDecrypt (node:internal/crypto/cipher:80:12)
    at Object.<anonymous> (/home/iojs/node/test/parallel/test-crypto-rsa-dsa.js:78:28)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Function.Module._load (node:internal/modules/cjs/loader:828:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-crypto-rsa-dsa.js
=== release test-crypto-sign-verify ===
Path: parallel/test-crypto-sign-verify
--- stderr ---
node:assert:648
      throw err;
      ^

AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected

  Comparison {
+   message: 'bye, bye, library'
-   message: 'Failed to read private key'
  }
    at Object.<anonymous> (/home/iojs/node/test/parallel/test-crypto-sign-verify.js:42:10)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Function.Module._load (node:internal/modules/cjs/loader:828:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: Error: bye, bye, library
      at Error.set (/home/iojs/node/test/parallel/test-crypto-sign-verify.js:37:13)
      at Sign.sign (node:internal/crypto/sig:131:29)
      at assert.throws.message (/home/iojs/node/test/parallel/test-crypto-sign-verify.js:43:31)
      at getActual (node:assert:769:5)
      at Function.throws (node:assert:915:24)
      at Object.<anonymous> (/home/iojs/node/test/parallel/test-crypto-sign-verify.js:42:10)
      at Module._compile (node:internal/modules/cjs/loader:1108:14)
      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
      at Module.load (node:internal/modules/cjs/loader:988:32)
      at Function.Module._load (node:internal/modules/cjs/loader:828:14),
  expected: { message: 'Failed to read private key' },
  operator: 'throws'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-crypto-sign-verify.js
=== release test-process-versions ===
Path: parallel/test-process-versions
--- stderr ---
node:assert:412
    throw err;
    ^

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(versionRegex.test(process.versions.openssl))

    at Object.<anonymous> (/home/iojs/node/test/parallel/test-process-versions.js:59:3)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Function.Module._load (node:internal/modules/cjs/loader:828:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '=='
}
Command: out/Release/node /home/iojs/node/test/parallel/test-process-versions.js
=== release test-tls-passphrase ===
Path: parallel/test-tls-passphrase
--- stderr ---
node:assert:762
    throw err;
    ^

AssertionError [ERR_ASSERTION]: The input did not match the regular expression /Error: PEM_read_bio_PrivateKey/. Input:

'Error: error:1400006B:UI routines::processing error'

    at Object.<anonymous> (/home/iojs/node/test/parallel/test-tls-passphrase.js:230:8)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Function.Module._load (node:internal/modules/cjs/loader:828:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: Error: error:1400006B:UI routines::processing error
      at setKey (node:internal/tls:114:11)
      at configSecureContext (node:internal/tls:194:7)
      at Object.createSecureContext (node:_tls_common:113:3)
      at Object.connect (node:_tls_wrap:1624:48)
      at /home/iojs/node/test/parallel/test-tls-passphrase.js:231:7
      at getActual (node:assert:769:5)
      at Function.throws (node:assert:915:24)
      at Object.<anonymous> (/home/iojs/node/test/parallel/test-tls-passphrase.js:230:8)
      at Module._compile (node:internal/modules/cjs/loader:1108:14)
      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10) {
    opensslErrorStack: [
      'error:1E08010C:DECODER routines::unsupported',
      'error:04800068:PEM routines::bad password read',
      'error:07880028:common libcrypto routines::UI lib'
    ],
    library: 'UI routines',
    reason: 'processing error',
    code: 'ERR_OSSL_UI_PROCESSING_ERROR'
  },
  expected: /Error: PEM_read_bio_PrivateKey/,
  operator: 'throws'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-tls-passphrase.js
=== release test-webcrypto-derivebits-ecdh ===
Path: parallel/test-webcrypto-derivebits-ecdh
--- stderr ---
node:internal/crypto/keys:637
    handle.init(kKeyTypePrivate, data, format, type, passphrase);
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at createPrivateKey (node:internal/crypto/keys:637:12)
    at Object.ecImportKey (node:internal/crypto/ec:297:19)
    at SubtleCrypto.importKey (node:internal/crypto/webcrypto:479:10)
    at /home/iojs/node/test/parallel/test-webcrypto-derivebits-ecdh.js:58:16
    at Array.map (<anonymous>)
    at prepareKeys (/home/iojs/node/test/parallel/test-webcrypto-derivebits-ecdh.js:53:12)
    at /home/iojs/node/test/parallel/test-webcrypto-derivebits-ecdh.js:88:22
    at Object.<anonymous> (/home/iojs/node/test/parallel/test-webcrypto-derivebits-ecdh.js:267:3)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10) {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-webcrypto-derivebits-ecdh.js
=== release test-webcrypto-derivebits-node-dh ===
Path: parallel/test-webcrypto-derivebits-node-dh
--- stderr ---
node:internal/crypto/keys:637
    handle.init(kKeyTypePrivate, data, format, type, passphrase);
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at createPrivateKey (node:internal/crypto/keys:637:12)
    at Object.dhImportKey (node:internal/crypto/diffiehellman:579:19)
    at SubtleCrypto.importKey (node:internal/crypto/webcrypto:508:10)
    at prepareKeys (/home/iojs/node/test/parallel/test-webcrypto-derivebits-node-dh.js:82:12)
    at /home/iojs/node/test/parallel/test-webcrypto-derivebits-node-dh.js:106:13
    at Object.<anonymous> (/home/iojs/node/test/parallel/test-webcrypto-derivebits-node-dh.js:219:3)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Function.Module._load (node:internal/modules/cjs/loader:828:14) {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-webcrypto-derivebits-node-dh.js
=== release test-webcrypto-derivekey-ecdh ===
Path: parallel/test-webcrypto-derivekey-ecdh
--- stderr ---
node:internal/crypto/keys:637
    handle.init(kKeyTypePrivate, data, format, type, passphrase);
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at createPrivateKey (node:internal/crypto/keys:637:12)
    at Object.ecImportKey (node:internal/crypto/ec:297:19)
    at SubtleCrypto.importKey (node:internal/crypto/webcrypto:479:10)
    at /home/iojs/node/test/parallel/test-webcrypto-derivekey-ecdh.js:53:16
    at Array.map (<anonymous>)
    at prepareKeys (/home/iojs/node/test/parallel/test-webcrypto-derivekey-ecdh.js:48:12)
    at /home/iojs/node/test/parallel/test-webcrypto-derivekey-ecdh.js:83:22
    at Object.<anonymous> (/home/iojs/node/test/parallel/test-webcrypto-derivekey-ecdh.js:246:3)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10) {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-webcrypto-derivekey-ecdh.js
=== release test-webcrypto-encrypt-decrypt-rsa ===
Path: parallel/test-webcrypto-encrypt-decrypt-rsa
--- stderr ---
node:internal/crypto/keys:637
    handle.init(kKeyTypePrivate, data, format, type, passphrase);
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at createPrivateKey (node:internal/crypto/keys:637:12)
    at Object.rsaImportKey (node:internal/crypto/rsa:267:19)
    at SubtleCrypto.importKey (node:internal/crypto/webcrypto:470:10)
    at importVectorKey (/home/iojs/node/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js:25:12)
    at testDecryption (/home/iojs/node/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js:43:13)
    at /home/iojs/node/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js:227:21
    at Array.forEach (<anonymous>)
    at /home/iojs/node/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js:226:11
    at Object.<anonymous> (/home/iojs/node/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js:238:3)
    at Module._compile (node:internal/modules/cjs/loader:1108:14) {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-webcrypto-encrypt-decrypt-rsa.js
=== release test-webcrypto-export-import ===
Path: parallel/test-webcrypto-export-import
--- stderr ---
node:internal/crypto/keys:637
    handle.init(kKeyTypePrivate, data, format, type, passphrase);
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at createPrivateKey (node:internal/crypto/keys:637:12)
    at Object.ecImportKey (node:internal/crypto/ec:297:19)
    at SubtleCrypto.importKey (node:internal/crypto/webcrypto:479:10)
    at test (/home/iojs/node/test/parallel/test-webcrypto-export-import.js:237:14) {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-webcrypto-export-import.js
=== release test-webcrypto-export-import-dsa ===
Path: parallel/test-webcrypto-export-import-dsa
--- stderr ---
node:internal/crypto/keys:637
    handle.init(kKeyTypePrivate, data, format, type, passphrase);
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at createPrivateKey (node:internal/crypto/keys:637:12)
    at Object.dsaImportKey (node:internal/crypto/dsa:171:19)
    at SubtleCrypto.importKey (node:internal/crypto/webcrypto:505:10)
    at testImportPkcs8 (/home/iojs/node/test/parallel/test-webcrypto-export-import-dsa.js:85:28)
    at /home/iojs/node/test/parallel/test-webcrypto-export-import-dsa.js:128:27
    at Array.forEach (<anonymous>)
    at /home/iojs/node/test/parallel/test-webcrypto-export-import-dsa.js:126:21
    at Array.forEach (<anonymous>)
    at /home/iojs/node/test/parallel/test-webcrypto-export-import-dsa.js:125:21
    at Array.forEach (<anonymous>) {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-webcrypto-export-import-dsa.js
=== release test-webcrypto-export-import-ec ===
Path: parallel/test-webcrypto-export-import-ec
--- stderr ---
node:internal/crypto/keys:637
    handle.init(kKeyTypePrivate, data, format, type, passphrase);
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at createPrivateKey (node:internal/crypto/keys:637:12)
    at Object.ecImportKey (node:internal/crypto/ec:297:19)
    at SubtleCrypto.importKey (node:internal/crypto/webcrypto:479:10)
    at testImportPkcs8 (/home/iojs/node/test/parallel/test-webcrypto-export-import-ec.js:141:28)
    at /home/iojs/node/test/parallel/test-webcrypto-export-import-ec.js:269:20
    at Array.forEach (<anonymous>)
    at /home/iojs/node/test/parallel/test-webcrypto-export-import-ec.js:267:21
    at Array.forEach (<anonymous>)
    at /home/iojs/node/test/parallel/test-webcrypto-export-import-ec.js:266:12
    at Array.forEach (<anonymous>) {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-webcrypto-export-import-ec.js
=== release test-webcrypto-export-import-rsa ===
Path: parallel/test-webcrypto-export-import-rsa
--- stderr ---
node:internal/crypto/keys:637
    handle.init(kKeyTypePrivate, data, format, type, passphrase);
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at createPrivateKey (node:internal/crypto/keys:637:12)
    at Object.rsaImportKey (node:internal/crypto/rsa:267:19)
    at SubtleCrypto.importKey (node:internal/crypto/webcrypto:470:10)
    at testImportPkcs8 (/home/iojs/node/test/parallel/test-webcrypto-export-import-rsa.js:335:28)
    at /home/iojs/node/test/parallel/test-webcrypto-export-import-rsa.js:473:27
    at Array.forEach (<anonymous>)
    at /home/iojs/node/test/parallel/test-webcrypto-export-import-rsa.js:471:21
    at Array.forEach (<anonymous>)
    at /home/iojs/node/test/parallel/test-webcrypto-export-import-rsa.js:470:21
    at Array.forEach (<anonymous>) {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-webcrypto-export-import-rsa.js
=== release test-webcrypto-rsa-pss-params ===
Path: parallel/test-webcrypto-rsa-pss-params
--- stderr ---
node:internal/crypto/keys:637
    handle.init(kKeyTypePrivate, data, format, type, passphrase);
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at createPrivateKey (node:internal/crypto/keys:637:12)
    at Object.<anonymous> (/home/iojs/node/test/parallel/test-webcrypto-rsa-pss-params.js:21:17)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Function.Module._load (node:internal/modules/cjs/loader:828:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-webcrypto-rsa-pss-params.js
=== release test-webcrypto-sign-verify-ecdsa ===
Path: parallel/test-webcrypto-sign-verify-ecdsa
--- stderr ---
node:internal/crypto/keys:637
    handle.init(kKeyTypePrivate, data, format, type, passphrase);
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at createPrivateKey (node:internal/crypto/keys:637:12)
    at Object.ecImportKey (node:internal/crypto/ec:297:19)
    at SubtleCrypto.importKey (node:internal/crypto/webcrypto:479:10)
    at testVerify (/home/iojs/node/test/parallel/test-webcrypto-sign-verify-ecdsa.js:39:12)
    at /home/iojs/node/test/parallel/test-webcrypto-sign-verify-ecdsa.js:219:21
    at Array.forEach (<anonymous>)
    at /home/iojs/node/test/parallel/test-webcrypto-sign-verify-ecdsa.js:218:11
    at Object.<anonymous> (/home/iojs/node/test/parallel/test-webcrypto-sign-verify-ecdsa.js:224:3)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10) {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-webcrypto-sign-verify-ecdsa.js
=== release test-webcrypto-sign-verify-node-dsa ===
Path: parallel/test-webcrypto-sign-verify-node-dsa
--- stderr ---
node:internal/crypto/keys:637
    handle.init(kKeyTypePrivate, data, format, type, passphrase);
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at createPrivateKey (node:internal/crypto/keys:637:12)
    at Object.dsaImportKey (node:internal/crypto/dsa:171:19)
    at SubtleCrypto.importKey (node:internal/crypto/webcrypto:505:10)
    at testVerify (/home/iojs/node/test/parallel/test-webcrypto-sign-verify-node-dsa.js:38:12)
    at /home/iojs/node/test/parallel/test-webcrypto-sign-verify-node-dsa.js:215:21
    at Array.forEach (<anonymous>)
    at /home/iojs/node/test/parallel/test-webcrypto-sign-verify-node-dsa.js:214:9
    at Object.<anonymous> (/home/iojs/node/test/parallel/test-webcrypto-sign-verify-node-dsa.js:220:3)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10) {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-webcrypto-sign-verify-node-dsa.js
=== release test-webcrypto-sign-verify-rsa ===
Path: parallel/test-webcrypto-sign-verify-rsa
--- stderr ---
node:internal/crypto/keys:637
    handle.init(kKeyTypePrivate, data, format, type, passphrase);
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at createPrivateKey (node:internal/crypto/keys:637:12)
    at Object.rsaImportKey (node:internal/crypto/rsa:267:19)
    at SubtleCrypto.importKey (node:internal/crypto/webcrypto:470:10)
    at testVerify (/home/iojs/node/test/parallel/test-webcrypto-sign-verify-rsa.js:41:12)
    at /home/iojs/node/test/parallel/test-webcrypto-sign-verify-rsa.js:219:21
    at Array.forEach (<anonymous>)
    at /home/iojs/node/test/parallel/test-webcrypto-sign-verify-rsa.js:218:14
    at Object.<anonymous> (/home/iojs/node/test/parallel/test-webcrypto-sign-verify-rsa.js:228:3)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10) {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-webcrypto-sign-verify-rsa.js
=== release test-webcrypto-wrap-unwrap ===
Path: parallel/test-webcrypto-wrap-unwrap
--- stderr ---
node:internal/crypto/keys:637
    handle.init(kKeyTypePrivate, data, format, type, passphrase);
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at createPrivateKey (node:internal/crypto/keys:637:12)
    at Object.ecImportKey (node:internal/crypto/ec:297:19)
    at importKey (node:internal/crypto/webcrypto:479:10)
    at SubtleCrypto.unwrapKey (node:internal/crypto/webcrypto:567:10)
    at async testWrap (/home/iojs/node/test/parallel/test-webcrypto-wrap-unwrap.js:233:5)
    at async Promise.all (index 14) {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
Command: out/Release/node /home/iojs/node/test/parallel/test-webcrypto-wrap-unwrap.js
=== release test-benchmark-crypto ===
Path: benchmark/test-benchmark-crypto
--- stderr ---
node:internal/crypto/keys:637
    handle.init(kKeyTypePrivate, data, format, type, passphrase);
           ^

Error: error:068000A8:asn1 encoding routines::wrong tag
    at Object.createPrivateKey (node:internal/crypto/keys:637:12)
    at getKeyObject (/home/iojs/node/benchmark/crypto/oneshot-sign-verify.js:22:24)
    at Array.map (<anonymous>)
    at main (/home/iojs/node/benchmark/crypto/oneshot-sign-verify.js:109:23)
    at /home/iojs/node/benchmark/common.js:42:9
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:0688010A:asn1 encoding routines::nested asn1 error'
  ],
  library: 'asn1 encoding routines',
  reason: 'wrong tag',
  code: 'ERR_OSSL_ASN1_WRONG_TAG'
}
node:assert:123
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:

1 !== 0

    at ChildProcess.<anonymous> (/home/iojs/node/test/common/benchmark.js:30:12)
    at ChildProcess.emit (node:events:365:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: 1,
  expected: 0,
  operator: 'strictEqual'
}
Command: out/Release/node /home/iojs/node/test/benchmark/test-benchmark-crypto.js

===
=== 23 tests failed
===
@richardlau richardlau changed the title Test failures with openssl Test failures with openssl 3.0.0 alpha 15 (quictls fork) Apr 23, 2021
@danbev danbev self-assigned this Apr 26, 2021
@danbev
Copy link
Contributor

danbev commented Apr 26, 2021

I'm looking into these issues are part of the work of statically linking quictls/openssl 3.0.0-alpha15+quic.

danbev added a commit to danbev/openssl that referenced this issue Apr 28, 2021
This commit sets the error mark before calling d2i_X509_SIG
and clear it if that function call is successful.

The motivation for this is that if d2i_X509_SIG returns NULL then the
else clause will be entered and d2i_PKCS8_PRIV_KEY_INFO will be
called. If d2i_X509_SIG raised any errors those error will be on the
error stack when d2i_PKCS8_PRIV_KEY_INFO gets called, and even if it
returns successfully those errors will still be on the error stack.

We ran into this issue when upgrading Node.js to 3.0.0-alpha15.
More details can be found in the ref links below.

Refs: nodejs/node#38373
Refs: https://github.com/danbev/learning-libcrypto/blob/master/notes/wrong-tag-issue2.md
danbev added a commit to danbev/node that referenced this issue Apr 28, 2021
This commit skips some test when OpenSSL 3.0.0-alpha-15 is used as there
is an issue that causes them to fail.

This is only a temp solution until there is new OpenSSL release.

Fixes: nodejs#38373
danbev added a commit to danbev/node that referenced this issue May 3, 2021
This commit skips some test when OpenSSL 3.0.0-alpha-15 is used as there
is an issue that causes them to fail.

This is only a temp solution until there is new OpenSSL release.

Fixes: nodejs#38373
danbev added a commit to danbev/node that referenced this issue May 3, 2021
This commit skips some test when OpenSSL 3.0.0-alpha-15 is used as there
is an issue that causes them to fail.

This is only a temp solution until there is new OpenSSL release.

Fixes: nodejs#38373
danbev added a commit to danbev/node that referenced this issue May 6, 2021
This commit skips some test when OpenSSL 3.0.0-alpha-15 is used as there
is an issue that causes them to fail.

This is only a temp solution until there is new OpenSSL release.

Fixes: nodejs#38373
richardlau pushed a commit to danbev/node that referenced this issue May 6, 2021
This commit skips some test when OpenSSL 3.0.0-alpha15 is used as there
is an issue that causes them to fail.

This is only a temp solution until there is new OpenSSL release.

Fixes: nodejs#38373

PR-URL: nodejs#38451
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
openssl-machine pushed a commit to openssl/openssl that referenced this issue May 9, 2021
This commit sets the error mark before calling d2i_X509_SIG
and clear it if that function call is successful.

The motivation for this is that if d2i_X509_SIG returns NULL then the
else clause will be entered and d2i_PKCS8_PRIV_KEY_INFO will be
called. If d2i_X509_SIG raised any errors those error will be on the
error stack when d2i_PKCS8_PRIV_KEY_INFO gets called, and even if it
returns successfully those errors will still be on the error stack.

We ran into this issue when upgrading Node.js to 3.0.0-alpha15.
More details can be found in the ref links below.

Refs: nodejs/node#38373
Refs: https://github.com/danbev/learning-libcrypto/blob/master/notes/wrong-tag-issue2.md

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from #15067)
richardlau pushed a commit to richardlau/node-1 that referenced this issue May 14, 2021
PR-URL: nodejs#38451
Fixes: nodejs#38373
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau pushed a commit to richardlau/node-1 that referenced this issue May 14, 2021
This commit skips some test when OpenSSL 3.0.0-alpha15 is used as there
is an issue that causes them to fail.

This is only a temp solution until there is new OpenSSL release.

Fixes: nodejs#38373

PR-URL: nodejs#38451
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
devnexen pushed a commit to devnexen/openssl that referenced this issue Jul 7, 2021
This commit sets the error mark before calling d2i_X509_SIG
and clear it if that function call is successful.

The motivation for this is that if d2i_X509_SIG returns NULL then the
else clause will be entered and d2i_PKCS8_PRIV_KEY_INFO will be
called. If d2i_X509_SIG raised any errors those error will be on the
error stack when d2i_PKCS8_PRIV_KEY_INFO gets called, and even if it
returns successfully those errors will still be on the error stack.

We ran into this issue when upgrading Node.js to 3.0.0-alpha15.
More details can be found in the ref links below.

Refs: nodejs/node#38373
Refs: https://github.com/danbev/learning-libcrypto/blob/master/notes/wrong-tag-issue2.md

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from openssl#15067)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants