#include <library.h>
#include <debug.h>
#include <credentials/keys/private_key.h>
-#include <asn1/pem.h>
void start_timing(struct timespec *start)
{
struct timespec timing;
int round, rounds, read;
char buf[8096], *pos = buf;
- key_type_t type;
- signature_scheme_t scheme;
+ key_type_t type = KEY_ANY;
+ signature_scheme_t scheme = SIGN_UNKNOWN;
chunk_t keydata, *sigs, data = chunk_from_buf(data_buf);
if (argc < 4)
pos += read;
keydata.len += read;
}
- if (pem_to_bin(&keydata, chunk_empty, NULL) != SUCCESS)
- {
- printf("converting PEM private key failed.\n");
- exit(1);
- }
private = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, type,
- BUILD_BLOB_ASN1_DER, keydata, BUILD_END);
+ BUILD_BLOB_PEM, keydata, BUILD_END);
if (!private)
{
printf("parsing private key failed.\n");