Add pkcs12 plugin which adds support for decoding PKCS#12 containers

This commit is contained in:
Tobias Brunner
2013-05-08 15:02:39 +02:00
parent 199fdcadae
commit feef637368
11 changed files with 808 additions and 2 deletions
@@ -21,9 +21,11 @@
#ifndef PKCS12_H_
#define PKCS12_H_
#include <credentials/containers/container.h>
#include <crypto/hashers/hasher.h>
typedef enum pkcs12_key_type_t pkcs12_key_type_t;
typedef struct pkcs12_t pkcs12_t;
/**
* The types of password based keys used by PKCS#12.
@@ -34,6 +36,31 @@ enum pkcs12_key_type_t {
PKCS12_KEY_MAC = 3,
};
/**
* PKCS#12/PFX container type.
*/
struct pkcs12_t {
/**
* Implements container_t.
*/
container_t container;
/**
* Create an enumerator over extracted certificates.
*
* @return enumerator over certificate_t
*/
enumerator_t* (*create_cert_enumerator)(pkcs12_t *this);
/**
* Create an enumerator over extracted private keys.
*
* @return enumerator over private_key_t
*/
enumerator_t* (*create_key_enumerator)(pkcs12_t *this);
};
/**
* Derive the keys used in PKCS#12 for password integrity/privacy mode.
*