From: Tobias Brunner Date: Mon, 15 Oct 2018 11:16:44 +0000 (+0200) Subject: tpm: Return signature schemes supported by the key if TSS supports it X-Git-Tag: 5.7.2dr1~9^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b158404c5f3a1518b96af758962201fa0dd4e960;p=thirdparty%2Fstrongswan.git tpm: Return signature schemes supported by the key if TSS supports it --- diff --git a/src/libtpmtss/plugins/tpm/tpm_private_key.c b/src/libtpmtss/plugins/tpm/tpm_private_key.c index 3b7582ae3c..9aeb471083 100644 --- a/src/libtpmtss/plugins/tpm/tpm_private_key.c +++ b/src/libtpmtss/plugins/tpm/tpm_private_key.c @@ -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,