aboutsummaryrefslogtreecommitdiff
path: root/tests/iketests/src/java/com/android
AgeCommit message (Collapse)Author
2018-10-18Merge "Encode unencrypted IKE message to byte array"Yan Yan
2018-10-16Add methods for validating Attribute and Transformevitayan
This commit: - Create SaProposal for user to provide SA proposal using IKE standard number - Make Attribute abstract and create subclasses: KeyLengthAttribute and UnrecognizedAttribute - Validate syntax of attributeList: no multiple Attribute with same Attribute Type - Make Transform abstract and create subclasses: EncryptionTransform and UnrecognizedTransform - Validate recognized Transform: - Check if Transform ID is recognized - Check if UnrecognizedAttribute exsits - Validate key length Bug: 115994442 Test: FrameworksIkeTests IkeSaPayloadTest Change-Id: I4c40a3dead8ea7986e4b0880348490e3bf4e4397
2018-10-05Encode unencrypted IKE message to byte arrayevitayan
This commit: - Add a method to encode IkeMessage - Correct name of exchange type to be consistent with the spec Bug: 116149910 Test: FrameworksIkeTests IkeMessageTest Change-Id: I9cd22e1875c3affe3a11bf8fd9b016a79f42ee94
2018-10-05Merge "Encode IKE header"Yan Yan
2018-10-02Encode IKE headerevitayan
This commit: - Add method for encoding IKE header - Create IkeHeaderTest Bug: 116149910 Test: FrameworksIkeTests IkeIkeHeaderTest Change-Id: Ib5507330183184583a0e82296694dad2e68e9e17
2018-10-02Build Notify Payloadevitayan
This commit creates two constructors for building Notify Payload for IKE SA and Child SA respectively Bug: 116327306 Test: FrameworksIkeTests IkeNotifyPayloadTest Change-Id: I1330ea7990dd3be90d068d76753103a8636b5b9a
2018-09-19Encode KE Payload and Notify Payloadevitayan
This commit: - Implement encoding KE Payload and Notify Payload - Fix a bug in validating Notify type when decoding Notify Payload Bug: 116004352 Test: FrameworksIkeTests IkeKePayloadTest, IkeNotifyPayload Change-Id: Ib68cbcc06ad82319c384fad99f470751db994809
2018-09-17Encode Nonce Payloadevitayan
This commit: - Change encode method to take a ByteBuffer - Change encodePayloadHeader to take a ByteBuffer - Add abstract getPayloadLength method in IkePayload - Add encodePayloads method in IkeMessage - Implement encoding Nonce Payload Bug: 112471425 Test: FrameworksIkeTests IkeNoncePayloadTest Change-Id: I4faa4c5919af0f333afcf1c57615f8cc0930f74b
2018-09-14Add methods for DH key exchangeevitayan
This commits: - Add a method for generating DH keys - Add a method for calculating shared secret - Add KeyExchangeUtils class - Move DH group type constants to IkePayload for both KE and SA payloads use it Bug: 112044006 Test: FrameworksIkeTests IkeKePayloadTest, MessageUtilsTest Change-Id: Ia9fded40ff7fb4efc4abd6f2910678d8e52fd666
2018-09-11Add abstract encode method in IkePayloadevitayan
This commit: - Add abstract encode method in IkePayload - Temporarily throw exception in all subclasses' encode method - Add abstract getTypeString method in IkePayload and implement it in all subclasses Bug: 115358137 Test: FrameworksIkeTests Change-Id: Ida0b0dd93522118fa1408fedf60fec86b1f62ef5
2018-09-04Decode Notify Payloadevitayan
Decode Notify Payload and validate its syntax Bug: 112769392 Test: FrameworksIkeTests IkeNotifyPayloadTest Change-Id: I811bb1462f2f1cb0278222154d32050f8477f732
2018-08-13Decode KE payloadevitayan
This commits: - Create IkeKePayload class and add a constructor for decoding and validating. - Add IkeKePayloadTest - Add MessageTestUtil containing commonly used method for test files. Bug: 112044006 Test: FrameworksIkeTests IkeKePayloadTest Change-Id: Id82cdf8005a4cb5cc3e89e74db7449b22c153e17
2018-08-09Decode SA Payloadevitayan
Add IkeSaPayload class and implement decoding process Bug: 110472861 Test: FrameworksIkeTests IkeSaPayloadTest Change-Id: Ibee21956f2fc9beaef351c299a0dc3cc986fa84d
2018-07-30Make IkeMessage.decode testableevitayan
This CL make some changes in IkePayloadFactory to make decoding message testable: - Add a static field in IkePayloadFactory which is the default instance for decoding IkePayload - Remove testDecodeIkePayload and add testDecodeIkeMessage - Add TestIkeSupportedPayload class in test file - Remove unnecessary @PayloadType anotation Bug:110435061 Test: FrameworksIkeTests - testDecodeIkeMessage TestDecodeMessageWithUnsupportedUncriticalPayload Change-Id: I4a7ea40b88580de5f9de8ea460825814b8c865c0
2018-07-24Validate IKE message during decodingevitayan
This commit: - Add IkeException class and three IKE Exception types - Add methods for validating IKE header and IKE body - Make IkePayload abstract - Add IkePayloadFactory for creating IKE payload - Add IkeUnsupportedPayload for unsupported IKE payload type Bug: 110435061 Test: FrameworksIkeTests - testThrowInvalidMajorVersionException, testThrowInvalidSyntaxException, testThrowUnsupportedCriticalPayloadException Change-Id: I99a8f4ffc9e558d62122739868d7e53d035283a2
2018-07-12Decode generic IKE payload headerevitayan
-Add a new IkePayload type and relevant enums -Decode IkeMessage body into a List of generic IkePayloads -Fix a signed-overflow bug in decoding IKE major version IkePayload is currently instantiated by a constructor; following CLs will implement a factory to instantiate different subclasses of IkePayload according to its type. Bug: 110435061 Test: FrameworksIkeTests - testDecodeIkePayload Change-Id: Ia3f78bf58f6e7e058140a669be6cfbc658bf8701
2018-06-29Decode IKE headerevitayan
This commit creates IkeHeader and implements decoding methods. Bug:110435061 Test: FrameworksIkeTests - testDecodeIkeHeader Change-Id: I8ddc790330d5fd92a6d5ee003571e7bdffbe24fa
2018-06-25Create directories and makefiles for IKE projectevitayan
This commit creates the directories and makefiles for IKE. It adds empty IkeMessage class and IkeMessageTest class. Following CLs will provide implementations. In this IKE project, we put all codes for IKEv2 in 'ike/src/java/com/android/ike/ikev2'. Thus we can have other folders for EAP or even IKEv3 outside IKEv2 folder. All of them share the same makefile that is under ike/. Bug:110435061 Test: Added: empty test file IkeMessageTest Test: Ran FrameworksIkeTests Test: Verified it runs properly on walleye Change-Id: I54ae02e726380025d6e5ca5088542c55f5b28c0c