Home
last modified time | relevance | path

Searched refs:IpSecManager (Results 1 – 25 of 55) sorted by relevance

123

/packages/modules/Connectivity/tests/unit/java/android/net/
DIpSecManagerTest.java78 private IpSecManager mIpSecManager;
89 mIpSecManager = new IpSecManager(mMockContext, mMockIpSecService); in setUp()
99 new IpSecSpiResponse(IpSecManager.Status.OK, DUMMY_RESOURCE_ID, DROID_SPI); in testAllocSpi()
106 IpSecManager.SecurityParameterIndex droidSpi = in testAllocSpi()
118 new IpSecSpiResponse(IpSecManager.Status.OK, DUMMY_RESOURCE_ID, DROID_SPI); in testAllocRandomSpi()
121 eq(IpSecManager.INVALID_SECURITY_PARAMETER_INDEX), in testAllocRandomSpi()
125 IpSecManager.SecurityParameterIndex randomSpi = in testAllocRandomSpi()
141 new IpSecSpiResponse(IpSecManager.Status.RESOURCE_UNAVAILABLE, 0, 0); in testAllocSpiResUnavailableException()
149 } catch (IpSecManager.ResourceUnavailableException e) { in testAllocSpiResUnavailableException()
158 IpSecSpiResponse spiResp = new IpSecSpiResponse(IpSecManager.Status.SPI_UNAVAILABLE, 0, 0); in testAllocSpiSpiUnavailableException()
[all …]
DIpSecTransformTest.java65 private IpSecManager mIpSecManager;
70 mIpSecManager = new IpSecManager(mock(Context.class) /* unused */, mMockIpSecService); in setUp()
78 if (serviceClass.equals(IpSecManager.class)) { in setUp()
99 new IpSecSpiResponse(IpSecManager.Status.OK, TEST_RESOURCE_ID, DROID_SPI); in setUp()
104 new IpSecTransformResponse(IpSecManager.Status.OK, TEST_RESOURCE_ID); in setUp()
139 final IpSecManager.SecurityParameterIndex spi = in buildTestTransform()
/packages/modules/Connectivity/framework-t/src/android/net/
DIpSecTransform.java18 import static android.net.IpSecManager.Flags.IPSEC_TRANSFORM_STATE;
19 import static android.net.IpSecManager.INVALID_RESOURCE_ID;
99 private IpSecManager getIpSecManager(Context context) { in getIpSecManager()
100 return context.getSystemService(IpSecManager.class); in getIpSecManager()
106 throws IOException, IpSecManager.ResourceUnavailableException, in checkResultStatus()
107 IpSecManager.SpiUnavailableException { in checkResultStatus()
109 case IpSecManager.Status.OK: in checkResultStatus()
112 case IpSecManager.Status.RESOURCE_UNAVAILABLE: in checkResultStatus()
113 throw new IpSecManager.ResourceUnavailableException( in checkResultStatus()
115 case IpSecManager.Status.SPI_UNAVAILABLE: in checkResultStatus()
[all …]
DIpSecUdpEncapResponse.java60 if (inStatus == IpSecManager.Status.OK) { in IpSecUdpEncapResponse()
64 resourceId = IpSecManager.INVALID_RESOURCE_ID; in IpSecUdpEncapResponse()
71 if (inStatus == IpSecManager.Status.OK && inFd == null) { in IpSecUdpEncapResponse()
77 fileDescriptor = (status == IpSecManager.Status.OK) ? ParcelFileDescriptor.dup(inFd) : null; in IpSecUdpEncapResponse()
DIpSecSpiResponse.java54 if (inStatus == IpSecManager.Status.OK) { in IpSecSpiResponse()
58 resourceId = IpSecManager.INVALID_RESOURCE_ID; in IpSecSpiResponse()
59 spi = IpSecManager.INVALID_SECURITY_PARAMETER_INDEX; in IpSecSpiResponse()
DIpSecTransformResponse.java46 if (inStatus == IpSecManager.Status.OK) { in IpSecTransformResponse()
50 resourceId = IpSecManager.INVALID_RESOURCE_ID; in IpSecTransformResponse()
DIpSecTunnelInterfaceResponse.java48 if (inStatus == IpSecManager.Status.OK) { in IpSecTunnelInterfaceResponse()
52 resourceId = IpSecManager.INVALID_RESOURCE_ID; in IpSecTunnelInterfaceResponse()
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/testutils/
DMockIpSecTestUtils.java30 import android.net.IpSecManager;
49 private IpSecManager mIpSecManager;
54 mIpSecManager = new IpSecManager(mContext, mMockIpSecService); in MockIpSecTestUtils()
59 IpSecManager.Status.OK, in MockIpSecTestUtils()
66 IpSecManager.Status.OK, in MockIpSecTestUtils()
77 return new IpSecSpiResponse(IpSecManager.Status.OK, DUMMY_CHILD_SPI_RESOURCE_ID, spi); in buildDummyIpSecSpiResponse()
82 IpSecManager.Status.OK, in buildDummyIpSecUdpEncapResponse()
92 public IpSecManager getIpSecManager() { in getIpSecManager()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/utils/
DIpSecSpiGenerator.java19 import android.net.IpSecManager;
20 import android.net.IpSecManager.ResourceUnavailableException;
21 import android.net.IpSecManager.SecurityParameterIndex;
22 import android.net.IpSecManager.SpiUnavailableException;
30 private final IpSecManager mIpSecManager;
39 @NonNull IpSecManager ipSecManager, RandomnessFactory randomnessFactory) { in IpSecSpiGenerator()
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DIpSecBaseTest.java34 import android.net.IpSecManager;
88 new int[] {IpSecManager.DIRECTION_IN, IpSecManager.DIRECTION_OUT};
119 protected IpSecManager mISM;
124 (IpSecManager) in setUp()
218 IpSecManager ism, int direction, IpSecTransform transform) throws Exception; in applyTransportModeTransform()
220 void removeTransportModeTransforms(IpSecManager ism) throws Exception; in removeTransportModeTransforms()
279 IpSecManager ism, int direction, IpSecTransform transform) throws Exception { in applyTransportModeTransform()
284 public void removeTransportModeTransforms(IpSecManager ism) throws Exception { in removeTransportModeTransforms()
366 IpSecManager ism, int direction, IpSecTransform transform) throws Exception { in applyTransportModeTransform()
371 public void removeTransportModeTransforms(IpSecManager ism) throws Exception { in removeTransportModeTransforms()
[all …]
DIpSecManagerTunnelTest.java20 import static android.net.IpSecManager.UdpEncapsulationSocket;
52 import android.net.IpSecManager;
53 import android.net.IpSecManager.IpSecTunnelInterface;
252 try (IpSecManager.SecurityParameterIndex spi = in testSecurityExceptionBuildTunnelTransformWithoutAppop()
394 socket.mSocket, IpSecManager.DIRECTION_IN, inTransportTransform); in getIpSecTunnelTestRunnable()
396 socket.mSocket, IpSecManager.DIRECTION_OUT, outTransportTransform); in getIpSecTunnelTestRunnable()
465 socket.mSocket, IpSecManager.DIRECTION_IN, outTransportTransform);
467 socket.mSocket, IpSecManager.DIRECTION_OUT, inTransportTransform);
514 socket.mSocket, IpSecManager.DIRECTION_IN, outTransportTransform);
516 socket.mSocket, IpSecManager.DIRECTION_OUT, inTransportTransform);
[all …]
DIpSecAlgorithmImplTest.java53 import android.net.IpSecManager;
89 private static final IpSecManager sIpSecManager =
90 InstrumentationRegistry.getContext().getSystemService(IpSecManager.class);
152 try (IpSecManager.SecurityParameterIndex outSpi = in runTest()
154 IpSecManager.SecurityParameterIndex inSpi = in runTest()
163 localSocket, IpSecManager.DIRECTION_IN, inTransform); in runTest()
165 localSocket, IpSecManager.DIRECTION_OUT, outTransform); in runTest()
/packages/modules/Connectivity/framework-t/hiddenapi/
Dhiddenapi-max-target-o-low-priority-tiramisu.txt287 Landroid/net/IpSecManager$IpSecTunnelInterface;-><init>(Landroid/content/Context;Landroid/net/IIpSe…
288 Landroid/net/IpSecManager$IpSecTunnelInterface;->addAddress(Ljava/net/InetAddress;I)V
289 Landroid/net/IpSecManager$IpSecTunnelInterface;->getInterfaceName()Ljava/lang/String;
290 Landroid/net/IpSecManager$IpSecTunnelInterface;->getResourceId()I
291 Landroid/net/IpSecManager$IpSecTunnelInterface;->mCloseGuard:Ldalvik/system/CloseGuard;
292 Landroid/net/IpSecManager$IpSecTunnelInterface;->mInterfaceName:Ljava/lang/String;
293 Landroid/net/IpSecManager$IpSecTunnelInterface;->mLocalAddress:Ljava/net/InetAddress;
294 Landroid/net/IpSecManager$IpSecTunnelInterface;->mOpPackageName:Ljava/lang/String;
295 Landroid/net/IpSecManager$IpSecTunnelInterface;->mRemoteAddress:Ljava/net/InetAddress;
296 Landroid/net/IpSecManager$IpSecTunnelInterface;->mResourceId:I
[all …]
/packages/modules/Connectivity/tests/unit/java/com/android/server/
DIpSecServiceTest.java42 import android.net.IpSecManager;
172 if (udpEncapResp.status == IpSecManager.Status.OK) { in testOpenAndCloseUdpEncapsulationSocket()
180 assertEquals(IpSecManager.Status.OK, udpEncapResp.status); in testOpenAndCloseUdpEncapsulationSocket()
226 assertEquals(IpSecManager.Status.OK, udpEncapResp.status); in testOpenUdpEncapsulationSocketAfterClose()
247 assertEquals(IpSecManager.Status.OK, udpEncapResp.status); in testUdpEncapPortNotReleased()
267 assertEquals(IpSecManager.Status.OK, udpEncapResp.status); in testOpenUdpEncapsulationSocketOnRandomPort()
293 assertEquals(IpSecManager.Status.OK, udpEncapResp.status); in testOpenUdpEncapsulationSocketTwice()
298 assertEquals(IpSecManager.Status.RESOURCE_UNAVAILABLE, testUdpEncapResp.status); in testOpenUdpEncapsulationSocketTwice()
478 if (IpSecManager.Status.OK != newUdpEncapSocket.status) { in testSocketResourceTrackerLimitation()
493 assertEquals(IpSecManager.Status.RESOURCE_UNAVAILABLE, extraUdpEncapSocket.status); in testSocketResourceTrackerLimitation()
[all …]
DIpSecServiceParameterizedTest.java23 import static android.net.IpSecManager.DIRECTION_FWD;
24 import static android.net.IpSecManager.DIRECTION_IN;
25 import static android.net.IpSecManager.DIRECTION_OUT;
26 import static android.net.IpSecManager.FEATURE_IPSEC_TUNNEL_MIGRATION;
58 import android.net.IpSecManager;
274 assertEquals(IpSecManager.Status.OK, spiResp.status); in testIpSecServiceReserveSpi()
352 IpSecManager.INVALID_SECURITY_PARAMETER_INDEX, in getNewSpiResourceId()
418 assertEquals(IpSecManager.Status.OK, createTransformResp.status); in testCreateTransform()
432 assertEquals(IpSecManager.Status.OK, createTransformResp.status); in testCreateTransformAead()
450 assertEquals(IpSecManager.Status.OK, createTransformResp.status); in testCreateTransportModeTransformWithEncap()
[all …]
/packages/modules/Connectivity/framework-t/api/
Dlint-baseline.txt18 …Builder#buildTransportModeTransform(java.net.InetAddress, android.net.IpSecManager.SecurityParamet…
19 ….Builder.buildTransportModeTransform(java.net.InetAddress,android.net.IpSecManager.SecurityParamet…
32 GenericException: android.net.IpSecManager.SecurityParameterIndex#finalize():
34 GenericException: android.net.IpSecManager.UdpEncapsulationSocket#finalize():
54 MissingNullability: android.net.IpSecManager.UdpEncapsulationSocket#getFileDescriptor():
76 UseParcelFileDescriptor: android.net.IpSecManager#applyTransportModeTransform(java.io.FileDescripto…
77 …scriptor instead of FileDescriptor in parameter socket in android.net.IpSecManager.applyTransportM…
78 UseParcelFileDescriptor: android.net.IpSecManager#removeTransportModeTransforms(java.io.FileDescrip…
79 …scriptor instead of FileDescriptor in parameter socket in android.net.IpSecManager.removeTransport…
80 UseParcelFileDescriptor: android.net.IpSecManager.UdpEncapsulationSocket#getFileDescriptor():
[all …]
Dcurrent.txt95 public class IpSecManager {
96 …android.net.IpSecManager.SecurityParameterIndex allocateSecurityParameterIndex(@NonNull java.net.I…
97IpSecManager.SecurityParameterIndex allocateSecurityParameterIndex(@NonNull java.net.InetAddress, …
101 …lic android.net.IpSecManager.UdpEncapsulationSocket openUdpEncapsulationSocket(int) throws java.io…
102 …ublic android.net.IpSecManager.UdpEncapsulationSocket openUdpEncapsulationSocket() throws java.io.…
110 …public static final class IpSecManager.ResourceUnavailableException extends android.util.AndroidEx…
113 public static final class IpSecManager.SecurityParameterIndex implements java.lang.AutoCloseable {
118 …public static final class IpSecManager.SpiUnavailableException extends android.util.AndroidExcepti…
122 public static final class IpSecManager.UdpEncapsulationSocket implements java.lang.AutoCloseable {
135 …net.IpSecManager.SecurityParameterIndex) throws java.io.IOException, android.net.IpSecManager.Reso…
[all …]
Dsystem-lint-baseline.txt2 …rm.Builder#buildTunnelModeTransform(java.net.InetAddress, android.net.IpSecManager.SecurityParamet…
3 …orm.Builder.buildTunnelModeTransform(java.net.InetAddress,android.net.IpSecManager.SecurityParamet…
6 GenericException: android.net.IpSecManager.IpSecTunnelInterface#finalize():
10 MissingPermission: android.net.IpSecManager#startTunnelModeTransformMigration(android.net.IpSecTran…
11 …Feature field FEATURE_IPSEC_TUNNEL_MIGRATION required by method android.net.IpSecManager.startTunn…
66 UnflaggedApi: android.net.IpSecManager.IpSecTunnelInterface#finalize():
67 …New API must be flagged with @FlaggedApi: method android.net.IpSecManager.IpSecTunnelInterface.fin…
68 UnflaggedApi: android.net.IpSecManager.IpSecTunnelInterface#toString():
69 …New API must be flagged with @FlaggedApi: method android.net.IpSecManager.IpSecTunnelInterface.toS…
70 …rm.Builder#buildTunnelModeTransform(java.net.InetAddress, android.net.IpSecManager.SecurityParamet…
[all …]
/packages/modules/IPsec/tests/cts/src/android/ipsec/ike/cts/
DIkeTestNetworkBase.java22 import android.net.IpSecManager;
136 public final IpSecManager.IpSecTunnelInterface tunnelIface;
148 final IpSecManager ipsecMgr = sContext.getSystemService(IpSecManager.class); in TunIpSecNetworkWrapper()
159 ipsecMgr.applyTunnelModeTransform(tunnelIface, IpSecManager.DIRECTION_IN, inTransform); in TunIpSecNetworkWrapper()
160 ipsecMgr.applyTunnelModeTransform(tunnelIface, IpSecManager.DIRECTION_OUT, inTransform); in TunIpSecNetworkWrapper()
/packages/modules/Connectivity/service-t/src/com/android/server/
DIpSecService.java21 import static android.net.IpSecManager.FEATURE_IPSEC_TUNNEL_MIGRATION;
22 import static android.net.IpSecManager.INVALID_RESOURCE_ID;
40 import android.net.IpSecManager;
769 mSpi = IpSecManager.INVALID_SECURITY_PARAMETER_INDEX; in freeUnderlyingResources()
916 IpSecManager.DIRECTION_OUT, in freeUnderlyingResources()
923 IpSecManager.DIRECTION_IN, in freeUnderlyingResources()
930 IpSecManager.DIRECTION_FWD, in freeUnderlyingResources()
1152 case IpSecManager.DIRECTION_OUT: in checkDirection()
1153 case IpSecManager.DIRECTION_IN: in checkDirection()
1155 case IpSecManager.DIRECTION_FWD: in checkDirection()
[all …]
/packages/modules/IPsec/src/java/com/android/internal/net/annotations/
DPolicyDirection.java20 import android.net.IpSecManager;
29 @IntDef(value = {IpSecManager.DIRECTION_IN, IpSecManager.DIRECTION_OUT})
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/
DIkeUdpEncapSocketTest.java32 import android.net.IpSecManager;
33 import android.net.IpSecManager.ResourceUnavailableException;
34 import android.net.IpSecManager.UdpEncapsulationSocket;
64 private IpSecManager mSpyIpSecManager;
87 IpSecManager ipSecManager = (IpSecManager) context.getSystemService(Context.IPSEC_SERVICE); in setUp()
91 IpSecManager dummyIpSecManager = mockIpSecTestUtils.getIpSecManager(); in setUp()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/
DIkeUdpEncapSocket.java21 import android.net.IpSecManager;
22 import android.net.IpSecManager.ResourceUnavailableException;
23 import android.net.IpSecManager.UdpEncapsulationSocket;
80 IpSecManager ipsecManager, in getIkeUdpEncapSocket()
/packages/modules/IPsec/src/java/android/net/ipsec/ike/
DIkeSession.java32 import android.net.IpSecManager;
124 (IpSecManager) context.getSystemService(Context.IPSEC_SERVICE), in IkeSession()
136 IpSecManager ipSecManager, in IkeSession()
158 IpSecManager ipSecManager, in IkeSession()
DChildSessionCallback.java22 import android.net.IpSecManager;
23 import android.net.IpSecManager.IpSecTunnelInterface;

123