Open
Description
@peculiar/x509 version: 1.12.3
The parsing of X509 subject names in Name.fromString does not correctly handle attribute values with length 1:
> import { Name } from '@peculiar/x509';
> new Name('CN=t,OU=x,O=y').toJSON()
[ { CN: [ 't,OU=x' ] }, { O: [ '' ] } ]
> new Name('CN=t,OU=x,O=y,C=z').toJSON()
[ { CN: [ 't,OU=x' ] }, { O: [ 'y,C=z' ] } ]
This results for example in incorrect information in CSRs generated by Pkcs10CertificateRequestGenerator.
Metadata
Assignees
Labels
No labels
Activity