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

ci: merge staging to master #41

Merged
merged 7 commits into from
Aug 18, 2023
Merged

ci: merge staging to master #41

merged 7 commits into from
Aug 18, 2023

Conversation

MatrixAI-Bot
Copy link
Member

This is an automatic PR generated by the pipeline CI/CD. This will be automatically fast-forward merged if successful.

@MatrixAI-Bot MatrixAI-Bot self-assigned this Aug 11, 2023
@MatrixAI-Bot
Copy link
Member Author

Pipeline Attempt on 963022829 for b8fa1eb

https://gitlab.com/MatrixAI/open-source/js-quic/-/pipelines/963022829

@ghost
Copy link

ghost commented Aug 11, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@MatrixAI-Bot
Copy link
Member Author

Pipeline Attempt on 970528879 for e7a1039

https://gitlab.com/MatrixAI/open-source/js-quic/-/pipelines/970528879

@MatrixAI-Bot
Copy link
Member Author

Pipeline Attempt on 970553102 for 84bd5caba363f9f9e09d8605cbca44563274c8ec

https://gitlab.com/MatrixAI/open-source/js-quic/-/pipelines/970553102

@tegefaulkes
Copy link
Contributor

CI was failing due to the b8fa1eb commit. The mac job passes when I revert this commit.

A quick search reveals the following issues which MAY be related.

Either we don't push up these optional dependencies in the package lockfile. Or I need to have a look at the version script.

@CMCDragonkai
Copy link
Member

The package-lock.json is supposed to be updated. Something is wrong on the mac job if that's the case.

@CMCDragonkai
Copy link
Member

Also this is package-lock.json being derived from package.json. The correct update needs to update both when pushing up.

Also what does vite have to do with this?

@CMCDragonkai
Copy link
Member

Is it because it is failing to install an optional dependency on the mac build? That's weird cause only the windows binaries didn't work. Or was the mac release don't incorrectly?

@MatrixAI-Bot
Copy link
Member Author

Pipeline Attempt on 970569052 for e7a1039

https://gitlab.com/MatrixAI/open-source/js-quic/-/pipelines/970569052

@CMCDragonkai
Copy link
Member

Actually I hit this before. Completely delete node_modules and package-lock.json, then exit the shell and re-enter, then it should fix the problem with SWC package. I just hit this with the other packages.

@CMCDragonkai
Copy link
Member

But yes the version script or prepublish script doesn't seem to be properly updating the package-lock.json but that's a separate issue, if you reset both node_modules and package-lock.json it will work.

@tegefaulkes
Copy link
Contributor

tegefaulkes commented Aug 17, 2023

Regenerating the package-lock.json results in the @peculiar having problems

offset is out of bounds
RangeError: offset is out of bounds
    at Uint8Array.set (<anonymous>)
    at Function.padStart (/home/faulkes/matixWorkspace/gitRepos/js-quic/node_modules/webcrypto-core/build/webcrypto-core.js:972:13)
    at Function.encodeSignature (/home/faulkes/matixWorkspace/gitRepos/js-quic/node_modules/webcrypto-core/build/webcrypto-core.js:940:22)
    at Function.sign (/home/faulkes/matixWorkspace/gitRepos/js-quic/node_modules/@peculiar/webcrypto/build/webcrypto.js:1575:54)
    at EcdsaProvider.onSign (/home/faulkes/matixWorkspace/gitRepos/js-quic/node_modules/@peculiar/webcrypto/build/webcrypto.js:1737:25)
    at EcdsaProvider.sign (/home/faulkes/matixWorkspace/gitRepos/js-quic/node_modules/webcrypto-core/build/webcrypto-core.js:157:28)
    at SubtleCrypto.sign (/home/faulkes/matixWorkspace/gitRepos/js-quic/node_modules/webcrypto-core/build/webcrypto-core.js:1405:39)
    at Function.create (/home/faulkes/matixWorkspace/gitRepos/js-quic/node_modules/@peculiar/x509/build/x509.cjs.js:2418:35)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.generateCertificate (/home/faulkes/matixWorkspace/gitRepos/js-quic/tests/utils.ts:476:11)

