Ephenodrom / Dart-Basic-Utils

A dart package for many helper methods fitting common situations
MIT License
364 stars 77 forks source link

CSR attribute 'UID' is missing. #53

Closed TMSantos closed 2 years ago

TMSantos commented 2 years ago

Hi, would be possible to add UID attribute?

https://www.rfc-editor.org/rfc/rfc4519#section-2.39

Ephenodrom commented 2 years ago

@TMSantos Thank you for the issuer! What do you want to achieve in this case ? Du you want to place the uid as a distinguished name within the CSR?

Can you provide an example CSR?

TMSantos commented 2 years ago

@Ephenodrom after debugging, I notice this support depends in pointycastle library, https://github.com/bcgit/pc-dart/issues/52

Example is : Map<String, String> x509subject = { 'UID': 'aff9de28-e003-494a-b630-fd32a4ba106e', 'CN': 'Tiago Santos', };

TMSantos commented 2 years ago

@Ephenodrom just noticed you are contributor there :) So I think UID support is needed https://github.com/bcgit/pc-dart/blob/master/lib/asn1/object_identifiers.dart , if I fork it and add it, will it work? or there is more stuff required?

TMSantos commented 2 years ago

@Ephenodrom it works, more details at https://github.com/bcgit/pc-dart/issues/52#issuecomment-951766681 will close the issue here as is not related to the lib directly.