Added in API level 31

InvalidKeException


class InvalidKeException : IkeProtocolException

This exception is thrown when the remote server expected a different Diffie-Hellman group.

This exception indicates that the remote server received a different KE payload in the Child creation request from accepted Diffie-Hellman group. Callers can retry Child creation by proposing the expected DH group included in this exception.

Summary

Inherited constants
Int ERROR_TYPE_AUTHENTICATION_FAILED

IKE authentication failed

Int ERROR_TYPE_CHILD_SA_NOT_FOUND

Child SA in the received packet does not exist

Int ERROR_TYPE_FAILED_CP_REQUIRED

Configuration Payload required but not found in IKE setup

Int ERROR_TYPE_INTERNAL_ADDRESS_FAILURE

No internal addresses can be assigned

Int ERROR_TYPE_INVALID_IKE_SPI

Unrecognized destination IKE SPI

Int ERROR_TYPE_INVALID_KE_PAYLOAD

Invalid Key Exchange Payload

Int ERROR_TYPE_INVALID_MAJOR_VERSION

Invalid major version

Int ERROR_TYPE_INVALID_MESSAGE_ID

Invalid message ID

Int ERROR_TYPE_INVALID_SELECTORS

An IPsec Packet was found to have mismatched Traffic Selectors of the IPsec SA on which it was delivered

Int ERROR_TYPE_INVALID_SYNTAX

Invalid syntax

Int ERROR_TYPE_NO_ADDITIONAL_SAS

No additional SAa are acceptable

Int ERROR_TYPE_NO_PROPOSAL_CHOSEN

No SA Proposal Chosen is acceptable

Int ERROR_TYPE_SINGLE_PAIR_REQUIRED

Only Traffic Selectors specifying a single pair of addresses are acceptable

Int ERROR_TYPE_TEMPORARY_FAILURE

Temporary failure

Int ERROR_TYPE_TS_UNACCEPTABLE

No Traffic Selectors are acceptable

Int ERROR_TYPE_UNSUPPORTED_CRITICAL_PAYLOAD

Unsupported critical payload

Public constructors

Construct an instance of InvalidKeException.

Public methods
Int

Return the expected DH Group included in this exception.

Inherited functions
Int getErrorType()

Returns the IKE protocol error type of this IkeProtocolException instance.

Public constructors

InvalidKeException

Added in API level 31
InvalidKeException(dhGroup: Int)

Construct an instance of InvalidKeException.

Except for testing, IKE library users normally do not instantiate this object themselves but instead get a reference via IkeSessionCallback or ChildSessionCallback.

Parameters
dhGroup Int: the expected DH group

Public methods

getDhGroup

Added in API level 31
fun getDhGroup(): Int

Return the expected DH Group included in this exception.

Return
Int the expected DH Group.