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

change oid lookup for signing #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 22, 2022

  1. change oid lookup for signing

    When pulling the OID from SubjectPublicKeyInfo, we can get values like rsaEncryption (1.2.840.113549.1.1) which breaks @peculiar/webcrypto. Their docs indicate This one should not be used for signing. 
    
    I don't know enough to say if this is safer, but it appears to be working when testing with a key/cert generated this way:
    
    > openssl version
    OpenSSL 3.0.5 5 Jul 2022 (Library: OpenSSL 3.0.5 5 Jul 2022)
    > openssl req -nodes -new -x509 -keyout test.key -out test.cer
    > openssl asn1parse -in test.cer -item X509 | grep algorithm
          algorithm: sha256WithRSAEncryption (1.2.840.113549.1.1.11)
            algorithm: rsaEncryption (1.2.840.113549.1.1.1)
        algorithm: sha256WithRSAEncryption (1.2.840.113549.1.1.11)
    nbutkowski-chub authored Oct 22, 2022
    Configuration menu
    Copy the full SHA
    58d991e View commit details
    Browse the repository at this point in the history