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

Random CertificateGeneratore error on load when restarting machine. #406

Open
blakebyrnes opened this issue Dec 22, 2021 · 2 comments
Open
Labels
bug Something isn't working

Comments

@blakebyrnes
Copy link
Contributor

Secret Agent occasionally throws a private key error when booting up. Something in the CertificateGenerator must be unable to load the key files (or there is a timing bug). As reported on discord:

  errorKind: 'ClientToProxy.GenerateCertError',
  errorCodes: [ undefined, 'ERR_OSSL_X509_KEY_VALUES_MISMATCH' ],
  hostname: 'website:443',
  context: {},
  sessionId: 'sessionId',
  sessionName: 'default-session'
} Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
    at setKey (node:internal/tls/secure-context:88:11)
    at configSecureContext (node:internal/tls/secure-context:168:7)
    at Object.createSecureContext (node:_tls_common:116:3)
    at Http2SecureServer.Server.addContext (node:_tls_wrap:1452:31)
    at MitmProxy.addSecureContext (/Users/removed/node_modules/mitm/lib/MitmProxy.ts:440:22)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  library: 'x509 certificate routines',
  function: 'X509_check_private_key',
  reason: 'key values mismatch',
  code: 'ERR_OSSL_X509_KEY_VALUES_MISMATCH'```
@blakebyrnes blakebyrnes changed the title Issue starting SA after running for a while Random CertificateGeneratore error on load when restarting machine. Jan 3, 2022
@blakebyrnes
Copy link
Contributor Author

NOTE: if you run into this, you can delete the network.db in your sessions dir to keep moving

@blakebyrnes blakebyrnes added the bug Something isn't working label Jan 28, 2022
@blakebyrnes
Copy link
Contributor Author

I can't figure out exactly what's triggering this, but I think we should just store the "private key" that generated each certificate in the networks.db folder. I have this code in Hero. Just need to port

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant