PeculiarVentures / x509

@peculiar/x509 is an easy to use TypeScript/Javascript library based on @peculiar/asn1-schema that makes generating X.509 Certificates and Certificate Requests as well as validating certificate chains easy
https://peculiarventures.github.io/x509/
MIT License
78 stars 10 forks source link

Easier way to look up name attributes #42

Closed CMCDragonkai closed 1 year ago

CMCDragonkai commented 1 year ago

Right now looking up name attributes requires going through the JSON structure and finding it. There should be an easier way to do this with something like cert.subject.getField.

Also the name system seems really flexible. You can have duplicate CN properties. I'm wondering if x509 really allows this, and perhaps by constraining the Name a bit, it would be easier to look up attributes in the subject and issuer names.