Skip to content

Re-use constant from rust-asn1 #7386

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

Merged
merged 1 commit into from
Jul 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/rust/src/x509/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ fn encode_name_bytes<'p>(
pub(crate) struct UnvalidatedIA5String<'a>(pub(crate) &'a str);

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

impl<'a> asn1::SimpleAsn1Writable<'a> for UnvalidatedIA5String<'a> {
const TAG: u8 = 0x16;
const TAG: u8 = asn1::IA5String::TAG;
fn write_data(&self, dest: &mut Vec<u8>) {
dest.extend_from_slice(self.0.as_bytes());
}
Expand Down