mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
agent: Add support for TPM2 for ECC KEM.
* agent/agent.h (agent_tpm2d_ecc_kem): New. * agent/divert-tpm2.c (agent_tpm2d_ecc_kem): New. * agent/pkdecrypt.c (ecc_pgp_kem_decap): Call agent_tpm2d_ecc_kem. -- GnuPG-bug-id: 7649 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
b956f47e2a
commit
04782e7fd6
3 changed files with 51 additions and 2 deletions
|
@ -655,6 +655,9 @@ int divert_tpm2_pkdecrypt (ctrl_t ctrl,
|
|||
char **r_buf, size_t *r_len, int *r_padding);
|
||||
int divert_tpm2_writekey (ctrl_t ctrl, const unsigned char *grip,
|
||||
gcry_sexp_t s_skey);
|
||||
int agent_tpm2d_ecc_kem (ctrl_t ctrl, const unsigned char *shadow_info,
|
||||
const unsigned char *ecc_ct,
|
||||
size_t ecc_point_len, unsigned char *ecc_ecdh);
|
||||
#else /*!HAVE_LIBTSS*/
|
||||
static inline int
|
||||
divert_tpm2_pksign (ctrl_t ctrl,
|
||||
|
@ -686,6 +689,16 @@ divert_tpm2_writekey (ctrl_t ctrl, const unsigned char *grip,
|
|||
(void)ctrl; (void)grip; (void)s_skey;
|
||||
return gpg_error (GPG_ERR_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
static inline int
|
||||
agent_tpm2d_ecc_kem (ctrl_t ctrl, const unsigned char *shadow_info,
|
||||
const unsigned char *ecc_ct,
|
||||
size_t ecc_point_len, unsigned char *ecc_ecdh)
|
||||
{
|
||||
(void)ctrl; (void)ecc_ct;
|
||||
(void)ecc_point_len; (void)ecc_ecdh;
|
||||
return gpg_error (GPG_ERR_NOT_SUPPORTED);
|
||||
}
|
||||
#endif /*!HAVE_LIBTSS*/
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue