Home
last modified time | relevance | path

Searched refs:root_cert (Results 1 – 4 of 4) sorted by relevance

/ohos5.0/base/security/code_signature/test/unittest/
H A Drust_key_enable_test.rs45 let mut root_cert = PemCollection::new(); in test_load_pem_cert_from_valid_json_file() localVariable
46 root_cert.load_pem_certs_from_json_file(VALID_PEM_CERT, ALLOWED_ROOT_CERT_MEMBER_NAMES); in test_load_pem_cert_from_valid_json_file()
47 assert_eq!(root_cert.pem_data.len(), 3); in test_load_pem_cert_from_valid_json_file()
52 let mut root_cert = PemCollection::new(); in test_invalid_pem_cert_file_path() localVariable
54 assert!(root_cert.pem_data.is_empty()); in test_invalid_pem_cert_file_path()
59 let mut root_cert = PemCollection::new(); in test_invalid_pem_cert_json_structure() localVariable
60 root_cert in test_invalid_pem_cert_json_structure()
62 assert!(root_cert.pem_data.is_empty()); in test_invalid_pem_cert_json_structure()
67 let mut root_cert = PemCollection::new(); in test_empty_pem_cert_json_file() localVariable
68 root_cert.load_pem_certs_from_json_file(EMPTY_PEM_CERT, ALLOWED_ROOT_CERT_MEMBER_NAMES); in test_empty_pem_cert_json_file()
[all …]
/ohos5.0/base/security/code_signature/services/key_enable/src/
H A Dcert_utils.rs35 let mut root_cert = PemCollection::new(); in get_trusted_certs() localVariable
36 root_cert.load_pem_certs_from_json_file(TRUSTED_ROOT_CERT, ALLOWED_ROOT_CERT_MEMBER_NAMES); in get_trusted_certs()
38 root_cert.load_pem_certs_from_json_file( in get_trusted_certs()
44 root_cert.load_pem_certs_from_json_file( in get_trusted_certs()
49 root_cert in get_trusted_certs()
H A Dkey_enable.rs155 fn enable_trusted_keys(key_id: KeySerial, root_cert: &PemCollection) { in enable_trusted_keys()
156 let certs = match root_cert.to_der() { in enable_trusted_keys()
172 fn check_and_add_cert_path(root_cert: &PemCollection, cert_paths: &TrustCertPath) -> bool { in check_and_add_cert_path()
174 if add_profile_cert_path(root_cert, cert_paths).is_err() { in check_and_add_cert_path()
186 root_cert: PemCollection, in add_profile_cert_path_thread()
194 if check_and_add_cert_path(&root_cert, &cert_paths) { in add_profile_cert_path_thread()
246 let root_cert = get_trusted_certs(); in enable_all_keys() localVariable
248 enable_trusted_keys(key_id, &root_cert); in enable_all_keys()
256 let cert_thread = add_profile_cert_path_thread(root_cert, cert_paths); in enable_all_keys()
H A Dprofile_utils.rs306 root_cert: &PemCollection, in add_profile_cert_path()
309 let x509_store = root_cert.to_x509_store().unwrap(); in add_profile_cert_path()