summaryrefslogtreecommitdiff
path: root/core/java/android/net/IpSecConfig.java
Commit message (Collapse)AuthorAgeFilesLines
* Move IpSec associated files to f/b/packages/ConnectivityTAaron Huang2021-12-141-358/+0
| | | | | | | | | | | | | IpSecService is going to be moved into Connectivity mainline module. Move all ipsec associated files to packages/ConnectivityT so that it can be easily migrate these files to connectivity module after clearing the hidden API usages. Bug: 204153604 Test: build pass FrameworksNetTests CtsNetTestCases Change-Id: I562b47f18e345988a2638cf886f86818f9144b91
* Merge "Factorize custom asserts." am: 6c176efa3dChalard Jean2019-06-201-20/+21
|\ | | | | | | | | | | am: 99fbb40990 Change-Id: I65ea7497abb8b77ebd10ba622075ef3b6c49b2a8
| * Factorize custom asserts.Chalard Jean2019-06-201-20/+21
| | | | | | | | | | | | | | | | Also a few utilities that were in the way, and some opportunistic cleanups. Test: FrameworksNetTest NetworkStackTest Change-Id: I385070e2044fd967cb18f1ffea9a86a4627b742e
* | All Parcelable CREATOR fields are @NonNull.Jeff Sharkey2019-02-281-1/+1
|/ | | | | | | | | If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
* Add XFRM-I support to IpSecServiceBenedict Wong2018-11-211-3/+19
| | | | | | | | | | This change adds support for XFRM-I to all IpSecService netd calls. Fallback logic is in netd, and thus both VTI and XFRM-I parameters are always passed down to IpSecService. Bug: 78589502 Test: All java, CTS tests passing Change-Id: Ie4186f0ad7e50763b21831f6fa411b5ee436de78
* Disable attempted updating of SA marksBenedict Wong2018-11-211-1/+13
| | | | | | | | | | SA marks are never updated during the UPDSA call. This change disables the attempts to update the specified SAs, ensuring that the config stored in IpSecService matches that of the allocated kernel resources. Bug: 111854872 Test: Unit, CTS tests passing Change-Id: Ic1fb862c8021ffa260c3e262ec698d8af0a826d9
* Copy IpSecConfig when IpSecTransforms are createdBenedict Wong2018-02-131-0/+19
| | | | | | | | | | This change prevents IpSecTransforms from being inadvertently modified by changes to the IpSecConfig. Specifically, once the transform is created, it takes a copy of the config, rather than a reference. Bug: 69385347 Test: New tests added, and all test passing Change-Id: I89b8660c175ca20aa70352dcda893434ff7fd42b
* Add xfrm mark in IpSecConfigDi Lu2018-01-181-1/+31
| | | | | | Bug: 63589600 Test: runtest frameworks-net Change-Id: I2d38d781b8b31d8bf39fd4e9a7e31509f15a9e16
* Make Transforms UnidirectionalNathan Harold2018-01-161-111/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | Convert the IpSecTransform from being a bi-directional pair of SAs to a unidirectional single SA. This CL also removes the concept of "direction from SAs meaning that a IpSecTransform may now be applied to a socket in either direction. -Make transforms unidirectional -Add Convert allocateSpi() to use destination rather than direction and remote address -Remove directionality from builders for IpSecTransform -Change applyTransportModeTransform() to take a direction in which to apply the transform object. -Additional minor naming updates -Restrict IpSecConfig to only print keys on eng builds -Move DIRECTION constants to IpSecManager -Add sourceAddress parameter to IpSecTransform to provide additional guarantees about the source address of data; (explicit failure rather than implicit failure). -Move SPI to the build() method of IpSecTransform Bug: 71717213 Test: runtest frameworks-net, CTS - IpSecManagerTest Change-Id: I0824b37f443f4b8c62536d9801238c63ed8f2a1c
* IpSec Invalidate the Resource IDs on close()Nathan Harold2018-01-041-6/+0
| | | | | | | | | | | | To facilitate error checking we should invalidate the resource IDs of all objects when we close() them. Today, the resource ID is invalidated on the Transform object but not on the SPI or Encap Socket. This CL unifies the behavior. Bug: 70641274 Test: cts - IpSecManagerTest Change-Id: I28caec3e913902c748c6a50b4ef742ccef8b1b09
* Javadoc cleanup of IpSecManager API.Jonathan Basseri2017-11-201-1/+9
| | | | | | | | | This changes only comments and annotations, which results in minor API changes. Bug: 63777932 Test: `make update-api` and visually inspect generated HTML. Change-Id: I7a7a9244eade6cc55aca17a47e0a838cd6f84cc9
* Add support for AES-GCM-ESP as an IPSec algorithmBenedict Wong2017-10-181-0/+20
| | | | | | | | | Allows native AES-GCM-ESP to be used as an IPSec transport/tunnel mode algorithm with kernel support Bug: 63589918 Test: IPsecService tests added, existing ones pass Change-Id: Ie1a9a902be205f269aa37bf956198f2e5b177c21
* Cosmetic Cleanups for IpSecServiceNathan Harold2017-10-041-1/+2
| | | | | | | | | | | This is a follow-up CL to address comments on aosp/466677 -Rename ManagedResourceArray.get() -Comment cleanup Bug: 38397094 Test: runtest frameworks-net Change-Id: I6fbdd89c4a864fe1d8a19c68947f582d7b1f0f21
* Add equals() for IpSecAlgorithm and IpSecConfigNathan Harold2017-10-031-0/+27
| | | | | | | | | Add equality testing methods to support tests for parceling and un-parceling IpSecConfig. Bug: 38397094 Test: runtest -x IpSecConfigTest.java Change-Id: I31e318334d39ed6e9daf5ec8f3be7dcec75e12ad
* Input Validation for IpSecServiceNathan Harold2017-10-031-101/+145
| | | | | | | | | | | | | | | | | | | | | | | | All of the input to IpSecService over the Binder interface needs to be validated both for sanity and for safety. -Sanity check all the parameters coming from binder. -Added setters for IpSecConfig to decouple the test from the IpSecManager. This was needed because the input validation caused the tests to fail due to a null parameter that was previously un-tested. -Added the mode flag to the IpSecConfig bundle this oversight was found during testing. -Expose the getResourceId() methods for testing in UdpEncapsulationSocket, SecurityParameterIndex, and IpSecTransform classes. -Remove the unneeded getIpSecConfig() from IpSecTransform: unneeded now that we can synthesize configs. Bug: 38397094 Test: runtest frameworks-net Change-Id: I5241fc7fbfa9816d54219acd8d81a9f7eef10dd4
* Add dump info to IpSecServiceludi2017-07-241-1/+43
| | | | | | | | Bug:38350824 Test: runtest frameworks-net Change-Id: Ifa11d55e9d337016ad865baada627db3aa8c2db3
* Add UDP Encap Socket Support to IpSecManagerNathan Harold2017-06-021-12/+12
| | | | | | | | | | | -Implement the UdpEncapsulationSocket -Convert all ManagedResources to use resourceIds -Rework ManagedResource to track resourceIds Bug: 30984788 Test: cts - IpSecManagerTest#testUdpEncapsulation() Change-Id: I7b1099c487051a8d951c1485791c4b6cef2deb1d
* Add Initial IPsec APIs to IpSecServiceNathan Harold2017-03-311-44/+26
| | | | | | | | | -Plumb IpSecManager APIs to NetD -Add Resource Management to IpSecService Bug: 33695893 Test: CTS verifies nearly all of these paths Change-Id: Ic43965c6158f28cac53810adbf5cf50d2c54f920
* Add API Surface for creating IpSec TransformsNathan Harold2017-02-281-0/+197
This CL adds an API to set up an IPSec Security Association and Security Policy to perform Transport-Mode and Tunnel-Mode encapuslation of IP Packets. Bug: 30984788 Bug: 34811752 Test: 34812052, 34811227 Change-Id: Ic9f63c7bb366302a24baa3e1b79020210910ac0a