We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e97ab3 commit ab9a848Copy full SHA for ab9a848
x509-cert/src/attr.rs
@@ -1,7 +1,7 @@
1
//! Attribute-related definitions as defined in X.501 (and updated by RFC 5280).
2
3
use alloc::vec::Vec;
4
-use const_oid::db::rfc4519::{COUNTRY_NAME, DOMAIN_COMPONENT};
+use const_oid::db::rfc4519::{COUNTRY_NAME, DOMAIN_COMPONENT, SERIAL_NUMBER};
5
use core::fmt::{self, Write};
6
7
use const_oid::db::DB;
@@ -185,6 +185,9 @@ impl AttributeTypeAndValue<'_> {
185
let tag = match oid {
186
COUNTRY_NAME => Tag::PrintableString,
187
DOMAIN_COMPONENT => Tag::Ia5String,
188
+ // Serial numbers are formated as Printable String as per RFC 5280 Appendix A.1:
189
+ // https://datatracker.ietf.org/doc/html/rfc5280#appendix-A.1
190
+ SERIAL_NUMBER => Tag::PrintableString,
191
_ => Tag::Utf8String,
192
};
193
0 commit comments