Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51ca6456 authored by Benedict Wong's avatar Benedict Wong Committed by android-build-merger
Browse files

Merge "Add support for auth-only transforms"

am: 275749c0

Change-Id: I75a4f75f7c8d0de40da329d4c0a86d546ee9fcb2
parents 50eb1bce 275749c0
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -37,6 +37,13 @@ import java.util.Arrays;
public final class IpSecAlgorithm implements Parcelable {
    private static final String TAG = "IpSecAlgorithm";

    /**
     * Null cipher.
     *
     * @hide
     */
    public static final String CRYPT_NULL = "ecb(cipher_null)";

    /**
     * AES-CBC Encryption/Ciphering Algorithm.
     *
+8 −1
Original line number Diff line number Diff line
@@ -1491,6 +1491,13 @@ public class IpSecService extends IIpSecService.Stub {
        IpSecAlgorithm crypt = c.getEncryption();
        IpSecAlgorithm authCrypt = c.getAuthenticatedEncryption();

        String cryptName;
        if (crypt == null) {
            cryptName = (authCrypt == null) ? IpSecAlgorithm.CRYPT_NULL : "";
        } else {
            cryptName = crypt.getName();
        }

        mSrvConfig
                .getNetdInstance()
                .ipSecAddSecurityAssociation(
@@ -1505,7 +1512,7 @@ public class IpSecService extends IIpSecService.Stub {
                        (auth != null) ? auth.getName() : "",
                        (auth != null) ? auth.getKey() : new byte[] {},
                        (auth != null) ? auth.getTruncationLengthBits() : 0,
                        (crypt != null) ? crypt.getName() : "",
                        cryptName,
                        (crypt != null) ? crypt.getKey() : new byte[] {},
                        (crypt != null) ? crypt.getTruncationLengthBits() : 0,
                        (authCrypt != null) ? authCrypt.getName() : "",