Merge "Implement Ikev2VpnRunner" am: e334a83e46
Change-Id: I9b966b52f78fa54dca9d8c3032ec26ed853ad572
This commit is contained in:
@@ -51,7 +51,7 @@ import java.net.Socket;
|
|||||||
*
|
*
|
||||||
* <p>Note that not all aspects of IPsec are permitted by this API. Applications may create
|
* <p>Note that not all aspects of IPsec are permitted by this API. Applications may create
|
||||||
* transport mode security associations and apply them to individual sockets. Applications looking
|
* transport mode security associations and apply them to individual sockets. Applications looking
|
||||||
* to create a VPN should use {@link VpnService}.
|
* to create an IPsec VPN should use {@link VpnManager} and {@link Ikev2VpnProfile}.
|
||||||
*
|
*
|
||||||
* @see <a href="https://tools.ietf.org/html/rfc4301">RFC 4301, Security Architecture for the
|
* @see <a href="https://tools.ietf.org/html/rfc4301">RFC 4301, Security Architecture for the
|
||||||
* Internet Protocol</a>
|
* Internet Protocol</a>
|
||||||
|
|||||||
@@ -1557,16 +1557,16 @@ public class IpSecService extends IIpSecService.Stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
checkNotNull(callingPackage, "Null calling package cannot create IpSec tunnels");
|
checkNotNull(callingPackage, "Null calling package cannot create IpSec tunnels");
|
||||||
switch (getAppOpsManager().noteOp(TUNNEL_OP, Binder.getCallingUid(), callingPackage)) {
|
|
||||||
case AppOpsManager.MODE_DEFAULT:
|
// OP_MANAGE_IPSEC_TUNNELS will return MODE_ERRORED by default, including for the system
|
||||||
mContext.enforceCallingOrSelfPermission(
|
// server. If the appop is not granted, require that the caller has the MANAGE_IPSEC_TUNNELS
|
||||||
android.Manifest.permission.MANAGE_IPSEC_TUNNELS, "IpSecService");
|
// permission or is the System Server.
|
||||||
break;
|
if (AppOpsManager.MODE_ALLOWED == getAppOpsManager().noteOpNoThrow(
|
||||||
case AppOpsManager.MODE_ALLOWED:
|
TUNNEL_OP, Binder.getCallingUid(), callingPackage)) {
|
||||||
return;
|
return;
|
||||||
default:
|
|
||||||
throw new SecurityException("Request to ignore AppOps for non-legacy API");
|
|
||||||
}
|
}
|
||||||
|
mContext.enforceCallingOrSelfPermission(
|
||||||
|
android.Manifest.permission.MANAGE_IPSEC_TUNNELS, "IpSecService");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createOrUpdateTransform(
|
private void createOrUpdateTransform(
|
||||||
|
|||||||
Reference in New Issue
Block a user