Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

x509 certificate subject parsing fail #1568

Closed
@payload

Description

I want to use a client certificate containing a subjectAltName with an URI. But escaped slashes are incorrectly parsed by nodejs 0.4.10 and 0.5.5-pre. I need it for correct foaf+ssl handling.

I create such an certificate with following command

openssl req -x509 -key alice.pem -nodes -subj '/CN=alice/subjectAltName=uniformResourceIdentifier:http://localhost:8000/alice.foaf#me' -new > alice.crt

where is a "subjectAltName=uniformResourceIdentifier:http://localhost:8000/alice.foaf#me" in the subject with escaped slashes. Browsers (FF6, Chromium) parse it correctly as "Subject Alternative Name 'uniformResourceIdentifier:http://localhost:8000/alice.foaf#me'". Creating a https.Server it says

req.connection.getPeerCertificate().subject.subjectAltName == "uniformResourceIfentifier:http:"

i expect

req.connection.getPeerCertificate().subject.subjectAltName == "uniformResourceIfentifier:http://localhost:8000/alice.foaf#me"

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions