Skip to content

Commit

Permalink
fix crl_revoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
gweisert committed Feb 17, 2024
1 parent 45534ac commit 57e376a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions openssl/src/x509/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ fn test_crl_revoke() {
let mut crl = X509Crl::from_der(crl).unwrap();
assert!(crl.verify(&ca.public_key().unwrap()).unwrap());

// ensure revoking an already revoked cert does not do anything
// ensure revoking an already revoked cert does not change the revoked count
{
let already_revoked_cert = include_bytes!("../../test/subca.crt");
let already_revoked_cert = X509::from_pem(already_revoked_cert).unwrap();
Expand All @@ -730,12 +730,10 @@ fn test_crl_revoke() {
"clr's entry count should not change when trying to revoke an already revoked cert"
);

assert!(crl.verify(&ca.public_key().unwrap()).unwrap());
let revoked = match crl.get_by_cert(&already_revoked_cert) {
CrlStatus::Revoked(revoked) => revoked,
_ => panic!("cert should be revoked"),
};

assert_eq!(
revoked.serial_number().to_bn().unwrap(),
already_revoked_cert.serial_number().to_bn().unwrap(),
Expand Down

0 comments on commit 57e376a

Please sign in to comment.