Move conscrypt module core platform API to external/conscrypt
Bug: 142045649
Bug: 141742596
Test: m checkbuild && m update-api
Change-Id: Ib1d5db08f9b3d48237e6706a21bbaf4a21e00ede
diff --git a/mmodules/core_platform_api/Android.bp b/mmodules/core_platform_api/Android.bp
index 260956f..58006a8 100644
--- a/mmodules/core_platform_api/Android.bp
+++ b/mmodules/core_platform_api/Android.bp
@@ -70,6 +70,7 @@
java_library {
name: "art.module.platform.api.stubs",
visibility: [
+ "//external/conscrypt",
"//external/icu/android_icu4j",
],
srcs: [
@@ -86,6 +87,7 @@
java_system_modules {
name: "art-module-platform-api-stubs-system-modules",
visibility: [
+ "//external/conscrypt",
"//external/icu/android_icu4j",
],
libs: [
@@ -93,59 +95,6 @@
],
}
-// Generates stub source files for the core platform API of the Conscrypt module.
-// i.e. every class/member that is either in the public API or annotated with
-// @CorePlatformApi.
-//
-// The API specification .txt files managed by this only contain the additional
-// classes/members that are in the intra-core API but which are not in the public
-// API.
-droidstubs {
- name: "conscrypt-module-platform-api-stubs-source",
- srcs: [
- ":conscrypt_java_files",
- ],
- sdk_version: "none",
- libs: [
- "art.module.platform.api.stubs",
- ],
-
- installable: false,
- args: "--hide-annotation libcore.api.Hide " +
- "--show-single-annotation libcore.api.CorePlatformApi " +
- "--skip-annotation-instance-methods=false ",
-
- api_filename: "api.txt",
- removed_api_filename: "removed.txt",
- previous_api: "previous.txt",
-
- check_api: {
- current: {
- api_file: "api/conscrypt-module/platform/current-api.txt",
- removed_api_file: "api/conscrypt-module/platform/current-removed.txt",
- },
- last_released: {
- api_file: "api/conscrypt-module/platform/last-api.txt",
- removed_api_file: "api/conscrypt-module/platform/last-removed.txt",
- },
- },
-}
-
-// A library containing the core platform API stubs of the Conscrypt module.
-//
-// Core platform APIs are only intended for use of other parts of the platform, not the
-// core library modules.
-java_library {
- name: "conscrypt.module.platform.api.stubs",
- srcs: [
- ":conscrypt-module-platform-api-stubs-source",
- ],
- hostdex: true,
-
- sdk_version: "none",
- system_modules: "art-module-platform-api-stubs-system-modules",
-}
-
// Ideally this should be a restricted whitelist but there are hundreds of modules that depend on
// this.
// TODO(http://b/134561230) - limit the number of dependents on this.
diff --git a/mmodules/core_platform_api/api/conscrypt-module/platform/current-api.txt b/mmodules/core_platform_api/api/conscrypt-module/platform/current-api.txt
deleted file mode 100644
index b645383..0000000
--- a/mmodules/core_platform_api/api/conscrypt-module/platform/current-api.txt
+++ /dev/null
@@ -1,100 +0,0 @@
-// Signature format: 2.0
-package com.android.org.conscrypt {
-
- public interface CertPinManager {
- }
-
- public final class ClientSessionContext implements javax.net.ssl.SSLSessionContext {
- method public final java.util.Enumeration<byte[]> getIds();
- method public final javax.net.ssl.SSLSession getSession(byte[]);
- method public final int getSessionCacheSize();
- method public final int getSessionTimeout();
- method public void setPersistentCache(com.android.org.conscrypt.SSLClientSessionCache);
- method public final void setSessionCacheSize(int) throws java.lang.IllegalArgumentException;
- method public final void setSessionTimeout(int) throws java.lang.IllegalArgumentException;
- }
-
- public final class Conscrypt {
- method public static javax.net.ssl.X509TrustManager getDefaultX509TrustManager() throws java.security.KeyManagementException;
- }
-
- public interface ConscryptCertStore {
- }
-
- public final class FileClientSessionCache {
- method public static com.android.org.conscrypt.SSLClientSessionCache usingDirectory(java.io.File) throws java.io.IOException;
- }
-
- public final class OpenSSLProvider extends java.security.Provider {
- ctor public OpenSSLProvider();
- }
-
- public abstract class OpenSSLSocketImpl extends javax.net.ssl.SSLSocket {
- method public void addHandshakeCompletedListener(javax.net.ssl.HandshakeCompletedListener);
- method public final void connect(java.net.SocketAddress) throws java.io.IOException;
- method public final void connect(java.net.SocketAddress, int) throws java.io.IOException;
- method @Deprecated public final byte[] getAlpnSelectedProtocol();
- method @Deprecated public final byte[] getNpnSelectedProtocol();
- method public final int getPort();
- method public final int getSoTimeout() throws java.net.SocketException;
- method public void removeHandshakeCompletedListener(javax.net.ssl.HandshakeCompletedListener);
- method public final void sendUrgentData(int) throws java.io.IOException;
- method @Deprecated public final void setAlpnProtocols(byte[]);
- method public abstract void setChannelIdPrivateKey(java.security.PrivateKey);
- method public void setHandshakeTimeout(int) throws java.net.SocketException;
- method public void setHostname(String);
- method @Deprecated public final void setNpnProtocols(byte[]);
- method public final void setOOBInline(boolean) throws java.net.SocketException;
- method public final void setSoTimeout(int) throws java.net.SocketException;
- method public void setSoWriteTimeout(int) throws java.net.SocketException;
- method public abstract void setUseSessionTickets(boolean);
- }
-
- public interface SSLClientSessionCache {
- }
-
- public final class TrustManagerImpl extends javax.net.ssl.X509ExtendedTrustManager {
- ctor public TrustManagerImpl(java.security.KeyStore);
- ctor public TrustManagerImpl(java.security.KeyStore, com.android.org.conscrypt.CertPinManager, com.android.org.conscrypt.ConscryptCertStore);
- method public void checkClientTrusted(java.security.cert.X509Certificate[], String) throws java.security.cert.CertificateException;
- method public void checkClientTrusted(java.security.cert.X509Certificate[], String, java.net.Socket) throws java.security.cert.CertificateException;
- method public void checkClientTrusted(java.security.cert.X509Certificate[], String, javax.net.ssl.SSLEngine) throws java.security.cert.CertificateException;
- method public java.util.List<java.security.cert.X509Certificate> checkServerTrusted(java.security.cert.X509Certificate[], String, String) throws java.security.cert.CertificateException;
- method public java.util.List<java.security.cert.X509Certificate> getTrustedChainForServer(java.security.cert.X509Certificate[], String, java.net.Socket) throws java.security.cert.CertificateException;
- method public java.util.List<java.security.cert.X509Certificate> getTrustedChainForServer(java.security.cert.X509Certificate[], String, javax.net.ssl.SSLEngine) throws java.security.cert.CertificateException;
- method public void handleTrustStorageUpdate();
- }
-
- public final class TrustedCertificateIndex {
- ctor public TrustedCertificateIndex();
- method public java.util.Set<java.security.cert.TrustAnchor> findAllByIssuerAndSignature(java.security.cert.X509Certificate);
- method public java.security.cert.TrustAnchor findByIssuerAndSignature(java.security.cert.X509Certificate);
- method public java.security.cert.TrustAnchor findBySubjectAndPublicKey(java.security.cert.X509Certificate);
- method public java.security.cert.TrustAnchor index(java.security.cert.X509Certificate);
- }
-
- public class TrustedCertificateStore implements com.android.org.conscrypt.ConscryptCertStore {
- ctor public TrustedCertificateStore();
- method public java.util.Set<java.lang.String> aliases();
- method public java.util.Set<java.lang.String> allSystemAliases();
- method public boolean containsAlias(String);
- method public void deleteCertificateEntry(String) throws java.security.cert.CertificateException, java.io.IOException;
- method public java.util.Set<java.security.cert.X509Certificate> findAllIssuers(java.security.cert.X509Certificate);
- method public java.security.cert.X509Certificate findIssuer(java.security.cert.X509Certificate);
- method public java.security.cert.Certificate getCertificate(String);
- method public java.security.cert.Certificate getCertificate(String, boolean);
- method public String getCertificateAlias(java.security.cert.Certificate);
- method public String getCertificateAlias(java.security.cert.Certificate, boolean);
- method public java.util.List<java.security.cert.X509Certificate> getCertificateChain(java.security.cert.X509Certificate) throws java.security.cert.CertificateException;
- method public java.io.File getCertificateFile(java.io.File, java.security.cert.X509Certificate);
- method public java.util.Date getCreationDate(String);
- method public java.security.cert.X509Certificate getTrustAnchor(java.security.cert.X509Certificate);
- method public void installCertificate(java.security.cert.X509Certificate) throws java.security.cert.CertificateException, java.io.IOException;
- method public static final boolean isUser(String);
- method public boolean isUserAddedCertificate(java.security.cert.X509Certificate);
- method public static void setDefaultUserDirectory(java.io.File);
- method public java.util.Set<java.lang.String> userAliases();
- }
-
-}
-
diff --git a/mmodules/core_platform_api/api/conscrypt-module/platform/current-removed.txt b/mmodules/core_platform_api/api/conscrypt-module/platform/current-removed.txt
deleted file mode 100644
index d802177..0000000
--- a/mmodules/core_platform_api/api/conscrypt-module/platform/current-removed.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 2.0
diff --git a/mmodules/core_platform_api/api/conscrypt-module/platform/last-api.txt b/mmodules/core_platform_api/api/conscrypt-module/platform/last-api.txt
deleted file mode 100644
index e69de29..0000000
--- a/mmodules/core_platform_api/api/conscrypt-module/platform/last-api.txt
+++ /dev/null
diff --git a/mmodules/core_platform_api/api/conscrypt-module/platform/last-removed.txt b/mmodules/core_platform_api/api/conscrypt-module/platform/last-removed.txt
deleted file mode 100644
index e69de29..0000000
--- a/mmodules/core_platform_api/api/conscrypt-module/platform/last-removed.txt
+++ /dev/null