ike_payload_format.c
AH algorithm negotiation.
Diffie-Hellman key exchange.
error_t ikeFormatNoncePayload(IkeSaEntry *sa, IkeChildSaEntry *childSa, uint8_t *p, size_t *written, uint8_t **nextPayload)
Format Nonce payload.
Definition: ike_payload_format.c:880
Authentication of the IKE SA.
error_t ikeFormatTs(const IkeTsParams *tsParams, uint8_t *p, size_t *written)
Format Traffic Selector substructure.
Definition: ike_payload_format.c:1407
error_t ahAddSupportedTransforms(IkeContext *context, IkeProposal *proposal, uint8_t **lastSubstruc)
Add the supported AH transforms to the proposal.
Definition: ah_algorithms.c:186
IKE payload formatting.
@ IKE_NOTIFY_MSG_TYPE_CHILD_SA_NOT_FOUND
Definition: ike.h:1025
error_t ikeAddTransform(IkeTransformType transformType, uint16_t transformId, uint16_t keyLen, IkeProposal *proposal, uint8_t **lastSubstruc)
Add the supported transforms to the proposal.
Definition: ike_algorithms.c:1151
ESP algorithm negotiation.
error_t ikeFormatChildSaProposal(IkeChildSaEntry *childSa, IpsecProtocol protocolId, const uint8_t *spi, uint8_t *p, size_t *written)
Format Proposal substructure (AH or ESP protocol)
Definition: ike_payload_format.c:256
error_t ikeFormatSaPayload(IkeSaEntry *sa, IkeChildSaEntry *childSa, uint8_t *p, size_t *written, uint8_t **nextPayload)
Format Security Association payload.
Definition: ike_payload_format.c:61
error_t ikeFormatAuthPayload(IkeSaEntry *sa, const IkeIdPayload *idPayload, uint8_t *p, size_t *written, uint8_t **nextPayload)
Format Authentication payload.
Definition: ike_payload_format.c:827
@ IKE_NOTIFY_MSG_TYPE_SIGNATURE_HASH_ALGORITHMS
Definition: ike.h:1076
error_t ikeFormatDeletePayload(IkeSaEntry *sa, IkeChildSaEntry *childSa, uint8_t *p, size_t *written, uint8_t **nextPayload)
Format Delete payload.
Definition: ike_payload_format.c:1177
error_t ikeGenerateAuth(IkeSaEntry *sa, const IkeIdPayload *idPayload, uint8_t *authMethod, uint8_t *authData, size_t *authDataLen)
Generate signature or MAC.
Definition: ike_auth.c:59
error_t ikeFormatCertAuthorities(const char_t *trustedCaList, size_t trustedCaListLen, uint8_t *certAuth, size_t *certAuthLen)
Format list of acceptable certification authorities.
Definition: ike_certificate.c:287
error_t pemImportCertificate(const char_t *input, size_t inputLen, uint8_t *output, size_t *outputLen, size_t *consumed)
Decode a PEM file containing a certificate.
Definition: pem_import.c:61
PEM file import functions.
error_t espAddSupportedTransforms(IkeContext *context, IkeProposal *proposal, uint8_t **lastSubstruc)
Add the supported ESP transforms to the proposal.
Definition: esp_algorithms.c:915
Key material generation.
error_t ikeFormatNotifyPayload(IkeSaEntry *sa, IkeChildSaEntry *childSa, IkeNotifyMsgType notifyMsgType, uint8_t *p, size_t *written, uint8_t **nextPayload)
Format Notify payload.
Definition: ike_payload_format.c:968
error_t ikeFormatTsiPayload(IkeChildSaEntry *childSa, uint8_t *p, size_t *written, uint8_t **nextPayload)
Format Traffic Selector payload (initiator)
Definition: ike_payload_format.c:1240
bool_t ikeIsAeadEncAlgo(uint16_t encAlgoId)
Test if the transform ID identifies an AEAD encryption algorithm.
Definition: ike_algorithms.c:2065
error_t ikeFormatIdPayload(IkeSaEntry *sa, uint8_t *p, size_t *written, uint8_t **nextPayload)
Format Identification payload.
Definition: ike_payload_format.c:472
error_t ikeFormatCertPayloads(IkeSaEntry *sa, uint8_t *p, size_t *written, uint8_t **nextPayload)
Format Certificate payloads.
Definition: ike_payload_format.c:575
IKEv2 (Internet Key Exchange Protocol)
error_t ikeFormatCertPayload(const char_t *certChain, size_t certChainLen, size_t *consumed, uint8_t *p, size_t *written, uint8_t **nextPayload)
Format Certificate payload.
Definition: ike_payload_format.c:668
@ IKE_NOTIFY_MSG_TYPE_INVALID_KE_PAYLOAD
Definition: ike.h:1013
error_t ikeGetCertSubjectDn(const char_t *cert, size_t certLen, uint8_t *subjectDn, size_t *subjectDnLen)
Extract subject's DN from certificate.
Definition: ike_certificate.c:205
@ IKE_NOTIFY_MSG_TYPE_UNSUPPORTED_CRITICAL_PAYLOAD
Definition: ike.h:1006
error_t ikeFormatKePayload(IkeSaEntry *sa, uint8_t *p, size_t *written, uint8_t **nextPayload)
Format Key Exchange payload.
Definition: ike_payload_format.c:417
error_t ikeAddSupportedTransforms(IkeContext *context, IkeProposal *proposal, uint8_t **lastSubstruc)
Add the supported IKE transforms to the proposal.
Definition: ike_algorithms.c:1232
X.509 certificate handling.
error_t ikeFormatDhPublicKey(IkeSaEntry *sa, uint8_t *p, size_t *written)
Format Diffie-Hellman public key.
Definition: ike_key_exchange.c:199
error_t ikeFormatSaProposal(IkeSaEntry *sa, const uint8_t *spi, uint8_t *p, size_t *written)
Format Proposal substructure (IKE protocol)
Definition: ike_payload_format.c:136
error_t ikeFormatCertReqPayload(IkeSaEntry *sa, uint8_t *p, size_t *written, uint8_t **nextPayload)
Format Certificate Request payload.
Definition: ike_payload_format.c:729
IKEv2 algorithm negotiation.
error_t ikeFormatTsrPayload(IkeChildSaEntry *childSa, uint8_t *p, size_t *written, uint8_t **nextPayload)
Format Traffic Selector payload (responder)
Definition: ike_payload_format.c:1324
Debugging facilities.
error_t ikeFormatSignHashAlgosNotificationData(IkeSaEntry *sa, uint8_t *p, size_t *written)
Format SIGNATURE_HASH_ALGORITHMS notification data.
Definition: ike_payload_format.c:1108