Error: error:0180006C:bignum routines::no inverse
    at Sign.sign (node:internal/crypto/sig:131:29)
    at Function.signRsa (/home/faulkes/matixWorkspace/gitRepos/js-quic/node_modules/@peculiar/webcrypto/build/webcrypto.js:967:34)
    at Function.sign (/home/faulkes/matixWorkspace/gitRepos/js-quic/node_modules/@peculiar/webcrypto/build/webcrypto.js:875:29)
    at RsaSsaProvider.onSign (/home/faulkes/matixWorkspace/gitRepos/js-quic/node_modules/@peculiar/webcrypto/build/webcrypto.js:1027:26)
    at RsaSsaProvider.sign (/home/faulkes/matixWorkspace/gitRepos/js-quic/node_modules/webcrypto-core/build/webcrypto-core.js:157:28)
    at SubtleCrypto.sign (/home/faulkes/matixWorkspace/gitRepos/js-quic/node_modules/webcrypto-core/build/webcrypto-core.js:1405:39)
    at Function.create (/home/faulkes/matixWorkspace/gitRepos/js-quic/node_modules/@peculiar/x509/build/x509.cjs.js:2418:35)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.generateCertificate (/home/faulkes/matixWorkspace/gitRepos/js-quic/tests/utils.ts:475:11)
    at Object.<anonymous> (/home/faulkes/matixWorkspace/gitRepos/js-quic/tests/QUICServer.test.ts:46:15)

Updating to the latest versions does not fix the problem. Any insights @CMCDragonkai ?

@CMCDragonkai
Copy link
Member

Pin it against the package-lock.json version that exists for the @peculiar libraries.

@CMCDragonkai
Copy link
Member

Try reproducing the errors, and give the input to the generateCertificate call so I can report it upstream.

@CMCDragonkai
Copy link
Member

Should remove any vestigial comments like:

// Async function createTLSConfigWithChain(

@tegefaulkes
Copy link
Contributor

  • The RSA keys fails most of the time with the Error: error:0180006C:bignum routines::no inverse error.
  • The ECDSA keys always fails with the RangeError: offset is out of bounds error.
  • The Ed25519 keys always works fine.

here are the reproducible tests

