Skip to content

Commit

Permalink
Correctly format email addresses. (#1425)
Browse files Browse the repository at this point in the history
* Correctly format email addresses.
  • Loading branch information
cobward authored Jun 3, 2024
1 parent 0fc38ef commit fcbfb15
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x509-cert/src/attr.rs
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
use alloc::vec::Vec;
use const_oid::db::{
rfc3280::EMAIL_ADDRESS,
rfc4519::{COUNTRY_NAME, DOMAIN_COMPONENT, SERIAL_NUMBER},
Database, DB,
};
@@ -191,6 +192,9 @@ impl AttributeTypeAndValue {
// Serial numbers are formatted as Printable String as per RFC 5280 Appendix A.1:
// https://datatracker.ietf.org/doc/html/rfc5280#appendix-A.1
SERIAL_NUMBER => Tag::PrintableString,
// Email addresses are formatted as Ia5String as per RFC 5280 Appendix A.1:
// https://datatracker.ietf.org/doc/html/rfc5280#appendix-A.1
EMAIL_ADDRESS => Tag::Ia5String,
_ => Tag::Utf8String,
};

0 comments on commit fcbfb15

Please sign in to comment.