openssl: Add a generic private key loader

This commit is contained in:
Tobias Brunner
2016-10-05 11:32:52 +02:00
parent 437610ace5
commit 4a6f97d00b
7 changed files with 129 additions and 18 deletions
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2008 Tobias Brunner
* Hochschule fuer Technik Rapperswil
* Copyright (C) 2008-2016 Tobias Brunner
* HSR Hochschule fuer Technik Rapperswil
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -21,6 +21,8 @@
#ifndef OPENSSL_RSA_PRIVATE_KEY_H_
#define OPENSSL_RSA_PRIVATE_KEY_H_
#include <openssl/evp.h>
#include <credentials/builder.h>
#include <credentials/keys/private_key.h>
@@ -61,6 +63,14 @@ openssl_rsa_private_key_t *openssl_rsa_private_key_gen(key_type_t type,
openssl_rsa_private_key_t *openssl_rsa_private_key_load(key_type_t type,
va_list args);
/**
* Wrap an EVP_PKEY object of type EVP_PKEY_RSA
*
* @param key EVP_PKEY_RSA key object (adopted)
* @return loaded key, NULL on failure
*/
private_key_t *openssl_rsa_private_key_create(EVP_PKEY *key);
/**
* Connect to a RSA private key on a smartcard.
*