ECDSA with OpenSSL

This commit is contained in:
Tobias Brunner
2008-06-10 09:08:27 +00:00
parent 2904403e96
commit ea0823dffd
28 changed files with 1456 additions and 101 deletions
@@ -1,4 +1,5 @@
/*
* Copyright (C) 2008 Tobias Brunner
* Copyright (C) 2008 Martin Willi
* Copyright (C) 2000-2008 Andreas Steffen
* Hochschule fuer Technik Rapperswil
@@ -62,6 +63,14 @@ static public_key_t *load(chunk_t blob)
{
type = KEY_RSA;
}
else if (oid == OID_EC_PUBLICKEY)
{
/* we need the whole subjectPublicKeyInfo for EC public keys */
key = lib->creds->create(lib->creds,
CRED_PUBLIC_KEY, KEY_ECDSA, BUILD_BLOB_ASN1_DER,
chunk_clone(blob), BUILD_END);
goto end;
}
else
{
/* key type not supported */