]> git.ipfire.org Git - thirdparty/strongswan.git/commit
libtpmtss: Read RSA public key exponent instead of assuming its value
authorkrinfels <kornel@duleba.com.pl>
Sun, 20 Jan 2019 13:39:08 +0000 (14:39 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 21 Jan 2019 10:52:08 +0000 (11:52 +0100)
commit7533cedb9a8a099d291f9f1f2e306b44b200db67
treef0b0d5ee0136675e70a67755ca9cf0616b06d6bc
parent220b0cb29cd0315ee62378ea98ddff00d1e0d36c
libtpmtss: Read RSA public key exponent instead of assuming its value

Up to now it was assumed that the RSA public key exponent is equal to 2^16+1.
Although this is probably true in most if not all cases, it is not correct
according to the TPM 2.0 specification.

This patch fixes that by reading the exponent from the structure returned
by TPM2_ReadPublic.

Closes strongswan/strongswan#121.
src/libtpmtss/tpm_tss_tss2_v1.c
src/libtpmtss/tpm_tss_tss2_v2.c