|
Functions |
| uint16_t | GenerateCertAuthData (EVP_PKEY *pkey, uint8_t *data, uint32_t dlen, uint8_t *dest) |
| | Generate auth data using certificate private key (RSA or DSA).
|
| int | CertAuthenticate (const struct ikev2_ctx *i2, struct CertList *cert, uint8_t *adata, uint32_t alen, uint8_t *sigbuf, uint32_t siglen) |
| | Authenticate peer using data acguired from CERT payload Opertation is performed in three main steps:
- verify certifcate against trusted CA certificate
- chek if certificate CommonName is on sslist
- verify signature.
|
| uint16_t | GenerateAuthData (const struct ikev2_ctx *i2, uint8_t type, struct IKEv2Session *session, uint8_t *id, uint16_t idlen, uint8_t *p) |
| | generate data for auth payload
|
| int | Authenticate (const struct ikev2_ctx *i2, struct CertList *cert, uint8_t type, uint8_t *data, uint16_t dlen, struct IKEv2Session *session, uint8_t *idData, uint16_t idlen) |
| | Authenticate a peer.
|
| int | LoadCertData (int type, char *filename, unsigned char **cert) |
| | Load a certificate from a file and convert it to DER encoding.
|
| void | AddSharedSec (struct sharedSecList **list, int idt, char *id, char *pwd, int authtype) |
| | add a shared secret = id/pwd to the list of acceptables shared secrets of other party
|
| int | UpdateSharedSec (struct sharedSecList **list, int id_type, char *id, char *secret, int authtype) |
| | Update list or add secret to list.
|
| int | IsAcceptable (struct sharedSecList *list, char *id, int idlen, char *pwd, int pwdlen) |
| | check if id/pwd is in list
|
| void | FreeSharedSecList (struct sharedSecList *list) |
| | free shered secret list memory
|
| int | AuthorizeCert (struct sharedSecList *sslist, X509 *x509) |
| | Check if username on user list match the certifcate common name and user is allowed to use certificate for authetnication.
|
| uint32_t | CreateCAHashString (X509_STORE *x509_store, uint8_t **result) |
| | Creates a list of SHA1 hashes of public key trusted CA's as described in paragraph 3.7 RFC4306 (IKEv2).
|
| int | GetCertAuthMethod (EVP_PKEY *pkey) |
| | Get authentication method for auth payload associated with this private key.
|