describe('key cases', () => {
  test('RSA sometimes works', async () => {
    const keyPairRSA = await testsUtils.generateKeyPairRSA();
    await testsUtils.generateCertificate({
      certId: '0',
      subjectKeyPair: keyPairRSA,
      issuerPrivateKey: keyPairRSA.privateKey,
      duration: 60 * 60 * 24 * 365 * 10,
    });
  });
  test('RSA works', async () => {
    const keyPairRSAWorks = {
      publicKey: {
        kty: 'RSA',
        alg: 'RS256',
        key_ops: [ 'verify' ],
        ext: true,
        n: 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtCurVNKPtid0gp4i0dfsnyr4FuWingGpG92ho8oQmRDo_4m0TXn7cxgru1rtqlYuiQhB1Ou_MH8Uspos__K0H5chpTLhBoqJZwdFpqbWLMAoK2_7gUMEanaO4AcZCeylPZP56iNVZJGMZRFRV02NsqZCJD1AWcunFZbryJwUPINMS8MeTXve5nVBaV0BjN_NgAKbGfSG8Ar06SjVxAHbQAZlptCmGVtyylTU2QkfUtmXqd3k1qwZkdL1WYT8h1NXoy2nmHRI_tt_Pe-Z1oGuX58aOJ6Z76S1xWlNBs8H8QSOdiYVlFTuaUCZeaSn7fIC0h3A2T0fi-QBfqssyNwBoQIDAQAB',
        e: 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtCurVNKPtid0gp4i0dfsnyr4FuWingGpG92ho8oQmRDo_4m0TXn7cxgru1rtqlYuiQhB1Ou_MH8Uspos__K0H5chpTLhBoqJZwdFpqbWLMAoK2_7gUMEanaO4AcZCeylPZP56iNVZJGMZRFRV02NsqZCJD1AWcunFZbryJwUPINMS8MeTXve5nVBaV0BjN_NgAKbGfSG8Ar06SjVxAHbQAZlptCmGVtyylTU2QkfUtmXqd3k1qwZkdL1WYT8h1NXoy2nmHRI_tt_Pe-Z1oGuX58aOJ6Z76S1xWlNBs8H8QSOdiYVlFTuaUCZeaSn7fIC0h3A2T0fi-QBfqssyNwBoQIDAQAB'
      },
      privateKey: {
        kty: 'RSA',
        alg: 'RS256',
        key_ops: [ 'sign' ],
        ext: true,
        n: 'MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC0K6tU0o-2J3SCniLR1-yfKvgW5aKeAakb3aGjyhCZEOj_ibRNeftzGCu7Wu2qVi6JCEHU678wfxSymiz_8rQflyGlMuEGiolnB0WmptYswCgrb_uBQwRqdo7gBxkJ7KU9k_nqI1VkkYxlEVFXTY2ypkIkPUBZy6cVluvInBQ8g0xLwx5Ne97mdUFpXQGM382AApsZ9IbwCvTpKNXEAdtABmWm0KYZW3LKVNTZCR9S2Zep3eTWrBmR0vVZhPyHU1ejLaeYdEj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V1WKoCuEbU02rMMJSVNEgRTyc7MGQKBgQDWmaWCsODT7Ua596JHKcOFDRLJuHjjY7seqL7etJQpJREZgNElFeqIaxd0QZFYsHQZqPQ5d9YB4w5ojz9XlbR_AwaxRGUEd8gVN4ozghVb7bwLoOVpiZBVfMo__N8qh4__EkTPLfj5GdsymKgT15sw2Nid6_L3GvFPzagjyMQSyQKBgBuX-8o3bf0dMfTxog56f1eAYdWNjgnla6mLW_kYPdZVvT3vE9QxUqu21WpMg4d6kbeoZ89CYeILXARA6RSxbLExSgSK5mVyonqxReJTNJo2SOdp6jqDYyrpKDfa7QdZvWG9Df40Mpl9NxuYuCj93_N5NoiIo4AlrLpOW9veBvzRAoGBAL9HflZKMGvVz7fM-TEzEZpTd86jheUwrMX8JP0-ud0es-omfsTujvj_c41lMBd8WE_S37UlknRmHR6nqA76WkLnwJxa2SutVINM2PtmVIF3GqjGxhVWz3bTXza_v28aHAiAESMV2Bi4qj-kABSHlkVo01OXzx3gPv0h01_qAJK5AoGBAMePF_U8p2Kzkb191TpVYiiWGRw4pYPwdNSki35nw7FMxIqDZ59wSTwCOcZEz8Kac1IXajKv2xbJdTyUgoFH8XlYFX6BxtxomSmHmHFBvUN7Sw_p4A_kemoxP0Q9AqY7dA990JWBa4cl5mvHFPi-3PqO9IntzEM_jwAGizCgthN9'
      }
    };
    await testsUtils.generateCertificate({
      certId: '0',
      subjectKeyPair: keyPairRSAWorks,
      issuerPrivateKey: keyPairRSAWorks.privateKey,
      duration: 60 * 60 * 24 * 365 * 10,
    });
  });
  test('RSA fails', async () => {
    const keyPairRSAFails =  {
      publicKey: {
        kty: 'RSA',
        alg: 'RS256',
        key_ops: [ 'verify' ],
        ext: true,
        n: 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2vuJ5ZwGk6kjF210uaBqECHUXjlSKCyFcXlnPE692uM3LlgpBsKZgb5xieI2tQMIlXcUdUdQ1A_2lyH2pXF2gGEckdP8PvXRPyxNnHc0QFR47camV6zuKlx8jITw27hF5amSSmNI8eAtc-COy6-C2vyKB1w404zIXrqHdgk7eyUpRurgdgn_hikPnsJwxixPbJUZ_C8bmsDW2Szp7ITV6oaxhz5s6fSVvEprozveEURj0wqWf_P65mr7w8ga1bNfEU0N_ROqABr8KoC28Hhn7PI8WGjTybTWzHwPjay3cCKy0DQ4ivx2vGP6x2SXliaEVSdNZ6mGjfN4bi8wPErNjQIDAQAB',
        e: 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2vuJ5ZwGk6kjF210uaBqECHUXjlSKCyFcXlnPE692uM3LlgpBsKZgb5xieI2tQMIlXcUdUdQ1A_2lyH2pXF2gGEckdP8PvXRPyxNnHc0QFR47camV6zuKlx8jITw27hF5amSSmNI8eAtc-COy6-C2vyKB1w404zIXrqHdgk7eyUpRurgdgn_hikPnsJwxixPbJUZ_C8bmsDW2Szp7ITV6oaxhz5s6fSVvEprozveEURj0wqWf_P65mr7w8ga1bNfEU0N_ROqABr8KoC28Hhn7PI8WGjTybTWzHwPjay3cCKy0DQ4ivx2vGP6x2SXliaEVSdNZ6mGjfN4bi8wPErNjQIDAQAB'
      },
      privateKey: {
        kty: 'RSA',
        alg: 'RS256',
        key_ops: [ 'sign' ],
        ext: true,
        n: 'MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDa-4nlnAaTqSMXbXS5oGoQIdReOVIoLIVxeWc8Tr3a4zcuWCkGwpmBvnGJ4ja1AwiVdxR1R1DUD_aXIfalcXaAYRyR0_w-9dE_LE2cdzRAVHjtxqZXrO4qXHyMhPDbuEXlqZJKY0jx4C1z4I7Lr4La_IoHXDjTjMheuod2CTt7JSlG6uB2Cf-GKQ-ewnDGLE9slRn8LxuawNbZLOnshNXqhrGHPmzp9JW8SmujO94RRGPTCpZ_8_rmavvDyBrVs18RTQ39E6oAGvwqgLbweGfs8jxYaNPJtNbMfA-NrLdwIrLQNDiK_Ha8Y_rHZJeWJ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DRBdIWgew0PBkZOtmj9_oXX0yeobfccflIx4iN6OujlhDkZTah9P6yildEMUzdlx-0MuU2SiScG_zcpZIRqjV1xRE6yed85i2dVdeNpS-Ti5Po4wKBgQDxppEl2Flr_DXQ9T7r74G3NoUUxsXX85VBbEIeGpqGxzIP8a2VT-6v-ESKQDjC5eRWyHrDYDwwLsZicWBR1zCP3Rh576M5BzVab3mG8g9925SzdbeKM86B3mbdXcUsZ5uVb64ZurL7nGg_K6NLZwZE_EuARLB6vyZ-bvRKgobqzwKBgCG0p9JPzg1s5qH1mVdNr6zTTZUtxcmHyxW85G7hUJJBgL7xUPrdnLV8ZGY-VtfH0rh2dA061iK2TDzooKuYqxc5Q--Bl8idRRfpSaNhAF9O3Vs2r3LdasR7rUFc3bxe0LLMnvkXj-u3Grv6UP4lfdVe1IVvJB2CBWmNIJZ9ZyYlAoGBAI_ucUfEXEa4W2mRmZ-38WAqBgxA9LhSqlTkYWFC4UVjwgrDHWvwxy9ixZg-9lAH1ABous5CNLdSNPGPrBoy_QbDXv_J30Nparrp6M2aweVp82EMvXyArQCnckdpwbZYI9BXS7Chhlfdai4uFL4lqBNQ3ruQrjj-P7RQ7AqxQiD7AoGAWjKDHu0gylWThKdLY_hAv63-qRhaPx5Cgc7QlIJxl_AgR5px93I7z9GuZU9RW2120NjNUjWYOhOj9LA6c_FPjXgjUsG_G1H4yOxOWzg9KD85hC21_uyMcflG1YqxJJq214FLQJFLCRgooYLgguO8hz5aneQ4QqIkuAAiToxnC_A'
      }
    }
    await testsUtils.generateCertificate({
      certId: '0',
      subjectKeyPair: keyPairRSAFails,
      issuerPrivateKey: keyPairRSAFails.privateKey,
      duration: 60 * 60 * 24 * 365 * 10,
    });
  });
  test('ECDSA always fails', async () => {
    const keyPairECDSA = await testsUtils.generateKeyPairECDSA();
    console.log(keyPairECDSA)
    await testsUtils.generateCertificate({
      certId: '0',
      subjectKeyPair: keyPairECDSA,
      issuerPrivateKey: keyPairECDSA.privateKey,
      duration: 60 * 60 * 24 * 365 * 10,
    });
  });
  test('Ed25519 works', async () => {
    const keyPairEd25519 = await testsUtils.generateKeyPairEd25519();
    await testsUtils.generateCertificate({
      certId: '0',
      subjectKeyPair: keyPairEd25519,
      issuerPrivateKey: keyPairEd25519.privateKey,
      duration: 60 * 60 * 24 * 365 * 10,
    });
  });
})

