Lines Matching full: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()
278 Some("http://www.example.com/cert.pem") 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()
689 _ => panic!("cert should be revoked"), in test_load_crl()
694 cert.serial_number().to_bn().unwrap(), in test_load_crl()
695 "revoked and cert serial numbers should match" in test_load_crl()
737 let cert = include_bytes!("../../test/cert.pem"); in test_save_subject_der() localVariable
738 let cert = X509::from_pem(cert).unwrap(); in test_save_subject_der() localVariable
740 let der = cert.subject_name().to_der().unwrap(); in test_save_subject_der()
747 // The subject from ../../test/cert.pem in test_load_subject_der()
760 let cert = include_bytes!("../../test/cert.pem"); in test_convert_to_text() localVariable
761 let cert = X509::from_pem(cert).unwrap(); in test_convert_to_text() localVariable
772 let text = String::from_utf8(cert.to_text().unwrap()).unwrap(); in test_convert_to_text()
811 let cert = include_bytes!("../../test/cert.pem"); in test_name_cmp() localVariable
812 let cert = X509::from_pem(cert).unwrap(); in test_name_cmp() localVariable
814 let subject = cert.subject_name(); in test_name_cmp()
815 let issuer = cert.issuer_name(); in test_name_cmp()
823 let cert = include_bytes!("../../test/cert.pem"); in test_name_to_owned() localVariable
824 let cert = X509::from_pem(cert).unwrap(); in test_name_to_owned() localVariable
825 let name = cert.subject_name(); in test_name_to_owned()
835 let cert = include_bytes!("../../test/cert.pem"); in test_verify_param_set_time_fails_verification() localVariable
836 let cert = X509::from_pem(cert).unwrap(); in test_verify_param_set_time_fails_verification() localVariable
851 .init(&store, &cert, &chain, |c| { in test_verify_param_set_time_fails_verification()
866 let cert = include_bytes!("../../test/cert.pem"); in test_verify_param_set_time() localVariable
867 let cert = X509::from_pem(cert).unwrap(); in test_verify_param_set_time() localVariable
881 .init(&store, &cert, &chain, |c| c.verify_cert()) in test_verify_param_set_time()
888 let cert = include_bytes!("../../test/leaf.pem"); in test_verify_param_set_depth() localVariable
889 let cert = X509::from_pem(cert).unwrap(); in test_verify_param_set_depth() localVariable
908 .init(&store, &cert, &chain, |c| c.verify_cert()) in test_verify_param_set_depth()
916 let cert = include_bytes!("../../test/leaf.pem"); in test_verify_param_set_depth_fails_verification() localVariable
917 let cert = X509::from_pem(cert).unwrap(); in test_verify_param_set_depth_fails_verification() localVariable
944 .init(&store, &cert, &chain, |c| { in test_verify_param_set_depth_fails_verification()
957 let cert = include_bytes!("../../test/cert.pem"); in test_load_cert_file() localVariable
958 let cert = X509::from_pem(cert).unwrap(); in test_load_cert_file() localVariable
970 .init(&store, &cert, &chain, |c| c.verify_cert()) in test_load_cert_file()
990 let cert = include_bytes!("../../test/leaf.pem"); in test_set_purpose() localVariable
991 let cert = X509::from_pem(cert).unwrap(); in test_set_purpose() localVariable
1008 .init(&store, &cert, &chain, |c| c.verify_cert()) in test_set_purpose()
1015 let cert = include_bytes!("../../test/leaf.pem"); in test_set_purpose_fails_verification() localVariable
1016 let cert = X509::from_pem(cert).unwrap(); in test_set_purpose_fails_verification() localVariable
1037 .init(&store, &cert, &chain, |c| { in test_set_purpose_fails_verification()
1050 let cert = include_bytes!("../../test/cert.pem"); in test_add_name_entry() localVariable
1051 let cert = X509::from_pem(cert).unwrap(); in test_add_name_entry() localVariable
1052 let inp_name = cert.subject_name().entries().next().unwrap(); in test_add_name_entry()
1086 let cert = builder.build(); in ipaddress_as_subject_alternative_name_is_formatted_in_debug() localVariable
1087 let actual_ip = cert in ipaddress_as_subject_alternative_name_is_formatted_in_debug()
1114 let cert = include_bytes!("../../test/cert.pem"); in test_store_all_certificates() localVariable
1115 let cert = X509::from_pem(cert).unwrap(); in test_store_all_certificates() localVariable
1119 b.add_cert(cert).unwrap(); in test_store_all_certificates()
1139 let cert = builder.build(); in other_name_as_subject_alternative_name() localVariable
1140 let general_name = cert in other_name_as_subject_alternative_name()
1153 let cert = include_bytes!("../../test/certv3.pem"); in test_dist_point() localVariable
1154 let cert = X509::from_pem(cert).unwrap(); in test_dist_point() localVariable
1156 let dps = cert.crl_distribution_points().unwrap(); in test_dist_point()
1173 let cert = include_bytes!("../../test/cert.pem"); in test_dist_point_null() localVariable
1174 let cert = X509::from_pem(cert).unwrap(); in test_dist_point_null() localVariable
1175 assert!(cert.crl_distribution_points().is_none()); in test_dist_point_null()