Skip to content

Commit c132e4d

Browse files
committed
Re-use constant from rust-asn1
1 parent e181382 commit c132e4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rust/src/x509/common.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ fn encode_name_bytes<'p>(
144144
pub(crate) struct UnvalidatedIA5String<'a>(pub(crate) &'a str);
145145

146146
impl<'a> asn1::SimpleAsn1Readable<'a> for UnvalidatedIA5String<'a> {
147-
const TAG: u8 = 0x16;
147+
const TAG: u8 = asn1::IA5String::TAG;
148148
fn parse_data(data: &'a [u8]) -> asn1::ParseResult<Self> {
149149
Ok(UnvalidatedIA5String(std::str::from_utf8(data).map_err(
150150
|_| asn1::ParseError::new(asn1::ParseErrorKind::InvalidValue),
@@ -153,7 +153,7 @@ impl<'a> asn1::SimpleAsn1Readable<'a> for UnvalidatedIA5String<'a> {
153153
}
154154

155155
impl<'a> asn1::SimpleAsn1Writable<'a> for UnvalidatedIA5String<'a> {
156-
const TAG: u8 = 0x16;
156+
const TAG: u8 = asn1::IA5String::TAG;
157157
fn write_data(&self, dest: &mut Vec<u8>) {
158158
dest.extend_from_slice(self.0.as_bytes());
159159
}

0 commit comments

Comments
 (0)