updated pubkey_speed test to use pem plugin
This commit is contained in:
@@ -4,7 +4,6 @@
|
|||||||
#include <library.h>
|
#include <library.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <credentials/keys/private_key.h>
|
#include <credentials/keys/private_key.h>
|
||||||
#include <asn1/pem.h>
|
|
||||||
|
|
||||||
void start_timing(struct timespec *start)
|
void start_timing(struct timespec *start)
|
||||||
{
|
{
|
||||||
@@ -70,14 +69,9 @@ int main(int argc, char *argv[])
|
|||||||
pos += read;
|
pos += read;
|
||||||
keydata.len += 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,
|
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)
|
if (!private)
|
||||||
{
|
{
|
||||||
printf("parsing private key failed.\n");
|
printf("parsing private key failed.\n");
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ function ecdsatestall {
|
|||||||
ecdsatest secp521r1 "$1" 500
|
ecdsatest secp521r1 "$1" 500
|
||||||
}
|
}
|
||||||
|
|
||||||
rsatestall "gmp gcrypt"
|
rsatestall "gmp gcrypt pem"
|
||||||
rsatestall "gcrypt"
|
rsatestall "gcrypt pem"
|
||||||
rsatestall "openssl"
|
rsatestall "openssl"
|
||||||
ecdsatestall "openssl"
|
ecdsatestall "openssl"
|
||||||
|
|||||||
Reference in New Issue
Block a user