-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Organizational Unit number is wrong #16
Comments
Hello @certaintls and thanks for the issue. The number 2.5.6.5 refers to the organizationUnit Class as described here https://oidref.com/2.5.6.5. What you mean is the organizationalUnitName that has the ObjectIdentifierNumber 2.5.4.11. In an CSR or certificate the distinguished names ( DN ) offen contain the short version like "ou" that has the number 2.5.4.11. Thats why you receive this number instead of 2.5.6.5. I will also add the full version for some distinguished names within the map. |
I see. Thanks for the information. Maybe I was using it wrong; To access Do you have a suggestion on how to access each field by using a human readable name? |
Try this : data.subject[X509Utils.DN['ou']]; As you can see on https://github.com/Ephenodrom/Dart-Basic-Utils/blob/master/lib/src/X509Utils.dart#L35. |
I see it now. Thanks. Shall I close this issue or you are still interested in making some improvement? |
Let's keep this open, i will make some improvements to the DN map. |
I updated the DN list and added the following data : 'organizationalUnitName': '2.5.4.11',
'organizationName': '2.5.4.10',
'stateOrProvinceName': '2.5.4.8',
'commonName': '2.5.4.3',
'surname': '2.5.4.4',
'countryName': '2.5.4.6',
'localityName': '2.5.4.7',
'streetAddress': '2.5.4.9' |
This line https://github.com/Ephenodrom/Dart-Basic-Utils/blob/master/lib/src/X509Utils.dart#L50 defines it as
2.5.6.5
, but when you printdata.toJson().toString()
, the OU is2.5.4.11
, which is confirmed by a simple search https://books.google.com/books?id=kEXIBAAAQBAJ&pg=PA25&lpg=PA25&dq=2.5.4.11+organizational+unit++certificate&source=bl&ots=YRgJH0Vgp0&sig=ACfU3U10ooyCzrVNQ5GSmSqrxWfe6jqlBA&hl=en&sa=X&ved=2ahUKEwiK4LfD9qbqAhUi-2EKHXTsBWYQ6AEwA3oECAsQAQ#v=onepage&q=2.5.4.11%20organizational%20unit%20%20certificate&f=falseThe text was updated successfully, but these errors were encountered: