Populate ipsecSecret field in VpnProfile
This commit fixes IKEv2 RSA VPN could not be an always-on VPN issue to populate ipsecSecret field from "IPsec user certificate". Fields ipsecUserCert and ipsecSecret are required for a valid VpnProfile. The ipsecSecret field in VpnProfile should be populated from "IPsec user certificate" field. It's the matching private key. Bug: 263610164 Bug: 230727391 Test: Verify if IKEv2 RSA VPN can setup successfully and set as as always on VPN Change-Id: I605b35fff9e399ee7b82d8441137984992ab2907
This commit is contained in:
@@ -653,10 +653,14 @@ class ConfigDialog extends AlertDialog implements TextWatcher,
|
|||||||
profile.ipsecSecret = mIpsecSecret.getText().toString();
|
profile.ipsecSecret = mIpsecSecret.getText().toString();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case VpnProfile.TYPE_IKEV2_IPSEC_RSA:
|
||||||
|
if (mIpsecUserCert.getSelectedItemPosition() != 0) {
|
||||||
|
profile.ipsecSecret = (String) mIpsecUserCert.getSelectedItem();
|
||||||
|
}
|
||||||
|
// fall through
|
||||||
case VpnProfile.TYPE_L2TP_IPSEC_RSA:
|
case VpnProfile.TYPE_L2TP_IPSEC_RSA:
|
||||||
profile.l2tpSecret = mL2tpSecret.getText().toString();
|
profile.l2tpSecret = mL2tpSecret.getText().toString();
|
||||||
// fall through
|
// fall through
|
||||||
case VpnProfile.TYPE_IKEV2_IPSEC_RSA: // fall through
|
|
||||||
case VpnProfile.TYPE_IPSEC_XAUTH_RSA:
|
case VpnProfile.TYPE_IPSEC_XAUTH_RSA:
|
||||||
if (mIpsecUserCert.getSelectedItemPosition() != 0) {
|
if (mIpsecUserCert.getSelectedItemPosition() != 0) {
|
||||||
profile.ipsecUserCert = (String) mIpsecUserCert.getSelectedItem();
|
profile.ipsecUserCert = (String) mIpsecUserCert.getSelectedItem();
|
||||||
|
Reference in New Issue
Block a user