Home
last modified time | relevance | path

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

12345

/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()
322 [fd](const PeerInfo* peer_info, const Data* cert, void* opaque) { in connectionEventsWorker() argument
326 if (peer_info != nullptr && cert != nullptr) { in connectionEventsWorker()
328 std::string(peer_info->guid), Data(*cert)); in connectionEventsWorker()
347 auto [fd, name, guid, cert] = std::move(*p); in connectionEventsWorker()
348 if (name.has_value() && guid.has_value() && cert.has_value() && !name->empty() && in connectionEventsWorker()
349 !guid->empty() && !cert->empty()) { in connectionEventsWorker()
361 cb_(&info, &*cert, opaque_); in connectionEventsWorker()
[all …]
/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/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/apps/RemoteProvisioner/src/com/android/remoteprovisioner/
DProvisioner.java26 import java.security.cert.CertificateEncodingException;
27 import java.security.cert.CertificateException;
28 import java.security.cert.X509Certificate;
98 X509Certificate cert; in provisionCerts() local
100 cert = X509Utils.formatX509Certs(certChain)[0]; in provisionCerts()
106 long expirationDate = cert.getNotAfter().getTime(); in provisionCerts()
107 byte[] rawPublicKey = X509Utils.getAndFormatRawPublicKey(cert); in provisionCerts()
113 if (SystemInterface.provisionCertChain(rawPublicKey, cert.getEncoded(), certChain, in provisionCerts()
DX509Utils.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 public static byte[] getAndFormatRawPublicKey(X509Certificate cert) { in getAndFormatRawPublicKey() argument
55 PublicKey pubKey = cert.getPublicKey(); in getAndFormatRawPublicKey()
60 ECPublicKey key = (ECPublicKey) cert.getPublicKey(); in getAndFormatRawPublicKey()
/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/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()
DSelfSignedTrustManager.java25 import java.security.cert.CertificateException;
26 import java.security.cert.CertificateFactory;
27 import java.security.cert.X509Certificate;
48 X509Certificate cert = in SelfSignedTrustManager() local
52 keyStore.setCertificateEntry(UUID.randomUUID().toString(), cert); in SelfSignedTrustManager() local
/packages/modules/adb/tls/
Dtls_connection.cpp38 explicit TlsConnectionImpl(Role role, std::string_view cert, std::string_view priv_key,
42 bool AddTrustedCertificate(std::string_view cert) override;
83 TlsConnectionImpl::TlsConnectionImpl(Role role, std::string_view cert, std::string_view priv_key, in TlsConnectionImpl() argument
86 CHECK(!cert.empty() && !priv_key.empty()); in TlsConnectionImpl()
88 cert_ = BufferFromPEM(cert); in TlsConnectionImpl()
153 bool TlsConnectionImpl::AddTrustedCertificate(std::string_view cert) { in AddTrustedCertificate() argument
155 auto buf = X509FromBuffer(BufferFromPEM(cert)); in AddTrustedCertificate()
226 for (auto const& cert : known_certificates_) { in DoHandshake() local
227 if (X509_STORE_add_cert(SSL_CTX_get_cert_store(ssl_ctx_.get()), cert.get()) == 0) { in DoHandshake()
362 std::string_view cert, in Create() argument
[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()
DWfaKeyStore.java25 import java.security.cert.CertificateException;
26 import java.security.cert.X509Certificate;
52 for (X509Certificate cert : certs) { in load()
53 mKeyStore.setCertificateEntry(String.format("%d", index), cert); in load()
DOsuServerConnection.java47 import java.security.cert.CertificateException;
48 import java.security.cert.CertificateFactory;
49 import java.security.cert.CertificateParsingException;
50 import java.security.cert.X509Certificate;
634 for (X509Certificate cert : chain) { in checkServerTrusted()
636 Log.e(TAG, "Cert " + i + " details: " + cert.getSubjectDN()); in checkServerTrusted()
637 Log.e(TAG, "Not before: " + cert.getNotBefore() + ", not after: " in checkServerTrusted()
638 + cert.getNotAfter()); in checkServerTrusted()
639 Log.e(TAG, "Cert " + i + " issuer: " + cert.getIssuerDN()); in checkServerTrusted()
/packages/modules/Gki/build/
Draw_img_ota.go169 cert := android.SrcIsModule(r.getCertString(ctx))
170 if cert != "" {
171 ctx.AddVariationDependencies(nil, certificateTag, cert)
196 if cert, ok := module.(*java.AndroidAppCertificate); ok {
197 r.pem = cert.Certificate.Pem
198 r.key = cert.Certificate.Key
231 cert := proptools.String(r.properties.Certificate)
232 if cert == "" {
238 r.pem = defaultDir.Join(ctx, cert+".x509.pem")
239 r.key = defaultDir.Join(ctx, cert+".pk8")
/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/Wifi/framework/java/android/net/wifi/
DParcelUtil.java25 import java.security.cert.CertificateEncodingException;
26 import java.security.cert.CertificateException;
27 import java.security.cert.CertificateFactory;
28 import java.security.cert.X509Certificate;
93 public static void writeCertificate(Parcel dest, X509Certificate cert) { in writeCertificate() argument
95 if (cert != null) { in writeCertificate()
97 certBytes = cert.getEncoded(); in writeCertificate()
/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/apps/KeyChain/src/com/android/keychain/
DKeyChainActivity.java65 import java.security.cert.Certificate;
66 import java.security.cert.CertificateException;
67 import java.security.cert.X509Certificate;
369 X509Certificate cert = loadCertificate(mKeyStore, alias); in shouldPresentCertificate() local
371 if (cert == null) { in shouldPresentCertificate()
377 cert.getSubjectDN().getName(), alias, certChain.size())); in shouldPresentCertificate()
385 String keyAlgorithm = cert.getPublicKey().getAlgorithm(); in shouldPresentCertificate()
395 chainIssuers.add(cert.getIssuerX500Principal()); in shouldPresentCertificate()
637 X509Certificate cert = loadCertificate(mKeyStore, alias); in doInBackground() local
638 if (cert == null) { in doInBackground()
[all …]
DKeyChainService.java82 import java.security.cert.Certificate;
83 import java.security.cert.CertificateEncodingException;
84 import java.security.cert.CertificateException;
85 import java.security.cert.CertificateFactory;
86 import java.security.cert.X509Certificate;
266 final Certificate cert = mKeyStore.getCertificate(alias);
267 if (cert == null) return null;
268 return cert.getEncoded();
453 final X509Certificate cert;
455 cert = parseCertificate(caCertificate);
[all …]
/packages/modules/adb/client/pairing/
Dpairing_client.cpp50 explicit PairingClientImpl(const Data& pswd, const PeerInfo& peer_info, const Data& cert,
87 PairingClientImpl::PairingClientImpl(const Data& pswd, const PeerInfo& peer_info, const Data& cert, in PairingClientImpl() argument
89 : pswd_(pswd), peer_info_(peer_info), cert_(cert), priv_key_(priv_key) { in PairingClientImpl()
164 const Data& cert, const Data& priv_key) { in Create() argument
166 CHECK(!cert.empty()); in Create()
169 return std::unique_ptr<PairingClient>(new PairingClientImpl(pswd, peer_info, cert, priv_key)); in Create()
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DIkev2VpnTest.java69 import java.security.cert.X509Certificate;
176 mServerRootCa = generateRandomCertAndKeyPair().cert; in Ikev2VpnTest()
241 mUserCertKey.cert, mUserCertKey.key, mServerRootCa); in buildIkev2VpnProfileDigitalSignature()
301 assertEquals(mUserCertKey.cert, profile.getUserCert()); in testBuildIkev2VpnProfileDigitalSignature()
494 public final X509Certificate cert; field in Ikev2VpnTest.CertificateAndKey
497 CertificateAndKey(X509Certificate cert, PrivateKey key) { in CertificateAndKey() argument
498 this.cert = cert; in CertificateAndKey()
524 final X509Certificate cert = certGen.generate(keyPair.getPrivate(), "AndroidOpenSSL"); in generateRandomCertAndKeyPair() local
525 return new CertificateAndKey(cert, keyPair.getPrivate()); in generateRandomCertAndKeyPair()
/packages/modules/Connectivity/tests/unit/java/android/net/
DIkev2VpnProfileTest.java45 import java.security.cert.X509Certificate;
83 mServerRootCa = generateRandomCertAndKeyPair().cert; in setUp()
86 mUserCert = userCertKey.cert; in setUp()
417 public final X509Certificate cert; field in Ikev2VpnProfileTest.CertificateAndKey
420 CertificateAndKey(X509Certificate cert, PrivateKey key) { in CertificateAndKey() argument
421 this.cert = cert; in CertificateAndKey()
447 final X509Certificate cert = certGen.generate(keyPair.getPrivate(), "AndroidOpenSSL"); in generateRandomCertAndKeyPair() local
448 return new CertificateAndKey(cert, keyPair.getPrivate()); in generateRandomCertAndKeyPair()
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/message/
DIkeAuthDigitalSignPayloadTest.java44 import java.security.cert.Certificate;
45 import java.security.cert.X509Certificate;
191 X509Certificate cert = CertUtils.createCertFromPemFile("end-cert-small.pem"); in testVerifyInboundSignature() local
194 cert, in testVerifyInboundSignature()
210 X509Certificate cert = CertUtils.createCertFromPemFile("end-cert-a.pem"); in testVerifyInboundSignatureFail() local
214 cert, in testVerifyInboundSignatureFail()
/packages/apps/Settings/src/com/android/settings/utils/
DAndroidKeystoreAliasLoader.java29 import java.security.cert.Certificate;
84 final Certificate[] cert = keyStore.getCertificateChain(alias); in AndroidKeystoreAliasLoader() local
85 if (cert != null && cert.length >= 2) { in AndroidKeystoreAliasLoader()
/packages/modules/adb/crypto/
Dx509_generator.cpp37 bool add_ext(X509* cert, int nid, const char* value) { in add_ext() argument
44 X509V3_set_ctx(&context, cert, cert, nullptr, nullptr, 0); in add_ext()
50 X509_add_ext(cert, ex, -1); in add_ext()

12345