tfIkeAddPhase1Transform
Table of Contents >> IPsec/IKE Programmer's Reference >> IPsec/IKE Function Reference
| #include <trsocket.h> |
| int tfIkeAddPhase1Transform | ( |
| int index, | |
| int encryptAlg, | |
| int encryptKeyLength, | |
| int hashAlg, | |
| int authMethod, | |
| int dhgroup, | |
| int lifeKbytes, | |
| int lifeSeconds | |
| ); |
Function Description
tfIkeAddPhase1Transform() adds a user preferred phase 1 transform to IKEâs phase 1 proposal. User is able to configure up to two transforms, the most preferred has index 0, the less preferred has index 1. If user configures any of them, the default transform wonât be used, otherwise, if user fails to configure any of these transforms, the default transform will be used in the phase 1 proposal.
Parameters
- index
- Index of the transform. Can be either 0 or 1.
- encryptAlg
- The encryption algorithm to be used. The following values are supported (user must define the corresponding TM_USE_XXX macro, see section 3 Settings in trsystem.h)
- TM_IKE_DES_CBC
- TM_IKE_BLOWFISH_CBC
- TM_IKE_3DES_CBC
- TM_IKE_CAST_CBC
- TM_IKE_AES_CBC
- TM_IKE_TWOFISH_CBC
- encryptKeyLength
- Key length of the encryption algorithm. 0 means the default value. See ttAhAlgorithm and ttEspAlgorithm for key length list.
- hashAlg
- The hash algorithm to be used. The following values are supported (see TM_USE_RIPEMD)
- TM_IKE_MD5
- TM_IKE_SHA1
- TM_IKE_RIPEMD
- authMethod
- The authentication method. You must define TM_USE_PKI to use digital signatures.
- TM_IKE_PRESHARED_KEY /* pre-shared key */
- TM_IKE_DSS_SIG /* DSS signature */
- TM_IKE_RSA_SIG /* RSA signature */
- dhgroup
- The Diffie-Hellman group to use. Valid values are:
- TM_DHGROUP_1
- TM_DHGROUP_2
- TM_DHGROUP_5
- TM_DHGROUP_14
- lifeKbytes
- Lifetime in kilo-bytes. 0 means to use default value 32768. Valid value is between 10 ~ 2097152
- lifeSeconds
- Lifetime in seconds. 0 means to use default value 86400. Valid value is between 240 to 63072000
Returns
- TM_ENOERROR
- Success.
- TM_EINVAL
- Invalid value was used.
Table of Contents >> IPsec/IKE Programmer's Reference >> IPsec/IKE Function Reference