Skip to content

Commit

Permalink
Allow empty SEQUENCE when OPTIONAL (closes #120)
Browse files Browse the repository at this point in the history
  • Loading branch information
chifflier committed Mar 15, 2022
1 parent e2d49a8 commit 91c2090
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/revocation_list.rs
Expand Up @@ -12,7 +12,7 @@ use der_parser::der::*;
use der_parser::num_bigint::BigUint;
use der_parser::oid::Oid;
use nom::combinator::{all_consuming, complete, map, opt};
use nom::multi::many1;
use nom::multi::many0;
use nom::Offset;
use oid_registry::*;
use std::collections::HashMap;
Expand Down Expand Up @@ -340,6 +340,6 @@ impl<'a> FromDer<'a> for RevokedCertificate<'a> {

fn parse_revoked_certificates(i: &[u8]) -> X509Result<Vec<RevokedCertificate>> {
parse_der_sequence_defined_g(|a, _| {
all_consuming(many1(complete(RevokedCertificate::from_der)))(a)
all_consuming(many0(complete(RevokedCertificate::from_der)))(a)
})(i)
}

0 comments on commit 91c2090

Please sign in to comment.