mirror of https://github.com/briansmith/webpki
Add tests for -ve and zero serials in roots
I agree to license my contributions to each file under the terms given at the top of each file I changed.
This commit is contained in:
parent
8d3309988d
commit
8fd9a8975b
|
@ -57,3 +57,19 @@ pub fn netflix()
|
|||
cert.verify_is_valid_tls_server_cert(ALL_SIGALGS, &anchors, &inter_vec,
|
||||
time::get_time()) .unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn read_root_with_zero_serial() {
|
||||
let ca = include_bytes!("misc/serial_zero.der");
|
||||
trust_anchor_util::cert_der_as_trust_anchor(
|
||||
Input::from(ca)
|
||||
).expect("godaddy cert should parse as anchor");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn read_root_with_neg_serial() {
|
||||
let ca = include_bytes!("misc/serial_neg.der");
|
||||
trust_anchor_util::cert_der_as_trust_anchor(
|
||||
Input::from(ca)
|
||||
).expect("idcat cert should parse as anchor");
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue