tpm: Return signature schemes supported by the key if TSS supports it

This commit is contained in:
Tobias Brunner
2018-10-26 09:03:27 +02:00
parent 7ca3b3daee
commit b158404c5f
@@ -1,4 +1,5 @@
/*
* Copyright (C) 2018 Tobias Brunner
* Copyright (C) 2017 Andreas Steffen
* HSR Hochschule fuer Technik Rapperswil
*
@@ -75,6 +76,12 @@ METHOD(private_key_t, get_keysize, int,
return this->pubkey->get_keysize(this->pubkey);
}
METHOD(private_key_t, supported_signature_schemes, enumerator_t*,
private_tpm_private_key_t *this)
{
return this->tpm->supported_signature_schemes(this->tpm, this->handle);
}
METHOD(private_key_t, sign, bool,
private_tpm_private_key_t *this, signature_scheme_t scheme, void *params,
chunk_t data, chunk_t *signature)
@@ -201,6 +208,7 @@ tpm_private_key_t *tpm_private_key_connect(key_type_t type, va_list args)
.sign = _sign,
.decrypt = _decrypt,
.get_keysize = _get_keysize,
.supported_signature_schemes = _supported_signature_schemes,
.get_public_key = _get_public_key,
.equals = private_key_equals,
.belongs_to = private_key_belongs_to,