From cff9096b290789929c559d5510c56dd09d4fbc39 Mon Sep 17 00:00:00 2001 From: Benedict Wong Date: Tue, 19 Nov 2019 09:24:23 -0800 Subject: [PATCH] IKE API: Add getters for SessionParams, ConfigRequests This change adds getters for all setters exposed by the builder per API guidelines. New interfaces were added to expose configuration information stored by internal only classes. Bug: 143983419 Test: API, platform builds without errors Test: Frameworks(Net|Ike)Tests passing Change-Id: I1cb87439a36b6be8658dd39dcd279918a04076c0 --- api/system-current.txt | 65 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/api/system-current.txt b/api/system-current.txt index a82d12d3c4f7b..dd3f5925032e6 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -4441,6 +4441,9 @@ package android.net.ipsec.ike { } public abstract class ChildSessionParams { + method @NonNull public java.util.List getLocalTrafficSelectors(); + method @NonNull public java.util.List getRemoteTrafficSelectors(); + method @NonNull public java.util.List getSaProposals(); } public class IkeFqdnIdentification extends android.net.ipsec.ike.IkeIdentification { @@ -4508,6 +4511,13 @@ package android.net.ipsec.ike { } public final class IkeSessionParams { + method @NonNull public android.net.ipsec.ike.IkeSessionParams.IkeAuthConfig getLocalAuthConfig(); + method @NonNull public android.net.ipsec.ike.IkeIdentification getLocalIdentification(); + method @NonNull public android.net.ipsec.ike.IkeSessionParams.IkeAuthConfig getRemoteAuthConfig(); + method @NonNull public android.net.ipsec.ike.IkeIdentification getRemoteIdentification(); + method @NonNull public java.util.List getSaProposals(); + method @NonNull public java.net.InetAddress getServerAddress(); + method @NonNull public android.net.IpSecManager.UdpEncapsulationSocket getUdpEncapsulationSocket(); } public static final class IkeSessionParams.Builder { @@ -4524,6 +4534,27 @@ package android.net.ipsec.ike { method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setUdpEncapsulationSocket(@NonNull android.net.IpSecManager.UdpEncapsulationSocket); } + public abstract static class IkeSessionParams.IkeAuthConfig { + } + + public static class IkeSessionParams.IkeAuthDigitalSignLocalConfig extends android.net.ipsec.ike.IkeSessionParams.IkeAuthConfig { + method @NonNull public java.security.cert.X509Certificate getClientEndCertificate(); + method @NonNull public java.util.List getIntermediateCertificates(); + method @NonNull public java.security.PrivateKey getPrivateKey(); + } + + public static class IkeSessionParams.IkeAuthDigitalSignRemoteConfig extends android.net.ipsec.ike.IkeSessionParams.IkeAuthConfig { + method @NonNull public java.security.cert.X509Certificate getRemoteCaCert(); + } + + public static class IkeSessionParams.IkeAuthEapConfig extends android.net.ipsec.ike.IkeSessionParams.IkeAuthConfig { + method @NonNull public android.net.eap.EapSessionConfig getEapConfig(); + } + + public static class IkeSessionParams.IkeAuthPskConfig extends android.net.ipsec.ike.IkeSessionParams.IkeAuthConfig { + method @NonNull public byte[] getPsk(); + } + public final class IkeTrafficSelector { ctor public IkeTrafficSelector(int, int, @NonNull java.net.InetAddress, @NonNull java.net.InetAddress); field public final int endPort; @@ -4570,6 +4601,7 @@ package android.net.ipsec.ike { } public final class TunnelModeChildSessionParams extends android.net.ipsec.ike.ChildSessionParams { + method @NonNull public java.util.List getConfigurationRequests(); } public static final class TunnelModeChildSessionParams.Builder { @@ -4587,6 +4619,39 @@ package android.net.ipsec.ike { method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams build(); } + public static interface TunnelModeChildSessionParams.ConfigRequest { + } + + public static interface TunnelModeChildSessionParams.ConfigRequestIpv4Address extends android.net.ipsec.ike.TunnelModeChildSessionParams.ConfigRequest { + method @Nullable public java.net.Inet4Address getAddress(); + } + + public static interface TunnelModeChildSessionParams.ConfigRequestIpv4DhcpServer extends android.net.ipsec.ike.TunnelModeChildSessionParams.ConfigRequest { + method @Nullable public java.net.Inet4Address getAddress(); + } + + public static interface TunnelModeChildSessionParams.ConfigRequestIpv4DnsServer extends android.net.ipsec.ike.TunnelModeChildSessionParams.ConfigRequest { + method @Nullable public java.net.Inet4Address getAddress(); + } + + public static interface TunnelModeChildSessionParams.ConfigRequestIpv4Netmask extends android.net.ipsec.ike.TunnelModeChildSessionParams.ConfigRequest { + } + + public static interface TunnelModeChildSessionParams.ConfigRequestIpv4Subnet extends android.net.ipsec.ike.TunnelModeChildSessionParams.ConfigRequest { + } + + public static interface TunnelModeChildSessionParams.ConfigRequestIpv6Address extends android.net.ipsec.ike.TunnelModeChildSessionParams.ConfigRequest { + method @Nullable public java.net.Inet6Address getAddress(); + method public int getPrefixLength(); + } + + public static interface TunnelModeChildSessionParams.ConfigRequestIpv6DnsServer extends android.net.ipsec.ike.TunnelModeChildSessionParams.ConfigRequest { + method @Nullable public java.net.Inet6Address getAddress(); + } + + public static interface TunnelModeChildSessionParams.ConfigRequestIpv6Subnet extends android.net.ipsec.ike.TunnelModeChildSessionParams.ConfigRequest { + } + } package android.net.ipsec.ike.exceptions {