diff options
author | Armin Kuster <akuster808@gmail.com> | 2021-03-07 17:00:04 +0000 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2021-03-09 08:52:21 -0800 |
commit | 77b17e6865de0d963911bb5340fd53a403ad122f (patch) | |
tree | de163b230de9c3798901dfb2f7791a5e2079f7d1 | |
parent | 31aa8589489b7167fc0108e2ae8429b0efbb78dd (diff) | |
download | meta-security-77b17e6865de0d963911bb5340fd53a403ad122f.tar.gz |
tpm-tools: update to 1.3.9.1
drop patch included in update
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | meta-tpm/recipes-tpm/tpm-tools/files/05-openssl1.1_fix_data_mgmt.patch | 110 | ||||
-rw-r--r-- | meta-tpm/recipes-tpm/tpm-tools/tpm-tools_1.3.9.2.bb (renamed from meta-tpm/recipes-tpm/tpm-tools/tpm-tools_1.3.9.1.bb) | 3 |
2 files changed, 1 insertions, 112 deletions
diff --git a/meta-tpm/recipes-tpm/tpm-tools/files/05-openssl1.1_fix_data_mgmt.patch b/meta-tpm/recipes-tpm/tpm-tools/files/05-openssl1.1_fix_data_mgmt.patch deleted file mode 100644 index c2a264b..0000000 --- a/meta-tpm/recipes-tpm/tpm-tools/files/05-openssl1.1_fix_data_mgmt.patch +++ /dev/null | |||
@@ -1,110 +0,0 @@ | |||
1 | Author: Philipp Kern <pkern@debian.org> | ||
2 | Subject: Fix openssl1.1 support in data_mgmt | ||
3 | Date: Tue, 31 Jan 2017 22:40:10 +0100 | ||
4 | |||
5 | Upstream-Status: Backport | ||
6 | tpm-tools_1.3.9.1-0.1.debian.tar | ||
7 | |||
8 | Signed-off-by: Armin kuster <akuster808@gmail.com> | ||
9 | |||
10 | --- | ||
11 | src/data_mgmt/data_import.c | 60 ++++++++++++++++++++++++++++---------------- | ||
12 | 1 file changed, 39 insertions(+), 21 deletions(-) | ||
13 | |||
14 | --- a/src/data_mgmt/data_import.c | ||
15 | +++ b/src/data_mgmt/data_import.c | ||
16 | @@ -372,7 +372,7 @@ readX509Cert( const char *a_pszFile, | ||
17 | goto out; | ||
18 | } | ||
19 | |||
20 | - if ( EVP_PKEY_type( pKey->type ) != EVP_PKEY_RSA ) { | ||
21 | + if ( EVP_PKEY_base_id( pKey ) != EVP_PKEY_RSA ) { | ||
22 | logError( TOKEN_RSA_KEY_ERROR ); | ||
23 | |||
24 | X509_free( pX509 ); | ||
25 | @@ -691,8 +691,13 @@ createRsaPubKeyObject( RSA | ||
26 | |||
27 | int rc = -1; | ||
28 | |||
29 | - int nLen = BN_num_bytes( a_pRsa->n ); | ||
30 | - int eLen = BN_num_bytes( a_pRsa->e ); | ||
31 | + const BIGNUM *bn; | ||
32 | + const BIGNUM *be; | ||
33 | + | ||
34 | + RSA_get0_key( a_pRsa, &bn, &be, NULL ); | ||
35 | + | ||
36 | + int nLen = BN_num_bytes( bn ); | ||
37 | + int eLen = BN_num_bytes( be ); | ||
38 | |||
39 | CK_RV rv; | ||
40 | |||
41 | @@ -732,8 +737,8 @@ createRsaPubKeyObject( RSA | ||
42 | } | ||
43 | |||
44 | // Get binary representations of the RSA key information | ||
45 | - BN_bn2bin( a_pRsa->n, n ); | ||
46 | - BN_bn2bin( a_pRsa->e, e ); | ||
47 | + BN_bn2bin( bn, n ); | ||
48 | + BN_bn2bin( be, e ); | ||
49 | |||
50 | // Create the RSA public key object | ||
51 | rv = createObject( a_hSession, tAttr, ulAttrCount, a_hObject ); | ||
52 | @@ -760,14 +765,27 @@ createRsaPrivKeyObject( RSA | ||
53 | |||
54 | int rc = -1; | ||
55 | |||
56 | - int nLen = BN_num_bytes( a_pRsa->n ); | ||
57 | - int eLen = BN_num_bytes( a_pRsa->e ); | ||
58 | - int dLen = BN_num_bytes( a_pRsa->d ); | ||
59 | - int pLen = BN_num_bytes( a_pRsa->p ); | ||
60 | - int qLen = BN_num_bytes( a_pRsa->q ); | ||
61 | - int dmp1Len = BN_num_bytes( a_pRsa->dmp1 ); | ||
62 | - int dmq1Len = BN_num_bytes( a_pRsa->dmq1 ); | ||
63 | - int iqmpLen = BN_num_bytes( a_pRsa->iqmp ); | ||
64 | + const BIGNUM *bn; | ||
65 | + const BIGNUM *be; | ||
66 | + const BIGNUM *bd; | ||
67 | + const BIGNUM *bp; | ||
68 | + const BIGNUM *bq; | ||
69 | + const BIGNUM *bdmp1; | ||
70 | + const BIGNUM *bdmq1; | ||
71 | + const BIGNUM *biqmp; | ||
72 | + | ||
73 | + RSA_get0_key( a_pRsa, &bn, &be, &bd); | ||
74 | + RSA_get0_factors( a_pRsa, &bp, &bq); | ||
75 | + RSA_get0_crt_params( a_pRsa, &bdmp1, &bdmq1, &biqmp ); | ||
76 | + | ||
77 | + int nLen = BN_num_bytes( bn ); | ||
78 | + int eLen = BN_num_bytes( be ); | ||
79 | + int dLen = BN_num_bytes( bd ); | ||
80 | + int pLen = BN_num_bytes( bp ); | ||
81 | + int qLen = BN_num_bytes( bq ); | ||
82 | + int dmp1Len = BN_num_bytes( bdmp1 ); | ||
83 | + int dmq1Len = BN_num_bytes( bdmq1 ); | ||
84 | + int iqmpLen = BN_num_bytes( biqmp ); | ||
85 | |||
86 | CK_RV rv; | ||
87 | |||
88 | @@ -821,14 +839,14 @@ createRsaPrivKeyObject( RSA | ||
89 | } | ||
90 | |||
91 | // Get binary representations of the RSA key information | ||
92 | - BN_bn2bin( a_pRsa->n, n ); | ||
93 | - BN_bn2bin( a_pRsa->e, e ); | ||
94 | - BN_bn2bin( a_pRsa->d, d ); | ||
95 | - BN_bn2bin( a_pRsa->p, p ); | ||
96 | - BN_bn2bin( a_pRsa->q, q ); | ||
97 | - BN_bn2bin( a_pRsa->dmp1, dmp1 ); | ||
98 | - BN_bn2bin( a_pRsa->dmq1, dmq1 ); | ||
99 | - BN_bn2bin( a_pRsa->iqmp, iqmp ); | ||
100 | + BN_bn2bin( bn, n ); | ||
101 | + BN_bn2bin( be, e ); | ||
102 | + BN_bn2bin( bd, d ); | ||
103 | + BN_bn2bin( bp, p ); | ||
104 | + BN_bn2bin( bq, q ); | ||
105 | + BN_bn2bin( bdmp1, dmp1 ); | ||
106 | + BN_bn2bin( bdmq1, dmq1 ); | ||
107 | + BN_bn2bin( biqmp, iqmp ); | ||
108 | |||
109 | // Create the RSA private key object | ||
110 | rv = createObject( a_hSession, tAttr, ulAttrCount, a_hObject ); | ||
diff --git a/meta-tpm/recipes-tpm/tpm-tools/tpm-tools_1.3.9.1.bb b/meta-tpm/recipes-tpm/tpm-tools/tpm-tools_1.3.9.2.bb index 88ef19f..8aeb8ac 100644 --- a/meta-tpm/recipes-tpm/tpm-tools/tpm-tools_1.3.9.1.bb +++ b/meta-tpm/recipes-tpm/tpm-tools/tpm-tools_1.3.9.2.bb | |||
@@ -12,12 +12,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=059e8cd6165cb4c31e351f2b69388fd9" | |||
12 | DEPENDS = "libtspi openssl" | 12 | DEPENDS = "libtspi openssl" |
13 | DEPENDS_class-native = "trousers-native" | 13 | DEPENDS_class-native = "trousers-native" |
14 | 14 | ||
15 | SRCREV = "bdf9f1bc8f63cd6fc370c2deb58d03ac55079e84" | 15 | SRCREV = "bf43837575c5f7d31865562dce7778eae970052e" |
16 | SRC_URI = " \ | 16 | SRC_URI = " \ |
17 | git://git.code.sf.net/p/trousers/tpm-tools \ | 17 | git://git.code.sf.net/p/trousers/tpm-tools \ |
18 | file://tpm-tools-extendpcr.patch \ | 18 | file://tpm-tools-extendpcr.patch \ |
19 | file://04-fix-FTBFS-clang.patch \ | 19 | file://04-fix-FTBFS-clang.patch \ |
20 | file://05-openssl1.1_fix_data_mgmt.patch \ | ||
21 | file://openssl1.1_fix.patch \ | 20 | file://openssl1.1_fix.patch \ |
22 | " | 21 | " |
23 | 22 | ||