Skip to content

Commit

Permalink
DerParser: update to version 8
Browse files Browse the repository at this point in the history
  • Loading branch information
commial committed Aug 19, 2022
1 parent 81a5c18 commit 9750bdb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions curve25519-parser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ struct Der25519PrivateStruct<'a> {

fn parse_25519_private_header(i: &[u8]) -> IResult<&[u8], Der25519PrivateHeader, BerError> {
parse_der_container(|i: &[u8], hdr| {
if hdr.tag != DerTag::Sequence {
if hdr.tag() != Tag::Sequence {
return Err(nom::Err::Error(BerError::InvalidTag));
}
let (i, tag) = parse_der_oid(i)?;
Expand All @@ -108,7 +108,7 @@ fn parse_25519_private_header(i: &[u8]) -> IResult<&[u8], Der25519PrivateHeader,

fn parse_25519_private(i: &[u8]) -> IResult<&[u8], Der25519PrivateStruct, BerError> {
parse_der_container(|i: &[u8], hdr| {
if hdr.tag != DerTag::Sequence {
if hdr.tag() != Tag::Sequence {
return Err(nom::Err::Error(BerError::InvalidTag));
}
let (i, _unk) = parse_der_integer(i)?;
Expand Down Expand Up @@ -180,7 +180,7 @@ struct DerEd25519PublicStruct<'a> {

fn parse_25519_public_header(i: &[u8]) -> IResult<&[u8], DerEd25519PublicHeader, BerError> {
parse_der_container(|i: &[u8], hdr| {
if hdr.tag != DerTag::Sequence {
if hdr.tag() != Tag::Sequence {
return Err(nom::Err::Error(BerError::InvalidTag));
}
let (i, tag) = parse_der_oid(i)?;
Expand All @@ -191,7 +191,7 @@ fn parse_25519_public_header(i: &[u8]) -> IResult<&[u8], DerEd25519PublicHeader,

fn parse_25519_public(i: &[u8]) -> IResult<&[u8], DerEd25519PublicStruct, BerError> {
parse_der_container(|i: &[u8], hdr| {
if hdr.tag != DerTag::Sequence {
if hdr.tag() != Tag::Sequence {
return Err(nom::Err::Error(BerError::InvalidTag));
}
let (i, header) = complete(parse_25519_public_header)(i)?;
Expand Down

0 comments on commit 9750bdb

Please sign in to comment.