PEM plugin loads PKCS#12 containers from (DER-encoded) files
It is not actually able to handle PEM encoded PKCS#12 files produced by OpenSSL.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Tobias Brunner
|
||||
* Copyright (C) 2009 Martin Willi
|
||||
* Copyright (C) 2001-2008 Andreas Steffen
|
||||
* Hochschule fuer Technik Rapperswil
|
||||
@@ -564,3 +565,10 @@ certificate_t *pem_certificate_load(certificate_type_t type, va_list args)
|
||||
return pem_load(CRED_CERTIFICATE, type, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Container PEM loader.
|
||||
*/
|
||||
container_t *pem_container_load(container_type_t type, va_list args)
|
||||
{
|
||||
return pem_load(CRED_CONTAINER, type, args);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Tobias Brunner
|
||||
* Copyright (C) 2009 Martin Willi
|
||||
* Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
@@ -25,6 +26,7 @@
|
||||
#include <credentials/credential_factory.h>
|
||||
#include <credentials/keys/private_key.h>
|
||||
#include <credentials/certificates/certificate.h>
|
||||
#include <credentials/containers/container.h>
|
||||
|
||||
/**
|
||||
* Load PEM encoded private keys.
|
||||
@@ -53,5 +55,14 @@ public_key_t *pem_public_key_load(key_type_t type, va_list args);
|
||||
*/
|
||||
certificate_t *pem_certificate_load(certificate_type_t type, va_list args);
|
||||
|
||||
/**
|
||||
* Build PEM encoded containers.
|
||||
*
|
||||
* @param type type of the container
|
||||
* @param args builder_part_t argument list
|
||||
* @return container, NULL if failed
|
||||
*/
|
||||
container_t *pem_container_load(container_type_t type, va_list args);
|
||||
|
||||
#endif /** PEM_BUILDER_H_ @}*/
|
||||
|
||||
|
||||
@@ -104,6 +104,11 @@ METHOD(plugin_t, get_features, int,
|
||||
PLUGIN_REGISTER(CERT_DECODE, pem_certificate_load, FALSE),
|
||||
PLUGIN_PROVIDE(CERT_DECODE, CERT_GPG),
|
||||
PLUGIN_DEPENDS(CERT_DECODE, CERT_GPG),
|
||||
|
||||
/* container PEM decoding */
|
||||
PLUGIN_REGISTER(CONTAINER_DECODE, pem_container_load, FALSE),
|
||||
PLUGIN_PROVIDE(CONTAINER_DECODE, CONTAINER_PKCS12),
|
||||
PLUGIN_DEPENDS(CONTAINER_DECODE, CONTAINER_PKCS12),
|
||||
};
|
||||
*features = f;
|
||||
return countof(f);
|
||||
|
||||
Reference in New Issue
Block a user