tls-test: Load keys of any type

Only RSA keys were possible until now.
This commit is contained in:
Pascal Knecht 2020-10-23 16:01:03 +02:00 committed by Tobias Brunner
parent 34f66ce6cb
commit 5e579ebe8f
1 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,8 @@
/*
* Copyright (C) 2020 Pascal Knecht
* Copyright (C) 2020 Tobias Brunner
* HSR Hochschule fuer Technik Rapperswil
*
* Copyright (C) 2010 Martin Willi
* Copyright (C) 2010 revosec AG
*
@ -212,8 +216,8 @@ static bool load_key(char *filename)
{
private_key_t *key;
key = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, KEY_RSA,
BUILD_FROM_FILE, filename, BUILD_END);
key = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, KEY_ANY,
BUILD_FROM_FILE, filename, BUILD_END);
if (!key)
{
DBG1(DBG_TLS, "loading key from '%s' failed", filename);