Skip to content

Commit

Permalink
Merge pull request #121 from ANSSI-FR/dependabot/cargo/der-parser-8
Browse files Browse the repository at this point in the history
Update der-parser requirement from 6 to 8
  • Loading branch information
commial committed Aug 19, 2022
2 parents 05a3a58 + 9750bdb commit bafd283
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion curve25519-parser/Cargo.toml
Expand Up @@ -12,7 +12,7 @@ readme = "../README.md"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
der-parser = { version = "6", default-features = false}
der-parser = { version = "8", default-features = false}
x25519-dalek = { version = "1", default-features = false}
curve25519-dalek = { version = "3", default-features = false, features = ["u64_backend"]}
sha2 = { version = "0", default-features = false}
Expand Down
8 changes: 4 additions & 4 deletions curve25519-parser/src/lib.rs
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 bafd283

Please sign in to comment.