Skip to content

Commit

Permalink
apply fix to write_der_header
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Chesnokov authored and chifflier committed Feb 22, 2024
1 parent fba3613 commit 95f9921
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/asn1_types/tagged/implicit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ where
let inner_len = self.inner.write_der_content(&mut sink)?;
// XXX X.690 section 8.14.3: if implicing tagging was used [...]:
// XXX a) the encoding shall be constructed if the base encoding is constructed, and shall be primitive otherwise
let constructed = matches!(TAG, 16 | 17);
let constructed = matches!(self.inner.tag(), Tag::Sequence | Tag::Set);
let header = Header::new(class, constructed, self.tag(), Length::Definite(inner_len));
header.write_der_header(writer).map_err(Into::into)
}
Expand Down

0 comments on commit 95f9921

Please sign in to comment.