kjur / jsrsasign

The 'jsrsasign' (RSA-Sign JavaScript Library) is an opensource free cryptography library supporting RSA/RSAPSS/ECDSA/DSA signing/validation, ASN.1, PKCS#1/5/8 private/public key, X.509 certificate, CRL, OCSP, CMS SignedData, TimeStamp, CAdES and JSON Web Signature/Token in pure JavaScript.
https://kjur.github.io/jsrsasign
Other
3.26k stars 643 forks source link

Compliance with RFC8705/RFC4514 #428

Closed ruiengana closed 4 years ago

ruiengana commented 4 years ago

Hi,

I am using X509 getsubjectString() to register a Financial API client using tls_client_auth, where I am passing the tls_client_auth_subject_dn using getSubjectString().

However, it seems there is a discrepancy regarding the value getSubjectString() calculates versus what the Auth Server calculates from my TLS certificate.

This is what I am sending using getSubejctString(): "/C=GB/O=OpenBanking/OU=0014H00001lFE3TQAW/CN=M8kIuKVwwejkrErfwuJoO9"

And this is what the Auth Server is extracting from the cert: "CN=M8kIuKVwwejkrErfwuJoO9,OU=0014H00001lFE3TQAW,O=OpenBanking,C=GB"

Is getsubjectString() lined up with RFC8705/RFC4514 format?

Thank you, Rui

kjur commented 4 years ago

jsrsasign provides converters. Please see this: https://github.com/kjur/jsrsasign/wiki/NOTE-distinguished-name-representation-in-jsrsasign

ruiengana commented 4 years ago

Thank you Kenji! Works beautifully. Apologies but originally I couldn’t find this converter. Maybe would be good to have a link or some example to this method from the getSubjectString() one

Get Outlook for iOShttps://aka.ms/o0ukef


From: Kenji Urushima notifications@github.com Sent: Friday, April 3, 2020 5:15:43 AM To: kjur/jsrsasign jsrsasign@noreply.github.com Cc: Rui Engana rui@apiwrks.com; Author author@noreply.github.com Subject: Re: [kjur/jsrsasign] Compliance with RFC8705/RFC4514 (#428)

Closed #428https://github.com/kjur/jsrsasign/issues/428.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/kjur/jsrsasign/issues/428#event-3194767431, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACUVDT77WCEITOMYX3FYRB3RKVPG7ANCNFSM4L2XO6ZA.

kjur commented 4 years ago

Thank you. Sample have been added in the next release 8.0.14.