Home
last modified time | relevance | path

Searched refs:cert (Results 1 – 25 of 231) sorted by relevance

12345678910

/packages/modules/adb/client/pairing/tests/
Dpairing_connection_test.cpp80 std::vector<uint8_t> cert; in initPairing() local
83 cert.assign(reinterpret_cast<const uint8_t*>(kTestServerCert.data()), in initPairing()
89 server_ = PairingServer::create(server_pswd, server_info_, cert, key, kDefaultPairingPort); in initPairing()
90 cert.assign(reinterpret_cast<const uint8_t*>(kTestClientCert.data()), in initPairing()
96 client_ = PairingClient::create(client_pswd, client_info_, cert, key, "127.0.0.1"); in initPairing()
100 std::vector<uint8_t> cert; in createServer() local
103 cert.assign(reinterpret_cast<const uint8_t*>(kTestServerCert.data()), in createServer()
109 return PairingServer::create(pswd, server_info_, cert, key, kDefaultPairingPort); in createServer()
113 std::vector<uint8_t> cert; in createClient() local
116 cert.assign(reinterpret_cast<const uint8_t*>(kTestClientCert.data()), in createClient()
[all …]
Dpairing_server.cpp56 explicit PairingServerImpl(const Data& pswd, const PeerInfo& peer_info, const Data& cert,
133 PairingServerImpl::PairingServerImpl(const Data& pswd, const PeerInfo& peer_info, const Data& cert, in PairingServerImpl() argument
135 : pswd_(pswd), peer_info_(peer_info), cert_(cert), priv_key_(priv_key), port_(port) { in PairingServerImpl()
316 [fd](const PeerInfo* peer_info, const Data* cert, void* opaque) { in connectionEventsWorker() argument
320 if (peer_info != nullptr && cert != nullptr) { in connectionEventsWorker()
322 std::string(peer_info->guid), Data(*cert)); in connectionEventsWorker()
341 auto [fd, name, guid, cert] = std::move(*p); in connectionEventsWorker()
342 if (name.has_value() && guid.has_value() && cert.has_value() && !name->empty() && in connectionEventsWorker()
343 !guid->empty() && !cert->empty()) { in connectionEventsWorker()
355 cb_(&info, &*cert, opaque_); in connectionEventsWorker()
[all …]
/packages/modules/Bluetooth/system/blueberry/tests/gd/security/
Dle_security_test.py18 from blueberry.tests.gd.cert.matchers import SecurityMatchers
19 from blueberry.tests.gd.cert.metadata import metadata
20 from blueberry.tests.gd.cert.py_hci import PyHci
21 from blueberry.tests.gd.cert.py_le_security import PyLeSecurity
22 from blueberry.tests.gd.cert.truth import assertThat
23 from blueberry.tests.gd.cert import gd_base_test
62 self.cert_security = PyLeSecurity(self.cert)
74 address=self.cert.hci_controller.GetMacAddress(empty_proto.Empty()).address),
79 self.cert.security.SetLeInitiatorAddressPolicy(cert_privacy_policy)
101 create_response = self.cert.hci_le_advertising_manager.CreateAdvertiser(request)
[all …]
/packages/modules/Bluetooth/system/blueberry/tests/sl4a_sl4a/security/
Dirk_rotation_test.py24 from blueberry.tests.gd.cert.context import get_current_context
25 from blueberry.tests.gd.cert.truth import assertThat
47 self.cert.adb.pull([
49 os.path.join(current_test_dir, "CERT_%s_btsnoop_hci.log" % self.cert.serial)
51 self.cert.adb.pull([
53 os.path.join(current_test_dir, "CERT_%s_btsnoop_hci.log.last" % self.cert.serial)
56 self.cert.adb.shell("setprop bluetooth.core.gap.le.privacy.enabled \'\'")
70 "DUT_%s_bt_config.conf" % self.cert.serial)
72 self.cert.adb.pull(["/data/misc/bluedroid/bt_config.conf", bt_config_file_path])
98 self.cert.sl4a.bluetoothDisableBLE()
[all …]
/packages/modules/Bluetooth/system/blueberry/tests/sl4a_sl4a/lib/
Dsl4a_sl4a_base_test.py22 from blueberry.tests.gd.cert.closable import safeClose
23 from blueberry.tests.gd.cert.context import get_current_context
71 self.cert = self.android_devices[1]
74 setup_sl4a(self.cert, server_port, forwarded_port)
83 self.cert.adb.root()
84 self.cert.adb.shell("setprop persist.bluetooth.btsnooplogmode full")
85 getprop_result = self.cert.adb.getprop("persist.bluetooth.btsnooplogmode")
87 self.cert.log.warning(
93 teardown_sl4a(self.cert)
113 self.setup_device_for_test(self.cert)
[all …]
/packages/modules/Bluetooth/system/blueberry/tests/gd/hci/
Dle_scanning_manager_test.py19 from blueberry.tests.gd.cert.closable import safeClose
20 from blueberry.tests.gd.cert.event_stream import EventStream
21 from blueberry.tests.gd.cert.matchers import ScanningMatchers
22 from blueberry.tests.gd.cert.truth import assertThat
23 from blueberry.tests.gd.cert import gd_base_test
39 def setup_test(self, cert, dut): argument
40 self.cert = cert
59 self.cert.hci.RegisterEventHandler(msg)
63 self.cert.hci.RegisterLeEventHandler(msg)
69 self.cert.hci.EnqueueCommandWithComplete(cmd)
[all …]
Dle_scanning_with_security_test.py17 from blueberry.tests.gd.cert.event_stream import EventStream
18 from blueberry.tests.gd.cert.truth import assertThat
19 from blueberry.tests.gd.cert import gd_base_test
37 self.cert.hci.RegisterEventHandler(msg)
41 self.cert.hci.RegisterLeEventHandler(msg)
47 self.cert.hci.EnqueueCommandWithComplete(cmd)
49 self.cert.hci.EnqueueCommandWithStatus(cmd)
63 self.cert.hci_le_initiator_address.SetPrivacyPolicyForInitiatorAddress(cert_privacy_policy)
85 create_response = self.cert.hci_le_advertising_manager.CreateAdvertiser(request)
93 self.cert.hci_le_advertising_manager.RemoveAdvertiser(remove_request)
/packages/modules/RemoteKeyProvisioning/app/src/com/android/rkpdapp/utils/
DX509Utils.java32 import java.security.cert.CertPathValidator;
33 import java.security.cert.CertPathValidatorException;
34 import java.security.cert.Certificate;
35 import java.security.cert.CertificateException;
36 import java.security.cert.CertificateFactory;
37 import java.security.cert.PKIXParameters;
38 import java.security.cert.TrustAnchor;
39 import java.security.cert.X509Certificate;
82 public static byte[] getAndFormatRawPublicKey(X509Certificate cert) { in getAndFormatRawPublicKey() argument
83 PublicKey pubKey = cert.getPublicKey(); in getAndFormatRawPublicKey()
[all …]
/packages/apps/KeyChain/robotests/src/com/android/keychain/
DShadowTrustedCertificateStore.java25 import java.security.cert.Certificate;
26 import java.security.cert.CertificateException;
27 import java.security.cert.X509Certificate;
38 public void installCertificate(X509Certificate cert) throws IOException, CertificateException { in installCertificate() argument
39 sDelegate.installCertificate(cert); in installCertificate()
43 public String getCertificateAlias(Certificate cert) { in getCertificateAlias() argument
44 return sDelegate.getCertificateAlias(cert); in getCertificateAlias()
/packages/modules/Bluetooth/system/blueberry/tests/sl4a_sl4a/gatt/
Dgatt_connect_with_irk_test.py23 from blueberry.tests.gd.cert.context import get_current_context
24 from blueberry.tests.gd.cert.truth import assertThat
71 "DUT_%s_bt_config.conf" % self.cert.serial)
73 self.cert.adb.pull(["/data/misc/bluedroid/bt_config.conf", bt_config_file_path])
98 self.cert.sl4a.bleSetAdvertiseSettingsIsConnectable(True)
99 self.cert.sl4a.bleSetAdvertiseDataIncludeDeviceName(True)
100 … self.cert.sl4a.bleSetAdvertiseSettingsAdvertiseMode(ble_advertise_settings_modes['low_latency'])
101 self.cert.sl4a.bleSetAdvertiseSettingsOwnAddressType(common.RANDOM_DEVICE_ADDRESS)
102 …rtise_callback, advertise_data, advertise_settings = generate_ble_advertise_objects(self.cert.sl4a)
103 … self.cert.sl4a.bleStartBleAdvertising(advertise_callback, advertise_data, advertise_settings)
[all …]
/packages/modules/Bluetooth/system/blueberry/tests/gd/cert/
Dgd_base_test.py28 from blueberry.tests.gd.cert.async_subprocess_logger import AsyncSubprocessLogger
29 from blueberry.tests.gd.cert.context import append_test_context, get_current_context, pop_test_cont…
30 from blueberry.tests.gd.cert.gd_device import MOBLY_CONTROLLER_CONFIG_NAME as CONTROLLER_CONFIG_NAME
31 from blueberry.tests.gd.cert.os_utils import get_gd_root
32 from blueberry.tests.gd.cert.os_utils import read_crash_snippet_and_log_tail
33 from blueberry.tests.gd.cert.os_utils import is_subprocess_alive
34 from blueberry.tests.gd.cert.os_utils import make_ports_available
35 from blueberry.tests.gd.cert.os_utils import TerminalColor
36 from blueberry.tests.gd.cert.tracelogger import TraceLogger
78 self.cert.generate_coverage_report_for_host(self.cert_coverage_info)
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/hotspot2/
DWfaCertBuilder.java24 import java.security.cert.Certificate;
25 import java.security.cert.CertificateException;
26 import java.security.cert.CertificateFactory;
27 import java.security.cert.X509Certificate;
54 Certificate cert = certFactory.generateCertificate(fis); in loadCertsFromDisk() local
55 if (cert instanceof X509Certificate) { in loadCertsFromDisk()
56 certs.add((X509Certificate) cert); in loadCertsFromDisk()
/packages/apps/Car/DebuggingRestrictionController/app/src/main/java/com/android/car/debuggingrestrictioncontroller/auth/
DTokenValidator.java28 import java.security.cert.Certificate;
29 import java.security.cert.CertificateExpiredException;
30 import java.security.cert.X509Certificate;
63 X509Certificate cert; in parseAndVerify() local
65 cert = jws.verifySignature(); in parseAndVerify()
67 cert = jws.verifySignature(SelfSignedTrustManager.getInstance()); in parseAndVerify()
69 if (cert == null) { in parseAndVerify()
75 session.certificates = new Certificate[] {cert}; in parseAndVerify()
139 public javax.security.cert.X509Certificate[] getPeerCertificateChain() in getPeerCertificateChain()
/packages/modules/adb/pairing_connection/tests/
Dpairing_client.cpp50 explicit PairingClientImpl(const Data& pswd, const PeerInfo& peer_info, const Data& cert,
64 const Data& cert, const Data& priv_key);
92 const Data& cert, const Data& priv_key) { in CreatePairingConnection() argument
94 pairing_connection_client_new(pswd.data(), pswd.size(), &peer_info, cert.data(), in CreatePairingConnection()
95 cert.size(), priv_key.data(), priv_key.size()), in CreatePairingConnection()
99 PairingClientImpl::PairingClientImpl(const Data& pswd, const PeerInfo& peer_info, const Data& cert, in PairingClientImpl() argument
103 cert_(cert), in PairingClientImpl()
192 const Data& cert, const Data& priv_key) { in Create() argument
194 CHECK(!cert.empty()); in Create()
197 return std::unique_ptr<PairingClient>(new PairingClientImpl(pswd, peer_info, cert, priv_key)); in Create()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
DCertificateEventInfoTest.java25 import java.security.cert.X509Certificate;
36 X509Certificate cert = mock(X509Certificate.class); in testGetMethods() local
37 mCertificateEventInfo = new CertificateEventInfo(cert, TEST_CERT_HASH); in testGetMethods()
38 assertEquals(mCertificateEventInfo.getCert(), cert); in testGetMethods() local
55 X509Certificate cert = mock(X509Certificate.class); in testCertHashNullInitializer() local
56 mCertificateEventInfo = new CertificateEventInfo(cert, null); in testCertHashNullInitializer()
/packages/apps/CertInstaller/src/com/android/certinstaller/
DCredentialHelper.java53 import java.security.cert.Certificate;
54 import java.security.cert.CertificateEncodingException;
55 import java.security.cert.CertificateException;
56 import java.security.cert.CertificateFactory;
57 import java.security.cert.X509Certificate;
138 for (X509Certificate cert : mCaCerts) { in onSaveStates()
139 certs.add(cert.getEncoded()); in onSaveStates()
159 for (byte[] cert : certs) { in onRestoreStates()
160 parseCert(cert); in onRestoreStates()
175 X509Certificate cert = (X509Certificate) in parseCert() local
[all …]
/packages/modules/Bluetooth/system/blueberry/tests/topshim/lib/
Dtopshim_base_test.py24 from blueberry.tests.gd.cert.async_subprocess_logger import AsyncSubprocessLogger
25 from blueberry.tests.gd.cert.context import get_current_context
26 from blueberry.tests.gd.cert.os_utils import get_gd_root
27 from blueberry.tests.gd.cert.os_utils import get_gd_root
28 from blueberry.tests.gd.cert.os_utils import read_crash_snippet_and_log_tail
29 from blueberry.tests.gd.cert.os_utils import is_subprocess_alive
30 from blueberry.tests.gd.cert.os_utils import make_ports_available
31 from blueberry.tests.gd.cert.os_utils import TerminalColor
32 from blueberry.tests.gd.cert.tracelogger import TraceLogger
33 from blueberry.tests.gd.cert.truth import assertThat
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/
DSupplicantStaNetworkCallbackAidlImpl.java35 import java.security.cert.CertificateException;
36 import java.security.cert.CertificateFactory;
37 import java.security.cert.X509Certificate;
185 X509Certificate cert = null; in onServerCertificateAvailable() local
189 cert = (X509Certificate) certFactory.generateCertificate(in); in onServerCertificateAvailable()
191 cert = null; in onServerCertificateAvailable()
196 cert = null; in onServerCertificateAvailable()
200 if (null == cert) { in onServerCertificateAvailable()
210 + " cert=" + cert); in onServerCertificateAvailable()
213 new CertificateEventInfo(cert, certHash)); in onServerCertificateAvailable()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hotspot2/
DPasspointProvisioningTestUtil.java30 import java.security.cert.Certificate;
31 import java.security.cert.CertificateException;
32 import java.security.cert.CertificateFactory;
33 import java.security.cert.X509Certificate;
112 for (X509Certificate cert : certs) { in createFakeKeyStore()
113 keyStore.setCertificateEntry(String.format("%d", index), cert); in createFakeKeyStore()
134 Certificate cert = certFactory.generateCertificate(bis); in getOsuCertsForTest() local
135 osuCerts.add((X509Certificate) cert); in getOsuCertsForTest()
/packages/modules/Bluetooth/system/blueberry/tests/gd_sl4a/security/
Doob_pairing_sl4a_test.py26 from blueberry.tests.gd.cert.matchers import SecurityMatchers
27 from blueberry.tests.gd.cert.py_le_security import PyLeSecurity
28 from blueberry.tests.gd.cert.truth import assertThat
83 self.cert_security = PyLeSecurity(self.cert)
108 oob_data = self.cert.security.GetLeOutOfBandData(empty_proto.Empty())
127 self.cert.security.SetLeInitiatorAddressPolicy(private_policy)
157 create_response = self.cert.hci_le_advertising_manager.ExtendedCreateAdvertiser(request)
170 self.cert.hci_le_advertising_manager.RemoveAdvertiser(remove_request)
232 self.cert.security.SetLeIoCapability(DISPLAY_ONLY)
233 self.cert.security.SetLeOobDataPresent(OOB_NOT_PRESENT)
[all …]
/packages/modules/Wifi/framework/java/android/net/wifi/
DParcelUtil.java28 import java.security.cert.CertificateEncodingException;
29 import java.security.cert.CertificateException;
30 import java.security.cert.CertificateFactory;
31 import java.security.cert.X509Certificate;
98 public static void writeCertificate(Parcel dest, X509Certificate cert) { in writeCertificate() argument
100 if (cert != null) { in writeCertificate()
102 certBytes = cert.getEncoded(); in writeCertificate()
/packages/modules/adb/tls/
Dtls_connection.cpp40 explicit TlsConnectionImpl(Role role, std::string_view cert, std::string_view priv_key,
44 bool AddTrustedCertificate(std::string_view cert) override;
85 TlsConnectionImpl::TlsConnectionImpl(Role role, std::string_view cert, std::string_view priv_key, in TlsConnectionImpl() argument
88 CHECK(!cert.empty() && !priv_key.empty()); in TlsConnectionImpl()
90 cert_ = BufferFromPEM(cert); in TlsConnectionImpl()
155 bool TlsConnectionImpl::AddTrustedCertificate(std::string_view cert) { in AddTrustedCertificate() argument
157 auto buf = X509FromBuffer(BufferFromPEM(cert)); in AddTrustedCertificate()
228 for (auto const& cert : known_certificates_) { in DoHandshake() local
229 if (X509_STORE_add_cert(SSL_CTX_get_cert_store(ssl_ctx_.get()), cert.get()) == 0) { in DoHandshake()
364 std::string_view cert, in Create() argument
[all …]
/packages/modules/Virtualization/service_vm/test_apk/src/java/com/android/virt/vm_attestation/util/
DX509Utils.java28 import java.security.cert.CertPathValidator;
29 import java.security.cert.Certificate;
30 import java.security.cert.CertificateFactory;
31 import java.security.cert.PKIXParameters;
32 import java.security.cert.TrustAnchor;
33 import java.security.cert.X509Certificate;
91 X509Certificate cert, byte[] challenge, String payloadApk) throws Exception { in verifyAvfAttestationExtension() argument
92 byte[] extensionValue = cert.getExtensionValue(AVF_ATTESTATION_EXTENSION_OID); in verifyAvfAttestationExtension()
/packages/apps/Dialer/java/com/android/voicemail/impl/transcribe/grpc/
DTranscriptionClientFactory.java52 private final String cert; field in TranscriptionClientFactory
62 this.cert = getCertificateFingerprint(context); in TranscriptionClientFactory()
73 packageName, cert, configProvider.getApiKey(), configProvider.getAuthToken())); in getClient()
141 private final String cert; field in TranscriptionClientFactory.Interceptor
154 public Interceptor(String packageName, String cert, String apiKey, String authToken) { in Interceptor() argument
156 this.cert = cert; in Interceptor()
178 if (!TextUtils.isEmpty(cert)) { in interceptCall()
180 headers.put(ANDROID_CERT_HEADER, cert); in interceptCall()
/packages/modules/Bluetooth/system/blueberry/tests/gd/iso/
Dle_iso_test.py16 from blueberry.tests.gd.cert.closable import safeClose
17 from blueberry.tests.gd.cert.matchers import IsoMatchers
18 from blueberry.tests.gd.cert.metadata import metadata
19 from blueberry.tests.gd.cert.py_le_acl_manager import PyLeAclManager
20 from blueberry.tests.gd.cert.py_le_iso import PyLeIso
21 from blueberry.tests.gd.cert.py_le_iso import CisTestParameters
22 from blueberry.tests.gd.cert.truth import assertThat
23 from blueberry.tests.gd.cert import gd_base_test
43 self.cert_le_acl_manager = PyLeAclManager(self.cert)
62 self.cert.hci_le_initiator_address.SetPrivacyPolicyForInitiatorAddress(privacy_policy)
[all …]

12345678910