• Home
  • Raw
  • Download

Lines Matching refs:cert

46     let cert = include_bytes!("../../test/cert.pem");  in test_cert_loading()  localVariable
47 let cert = X509::from_pem(cert).unwrap(); in test_cert_loading() localVariable
48 let fingerprint = cert.digest(MessageDigest::sha1()).unwrap(); in test_cert_loading()
58 let cert = include_bytes!("../../test/cert.pem"); in test_debug() localVariable
59 let cert = X509::from_pem(cert).unwrap(); in test_debug() localVariable
60 let debugged = format!("{:#?}", cert); in test_debug()
74 let cert = include_bytes!("../../test/cert.pem"); in test_cert_issue_validity() localVariable
75 let cert = X509::from_pem(cert).unwrap(); in test_cert_issue_validity() localVariable
76 let not_before = cert.not_before().to_string(); in test_cert_issue_validity()
77 let not_after = cert.not_after().to_string(); in test_cert_issue_validity()
85 let cert = include_bytes!("../../test/cert.pem"); in test_save_der() localVariable
86 let cert = X509::from_pem(cert).unwrap(); in test_save_der() localVariable
88 let der = cert.to_der().unwrap(); in test_save_der()
94 let cert = include_bytes!("../../test/cert.pem"); in test_subject_read_cn() localVariable
95 let cert = X509::from_pem(cert).unwrap(); in test_subject_read_cn() localVariable
96 let subject = cert.subject_name(); in test_subject_read_cn()
103 let cert = include_bytes!("../../test/nid_test_cert.pem"); in test_nid_values() localVariable
104 let cert = X509::from_pem(cert).unwrap(); in test_nid_values() localVariable
105 let subject = cert.subject_name(); in test_nid_values()
122 let cert = include_bytes!("../../test/nid_test_cert.pem"); in test_nameref_iterator() localVariable
123 let cert = X509::from_pem(cert).unwrap(); in test_nameref_iterator() localVariable
124 let subject = cert.subject_name(); in test_nameref_iterator()
149 let cert = include_bytes!("../../test/nid_uid_test_cert.pem"); in test_nid_uid_value() localVariable
150 let cert = X509::from_pem(cert).unwrap(); in test_nid_uid_value() localVariable
151 let subject = cert.subject_name(); in test_nid_uid_value()
159 let cert = include_bytes!("../../test/alt_name_cert.pem"); in test_subject_alt_name() localVariable
160 let cert = X509::from_pem(cert).unwrap(); in test_subject_alt_name() localVariable
162 let subject_alt_names = cert.subject_alt_names().unwrap(); in test_subject_alt_name()
177 let cert = include_bytes!("../../test/root-ca.pem"); in test_retrieve_pathlen() localVariable
178 let cert = X509::from_pem(cert).unwrap(); in test_retrieve_pathlen() localVariable
179 assert_eq!(cert.pathlen(), None); in test_retrieve_pathlen()
181 let cert = include_bytes!("../../test/intermediate-ca.pem"); in test_retrieve_pathlen() localVariable
182 let cert = X509::from_pem(cert).unwrap(); in test_retrieve_pathlen() localVariable
183 assert_eq!(cert.pathlen(), Some(0)); in test_retrieve_pathlen()
185 let cert = include_bytes!("../../test/alt_name_cert.pem"); in test_retrieve_pathlen() localVariable
186 let cert = X509::from_pem(cert).unwrap(); in test_retrieve_pathlen() localVariable
187 assert_eq!(cert.pathlen(), None); in test_retrieve_pathlen()
193 let cert = include_bytes!("../../test/certv3.pem"); in test_subject_key_id() localVariable
194 let cert = X509::from_pem(cert).unwrap(); in test_subject_key_id() localVariable
196 let subject_key_id = cert.subject_key_id().unwrap(); in test_subject_key_id()
206 let cert = include_bytes!("../../test/certv3.pem"); in test_authority_key_id() localVariable
207 let cert = X509::from_pem(cert).unwrap(); in test_authority_key_id() localVariable
209 let authority_key_id = cert.authority_key_id().unwrap(); in test_authority_key_id()
219 let cert = include_bytes!("../../test/authority_key_identifier.pem"); in test_authority_issuer_and_serial() localVariable
220 let cert = X509::from_pem(cert).unwrap(); in test_authority_issuer_and_serial() localVariable
222 let authority_issuer = cert.authority_issuer().unwrap(); in test_authority_issuer_and_serial()
232 let authority_serial = cert.authority_serial().unwrap(); in test_authority_issuer_and_serial()
240 let cert = include_bytes!("../../test/alt_name_cert.pem"); in test_subject_alt_name_iter() localVariable
241 let cert = X509::from_pem(cert).unwrap(); in test_subject_alt_name_iter() localVariable
243 let subject_alt_names = cert.subject_alt_names().unwrap(); in test_subject_alt_name_iter()
271 let cert = include_bytes!("../../test/aia_test_cert.pem"); in test_aia_ca_issuer() localVariable
272 let cert = X509::from_pem(cert).unwrap(); in test_aia_ca_issuer() localVariable
273 let authority_info = cert.authority_info().unwrap(); in test_aia_ca_issuer()
281 let cert = include_bytes!("../../test/cert.pem"); in test_aia_ca_issuer() localVariable
282 let cert = X509::from_pem(cert).unwrap(); in test_aia_ca_issuer() localVariable
283 assert!(cert.authority_info().is_none()); in test_aia_ca_issuer()
483 let cert = include_bytes!("../../test/cert.pem"); in issued() localVariable
484 let cert = X509::from_pem(cert).unwrap(); in issued() localVariable
488 assert_eq!(ca.issued(&cert), X509VerifyResult::OK); in issued()
489 assert_ne!(cert.issued(&cert), X509VerifyResult::OK); in issued()
494 let cert = include_bytes!("../../test/cert.pem"); in signature() localVariable
495 let cert = X509::from_pem(cert).unwrap(); in signature() localVariable
496 let signature = cert.signature(); in signature()
507 let algorithm = cert.signature_algorithm(); in signature()
515 let cert = include_bytes!("../../test/cert.pem"); in clone_x509() localVariable
516 let cert = X509::from_pem(cert).unwrap(); in clone_x509() localVariable
517 drop(cert.clone()); in clone_x509()
522 let cert = include_bytes!("../../test/cert.pem"); in test_verify_cert() localVariable
523 let cert = X509::from_pem(cert).unwrap(); in test_verify_cert() localVariable
534 .init(&store, &cert, &chain, |c| c.verify_cert()) in test_verify_cert()
537 .init(&store, &cert, &chain, |c| c.verify_cert()) in test_verify_cert()
543 let cert = include_bytes!("../../test/cert.pem"); in test_verify_fails() localVariable
544 let cert = X509::from_pem(cert).unwrap(); in test_verify_fails() localVariable
555 .init(&store, &cert, &chain, |c| c.verify_cert()) in test_verify_fails()
562 let cert = include_bytes!("../../test/cert.pem"); in test_verify_fails_with_crl_flag_set_and_no_crl() localVariable
563 let cert = X509::from_pem(cert).unwrap(); in test_verify_fails_with_crl_flag_set_and_no_crl() localVariable
576 .init(&store, &cert, &chain, |c| { in test_verify_fails_with_crl_flag_set_and_no_crl()
589 let cert = include_bytes!("../../test/cert.pem"); in test_verify_cert_with_purpose() localVariable
590 let cert = X509::from_pem(cert).unwrap(); in test_verify_cert_with_purpose() localVariable
609 .init(&store, &cert, &chain, |c| c.verify_cert()) in test_verify_cert_with_purpose()
616 let cert = include_bytes!("../../test/cert.pem"); in test_verify_cert_with_wrong_purpose_fails() localVariable
617 let cert = X509::from_pem(cert).unwrap(); in test_verify_cert_with_wrong_purpose_fails() localVariable
638 .init(&store, &cert, &chain, |c| { in test_verify_cert_with_wrong_purpose_fails()
656 let cert = builder.build(); in x509_ref_version() localVariable
657 let actual_version = cert.version(); in x509_ref_version()
667 let cert = X509Builder::new().unwrap().build(); in x509_ref_version_no_version_set() localVariable
668 let actual_version = cert.version(); in x509_ref_version_no_version_set()
684 let cert = include_bytes!("../../test/subca.crt"); in test_load_crl() localVariable
685 let cert = X509::from_pem(cert).unwrap(); in test_load_crl() localVariable
687 let revoked = match crl.get_by_cert(&cert) { in test_load_crl()
694 cert.serial_number().to_bn().unwrap(), in test_load_crl()
755 let cert = include_bytes!("../../test/cert.pem"); in test_save_subject_der() localVariable
756 let cert = X509::from_pem(cert).unwrap(); in test_save_subject_der() localVariable
758 let der = cert.subject_name().to_der().unwrap(); in test_save_subject_der()
778 let cert = include_bytes!("../../test/cert.pem"); in test_convert_to_text() localVariable
779 let cert = X509::from_pem(cert).unwrap(); in test_convert_to_text() localVariable
790 let text = String::from_utf8(cert.to_text().unwrap()).unwrap(); in test_convert_to_text()
829 let cert = include_bytes!("../../test/cert.pem"); in test_name_cmp() localVariable
830 let cert = X509::from_pem(cert).unwrap(); in test_name_cmp() localVariable
832 let subject = cert.subject_name(); in test_name_cmp()
833 let issuer = cert.issuer_name(); in test_name_cmp()
841 let cert = include_bytes!("../../test/cert.pem"); in test_name_to_owned() localVariable
842 let cert = X509::from_pem(cert).unwrap(); in test_name_to_owned() localVariable
843 let name = cert.subject_name(); in test_name_to_owned()
853 let cert = include_bytes!("../../test/cert.pem"); in test_verify_param_set_time_fails_verification() localVariable
854 let cert = X509::from_pem(cert).unwrap(); in test_verify_param_set_time_fails_verification() localVariable
869 .init(&store, &cert, &chain, |c| { in test_verify_param_set_time_fails_verification()
884 let cert = include_bytes!("../../test/cert.pem"); in test_verify_param_set_time() localVariable
885 let cert = X509::from_pem(cert).unwrap(); in test_verify_param_set_time() localVariable
899 .init(&store, &cert, &chain, |c| c.verify_cert()) in test_verify_param_set_time()
906 let cert = include_bytes!("../../test/leaf.pem"); in test_verify_param_set_depth() localVariable
907 let cert = X509::from_pem(cert).unwrap(); in test_verify_param_set_depth() localVariable
926 .init(&store, &cert, &chain, |c| c.verify_cert()) in test_verify_param_set_depth()
934 let cert = include_bytes!("../../test/leaf.pem"); in test_verify_param_set_depth_fails_verification() localVariable
935 let cert = X509::from_pem(cert).unwrap(); in test_verify_param_set_depth_fails_verification() localVariable
962 .init(&store, &cert, &chain, |c| { in test_verify_param_set_depth_fails_verification()
975 let cert = include_bytes!("../../test/cert.pem"); in test_load_cert_file() localVariable
976 let cert = X509::from_pem(cert).unwrap(); in test_load_cert_file() localVariable
988 .init(&store, &cert, &chain, |c| c.verify_cert()) in test_load_cert_file()
1008 let cert = include_bytes!("../../test/leaf.pem"); in test_set_purpose() localVariable
1009 let cert = X509::from_pem(cert).unwrap(); in test_set_purpose() localVariable
1026 .init(&store, &cert, &chain, |c| c.verify_cert()) in test_set_purpose()
1033 let cert = include_bytes!("../../test/leaf.pem"); in test_set_purpose_fails_verification() localVariable
1034 let cert = X509::from_pem(cert).unwrap(); in test_set_purpose_fails_verification() localVariable
1055 .init(&store, &cert, &chain, |c| { in test_set_purpose_fails_verification()
1068 let cert = include_bytes!("../../test/cert.pem"); in test_add_name_entry() localVariable
1069 let cert = X509::from_pem(cert).unwrap(); in test_add_name_entry() localVariable
1070 let inp_name = cert.subject_name().entries().next().unwrap(); in test_add_name_entry()
1104 let cert = builder.build(); in ipaddress_as_subject_alternative_name_is_formatted_in_debug() localVariable
1105 let actual_ip = cert in ipaddress_as_subject_alternative_name_is_formatted_in_debug()
1142 let cert = builder.build(); in other_name_as_subject_alternative_name() localVariable
1143 let general_name = cert in other_name_as_subject_alternative_name()
1156 let cert = include_bytes!("../../test/certv3.pem"); in test_dist_point() localVariable
1157 let cert = X509::from_pem(cert).unwrap(); in test_dist_point() localVariable
1159 let dps = cert.crl_distribution_points().unwrap(); in test_dist_point()
1176 let cert = include_bytes!("../../test/cert.pem"); in test_dist_point_null() localVariable
1177 let cert = X509::from_pem(cert).unwrap(); in test_dist_point_null() localVariable
1178 assert!(cert.crl_distribution_points().is_none()); in test_dist_point_null()
1184 let cert = include_bytes!("../../test/cert.pem"); in test_store_all_certificates() localVariable
1185 let cert = X509::from_pem(cert).unwrap(); in test_store_all_certificates() localVariable
1189 b.add_cert(cert).unwrap(); in test_store_all_certificates()