Added factory function to create keymat_t implementations.

This commit is contained in:
Tobias Brunner
2012-03-20 17:30:43 +01:00
parent 0b611540ef
commit 4b64a1a17d
4 changed files with 50 additions and 6 deletions
+12 -2
View File
@@ -21,15 +21,16 @@
#ifndef KEYMAT_H_
#define KEYMAT_H_
typedef struct keymat_t keymat_t;
#include <library.h>
#include <utils/identification.h>
#include <crypto/prfs/prf.h>
#include <crypto/aead.h>
#include <config/proposal.h>
#include <config/peer_cfg.h> /* for ike_version_t */
#include <sa/ike_sa_id.h>
typedef struct keymat_t keymat_t;
/**
* Derivation an management of sensitive keying material.
*/
@@ -147,4 +148,13 @@ struct keymat_t {
void (*destroy)(keymat_t *this);
};
/**
* Create the appropriate keymat_t implementation based on the IKE version.
*
* @param version requested IKE version
* @param initiator TRUE if we are initiator
* @return keymat_t implmenetation
*/
keymat_t *keymat_create(ike_version_t version, bool initiator);
#endif /** KEYMAT_H_ @}*/