Home
last modified time | relevance | path

Searched refs:inputPacket (Results 1 – 12 of 12) sorted by relevance

/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/message/
DIkeSaPayloadTest.java266 byte[] inputPacket = TestUtils.hexStringToByteArray(ATTRIBUTE_RAW_PACKET); in testDecodeAttribute()
267 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodeAttribute()
289 byte[] inputPacket = TestUtils.hexStringToByteArray(ENCR_TRANSFORM_RAW_PACKET); in testDecodeEncryptionTransform()
290 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodeEncryptionTransform()
305 byte[] inputPacket = TestUtils.hexStringToByteArray(ENCR_TRANSFORM_RAW_PACKET); in testDecodeEncryptionTransformWithInvalidKeyLength()
306 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodeEncryptionTransformWithInvalidKeyLength()
351 byte[] inputPacket = TestUtils.hexStringToByteArray(PRF_TRANSFORM_RAW_PACKET); in testDecodePrfTransform()
352 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodePrfTransform()
386 byte[] inputPacket = TestUtils.hexStringToByteArray(INTEG_TRANSFORM_RAW_PACKET); in testDecodeIntegrityTransform()
387 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodeIntegrityTransform()
[all …]
DIkeHeaderTest.java77 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeIkeHeader()
78 IkeHeader header = new IkeHeader(inputPacket); in testDecodeIkeHeader()
80 assertEquals(IKE_MSG_LENGTH, inputPacket.length); in testDecodeIkeHeader()
99 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeIkeHeaderWithInvalidMajorVersion()
101 inputPacket[VERSION_OFFSET] = (byte) 0x30; in testDecodeIkeHeaderWithInvalidMajorVersion()
103 inputPacket[EXCHANGE_TYPE_OFFSET] = (byte) 0x00; in testDecodeIkeHeaderWithInvalidMajorVersion()
107 inputPacket, InvalidMajorVersionException.class); in testDecodeIkeHeaderWithInvalidMajorVersion()
114 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeIkeHeaderWithInvalidExchangeType()
116 inputPacket[EXCHANGE_TYPE_OFFSET] = (byte) 0x00; in testDecodeIkeHeaderWithInvalidExchangeType()
118 IkeTestUtils.decodeAndVerifyUnprotectedErrorMsg(inputPacket, InvalidSyntaxException.class); in testDecodeIkeHeaderWithInvalidExchangeType()
[all …]
DIkeIdPayloadTest.java108 byte[] inputPacket = in testDecodeIpv4AddrIdPayload()
110 IkeIdPayload payload = new IkeIdPayload(false, inputPacket, false); in testDecodeIpv4AddrIdPayload()
121 byte[] inputPacket = in testDecodeIpv6AddrIdPayload()
123 IkeIdPayload payload = new IkeIdPayload(false, inputPacket, false); in testDecodeIpv6AddrIdPayload()
134 byte[] inputPacket = TestUtils.hexStringToByteArray(FQDN_ID_PAYLOAD_BODY_HEX_STRING); in testDecodeFqdnIdPayload()
136 new IkeIdPayload(false /*critical*/, inputPacket, false /*isInitiator*/); in testDecodeFqdnIdPayload()
139 assertArrayEquals(inputPacket, payload.getEncodedPayloadBody()); in testDecodeFqdnIdPayload()
147 byte[] inputPacket = TestUtils.hexStringToByteArray(RFC822_ADDR_ID_PAYLOAD_BODY_HEX_STRING); in testDecodeRfc822AddrIdPayload()
149 new IkeIdPayload(false /*critical*/, inputPacket, true /*isInitiator*/); in testDecodeRfc822AddrIdPayload()
159 byte[] inputPacket = TestUtils.hexStringToByteArray(KEY_ID_PAYLOAD_BODY_HEX_STRING); in testDecodeKeyIdPayload()
[all …]
DIkeCertX509CertPayloadTest.java120 byte[] inputPacket = TestUtils.hexStringToByteArray(CERT_PAYLOAD_BODY_HEX_STRING); in testDecodeX509Certificate()
121 IkeCertPayload certPayload = IkeCertPayload.getIkeCertPayload(false, inputPacket); in testDecodeX509Certificate()
130 byte[] inputPacket = TestUtils.hexStringToByteArray(CERT_PAYLOAD_BODY_HEX_STRING + "ffff"); in testDecodeX509CertificateWithUnexpectedTrailing()
132 IkeCertPayload.getIkeCertPayload(false, inputPacket); in testDecodeX509CertificateWithUnexpectedTrailing()
140 byte[] inputPacket = TestUtils.hexStringToByteArray(CERT_PAYLOAD_BODY_HEX_STRING); in testDecodeGetNoX509Certificate()
141 inputPacket[CERTIFICATE_OFFSET] = 0; in testDecodeGetNoX509Certificate()
143 IkeCertPayload.getIkeCertPayload(false, inputPacket); in testDecodeGetNoX509Certificate()
151 byte[] inputPacket = TestUtils.hexStringToByteArray(CERT_PAYLOAD_BODY_HEX_STRING); in testDecodeInvalidX509Certificate()
154 false, Arrays.copyOfRange(inputPacket, 0, inputPacket.length - 1)); in testDecodeInvalidX509Certificate()
DIkeMessageTest.java307 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeIkeMessage()
308 IkeHeader header = new IkeHeader(inputPacket); in testDecodeIkeMessage()
310 DecodeResult decodeResult = IkeMessage.decode(0, header, inputPacket); in testDecodeIkeMessage()
312 IkeMessage message = verifyDecodeResultOkAndGetMessage(decodeResult, inputPacket); in testDecodeIkeMessage()
323 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testDecodeMessageWithUnsupportedUncriticalPayload()
325 inputPacket[FIRST_PAYLOAD_TYPE_OFFSET] = (byte) 0xff; in testDecodeMessageWithUnsupportedUncriticalPayload()
326 IkeHeader header = new IkeHeader(inputPacket); in testDecodeMessageWithUnsupportedUncriticalPayload()
328 DecodeResult decodeResult = IkeMessage.decode(0, header, inputPacket); in testDecodeMessageWithUnsupportedUncriticalPayload()
330 IkeMessage message = verifyDecodeResultOkAndGetMessage(decodeResult, inputPacket); in testDecodeMessageWithUnsupportedUncriticalPayload()
342 byte[] inputPacket = TestUtils.hexStringToByteArray(IKE_SA_INIT_RAW_PACKET); in testThrowUnsupportedCriticalPayloadException()
[all …]
DIkeAuthPayloadTest.java97 byte[] inputPacket = TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_HEX_STRING); in testDecodeIkeAuthPayload()
98 IkeAuthPayload payload = IkeAuthPayload.getIkeAuthPayload(false, inputPacket); in testDecodeIkeAuthPayload()
110 byte[] inputPacket = TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_HEX_STRING); in testDecodeIkeAuthPayloadWithUnsupportedMethod()
111 inputPacket[AUTH_METHOD_POSITION] = 0; in testDecodeIkeAuthPayloadWithUnsupportedMethod()
113 IkeAuthPayload payload = IkeAuthPayload.getIkeAuthPayload(false, inputPacket); in testDecodeIkeAuthPayloadWithUnsupportedMethod()
DIkeKePayloadTest.java104 byte[] inputPacket = TestUtils.hexStringToByteArray(KE_PAYLOAD_RAW_PACKET); in testDecodeIkeKePayload()
106 IkeKePayload payload = new IkeKePayload(CRITICAL_BIT, inputPacket); in testDecodeIkeKePayload()
123 byte[] inputPacket = TestUtils.hexStringToByteArray(badKeyPayloadPacket); in testDecodeIkeKePayloadWithInvalidKeData()
126 IkeKePayload payload = new IkeKePayload(CRITICAL_BIT, inputPacket); in testDecodeIkeKePayloadWithInvalidKeData()
134 byte[] inputPacket = TestUtils.hexStringToByteArray(KE_PAYLOAD_RAW_PACKET); in testEncodeIkeKePayload()
135 IkeKePayload payload = new IkeKePayload(CRITICAL_BIT, inputPacket); in testEncodeIkeKePayload()
DIkeNotifyPayloadTest.java98 byte[] inputPacket = in testDecodeNotifyPayloadSpiUnset()
102 IkeNotifyPayload payload = new IkeNotifyPayload(false, inputPacket); in testDecodeNotifyPayloadSpiUnset()
112 byte[] inputPacket = TestUtils.hexStringToByteArray(NOTIFY_REKEY_PAYLOAD_BODY_HEX_STRING); in testDecodeNotifyPayloadSpiSet()
114 IkeNotifyPayload payload = new IkeNotifyPayload(false, inputPacket); in testDecodeNotifyPayloadSpiSet()
227 byte[] inputPacket = in testEncodeNotifyPayload()
229 IkeNotifyPayload payload = new IkeNotifyPayload(false, inputPacket); in testEncodeNotifyPayload()
391 byte[] inputPacket = TestUtils.hexStringToByteArray(NOTIFY_REKEY_PAYLOAD_BODY_HEX_STRING); in testBuildIkeExceptionWithStatusNotify()
392 IkeNotifyPayload payload = new IkeNotifyPayload(false, inputPacket); in testBuildIkeExceptionWithStatusNotify()
DIkeAuthDigitalSignPayloadTest.java114 byte[] inputPacket = in testDecodeGenericDigitalSignPayload()
116 IkeAuthPayload payload = IkeAuthPayload.getIkeAuthPayload(false, inputPacket); in testDecodeGenericDigitalSignPayload()
186 byte[] inputPacket = in testVerifyInboundSignature()
189 (IkeAuthDigitalSignPayload) IkeAuthPayload.getIkeAuthPayload(false, inputPacket); in testVerifyInboundSignature()
204 byte[] inputPacket = in testVerifyInboundSignatureFail()
207 (IkeAuthDigitalSignPayload) IkeAuthPayload.getIkeAuthPayload(false, inputPacket); in testVerifyInboundSignatureFail()
DIkeTestUtils.java53 byte[] inputPacket, Class<T> expectedException) throws Exception { in decodeAndVerifyUnprotectedErrorMsg() argument
54 IkeHeader header = new IkeHeader(inputPacket); in decodeAndVerifyUnprotectedErrorMsg()
55 DecodeResult decodeResult = IkeMessage.decode(0, header, inputPacket); in decodeAndVerifyUnprotectedErrorMsg()
DIkeNoncePayloadTest.java39 byte[] inputPacket = TestUtils.hexStringToByteArray(NONCE_DATA_RAW_HEX_STRING); in testEncode()
40 IkeNoncePayload payload = new IkeNoncePayload(false, inputPacket); in testEncode()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/message/
DIkeMessage.java117 public static DecodeResult decode(int expectedMsgId, IkeHeader header, byte[] inputPacket) { in decode() argument
118 return sIkeMessageHelper.decode(expectedMsgId, header, inputPacket); in decode()
560 public DecodeResult decode(int expectedMsgId, IkeHeader header, byte[] inputPacket) { in decode() argument
567 header.validateInboundHeader(inputPacket.length); in decode()
571 inputPacket, IkeHeader.IKE_HEADER_LENGTH, inputPacket.length); in decode()
576 new IkeMessage(header, supportedPayloadList), inputPacket); in decode()
609 byte[] inputPacket, in decode() argument
628 inputPacket, in decode()
672 byte[] firstPacket = inputPacket; in decode()
678 validateFragmentHeader(header, inputPacket.length, collectedFragments); in decode()
[all …]