Store and parse BLISS private and public keys in DER and PEM format

Additionally generate SHA-1 fingerprints of raw BLISS subjectPublicKey
and subjectPublicKeyInfo objects.

Some basic functions used by the bliss_public_key class are shared
with the bliss_private_key class.
This commit is contained in:
Andreas Steffen
2014-11-29 14:51:16 +01:00
parent 37bfe44358
commit 56009f2001
9 changed files with 441 additions and 32 deletions
@@ -63,11 +63,18 @@ static public_key_t *parse_public_key(chunk_t blob)
}
else if (oid == OID_EC_PUBLICKEY)
{
/* we need the whole subjectPublicKeyInfo for EC public keys */
/* Need the whole subjectPublicKeyInfo for EC public keys */
key = lib->creds->create(lib->creds, CRED_PUBLIC_KEY,
KEY_ECDSA, BUILD_BLOB_ASN1_DER, blob, BUILD_END);
goto end;
}
else if (oid == OID_BLISS_PUBLICKEY)
{
/* Need the whole subjectPublicKeyInfo for BLISS public keys */
key = lib->creds->create(lib->creds, CRED_PUBLIC_KEY,
KEY_BLISS, BUILD_BLOB_ASN1_DER, blob, BUILD_END);
goto end;
}
else
{
/* key type not supported */