Update IpSecAlgorithm CTS for API compliance changes
Bug: 36073210, b/34811227 Test: verified on Bullhead Change-Id: I8f37016cc9aadafd3e58f6af535bd7bc1d0f4a96
This commit is contained in:
@@ -85,8 +85,7 @@ public class IpSecManagerTest extends AndroidTestCase {
|
||||
randomSpi =
|
||||
mISM.reserveSecurityParameterIndex(
|
||||
IpSecTransform.DIRECTION_OUT,
|
||||
addr,
|
||||
IpSecManager.INVALID_SECURITY_PARAMETER_INDEX);
|
||||
addr);
|
||||
assertTrue(randomSpi.getSpi() != IpSecManager.INVALID_SECURITY_PARAMETER_INDEX);
|
||||
|
||||
droidSpi =
|
||||
@@ -121,8 +120,7 @@ public class IpSecManagerTest extends AndroidTestCase {
|
||||
IpSecManager.SecurityParameterIndex outSpi =
|
||||
mISM.reserveSecurityParameterIndex(
|
||||
IpSecTransform.DIRECTION_OUT,
|
||||
local,
|
||||
IpSecManager.INVALID_SECURITY_PARAMETER_INDEX);
|
||||
local);
|
||||
|
||||
IpSecManager.SecurityParameterIndex inSpi =
|
||||
mISM.reserveSecurityParameterIndex(
|
||||
@@ -133,21 +131,21 @@ public class IpSecManagerTest extends AndroidTestCase {
|
||||
.setSpi(IpSecTransform.DIRECTION_OUT, outSpi)
|
||||
.setEncryption(
|
||||
IpSecTransform.DIRECTION_OUT,
|
||||
new IpSecAlgorithm(IpSecAlgorithm.ALGO_CRYPT_AES_CBC, CRYPT_KEY))
|
||||
new IpSecAlgorithm(IpSecAlgorithm.CRYPT_AES_CBC, CRYPT_KEY))
|
||||
.setAuthentication(
|
||||
IpSecTransform.DIRECTION_OUT,
|
||||
new IpSecAlgorithm(
|
||||
IpSecAlgorithm.ALGO_AUTH_HMAC_SHA256,
|
||||
IpSecAlgorithm.AUTH_HMAC_SHA256,
|
||||
AUTH_KEY,
|
||||
AUTH_KEY.length * 8))
|
||||
.setSpi(IpSecTransform.DIRECTION_IN, inSpi)
|
||||
.setEncryption(
|
||||
IpSecTransform.DIRECTION_IN,
|
||||
new IpSecAlgorithm(IpSecAlgorithm.ALGO_CRYPT_AES_CBC, CRYPT_KEY))
|
||||
new IpSecAlgorithm(IpSecAlgorithm.CRYPT_AES_CBC, CRYPT_KEY))
|
||||
.setAuthentication(
|
||||
IpSecTransform.DIRECTION_IN,
|
||||
new IpSecAlgorithm(
|
||||
IpSecAlgorithm.ALGO_AUTH_HMAC_SHA256,
|
||||
IpSecAlgorithm.AUTH_HMAC_SHA256,
|
||||
AUTH_KEY,
|
||||
CRYPT_KEY.length * 8))
|
||||
.buildTransportModeTransform(local);
|
||||
|
||||
Reference in New Issue
Block a user