@MatrixAI-Bot
Copy link
Member Author

Pipeline Attempt on 970724656 for 824c4cb

https://gitlab.com/MatrixAI/open-source/js-quic/-/pipelines/970724656

@tegefaulkes
Copy link
Contributor

Reviewing the package lockfile changes, the only version that actually changed was @peculiar/x509 1.9.3 -> 1.9.4. Pinning this to the original version does not fix the problem however.

I'm still looking into this.

@CMCDragonkai
Copy link
Member

Are you sure? The failure in the calls all involve webcrypto or webcrypto-core.

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Aug 17, 2023

Didn't you say using the old package-lock.json (by reverting the commit) made it work? If so, there might be other packages that need to be pinned too?

@MatrixAI-Bot
Copy link
Member Author

Pipeline Attempt on 971729469 for 2a14b5a

https://gitlab.com/MatrixAI/open-source/js-quic/-/pipelines/971729469

@MatrixAI-Bot
Copy link
Member Author

Pipeline Attempt on 971737491 for 2a14b5a

https://gitlab.com/MatrixAI/open-source/js-quic/-/pipelines/971737491

@MatrixAI-Bot
Copy link
Member Author

Pipeline Succeeded on 971737491 for 2a14b5a

https://gitlab.com/MatrixAI/open-source/js-quic/-/pipelines/971737491

@MatrixAI-Bot MatrixAI-Bot merged commit 2a14b5a into master Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants