Debian Codegraph @

stubdom/vtpm-tpm_bn_t-addr.patch

raw
1 All tpm_bn_t's are a 1-element array of one form or another, meaning the code
2 below is tautological and triggers -Werror=address.
3
4 diff -ru tpm_emulator-x86_64.orig/crypto/rsa.c tpm_emulator-x86_64/crypto/rsa.c
5 --- tpm_emulator-x86_64.orig/crypto/rsa.c 2011-12-20 18:30:06.000000000 +0000
6 +++ tpm_emulator-x86_64/crypto/rsa.c 2023-08-03 20:44:17.379166284 +0100
7 @@ -53,10 +53,7 @@
8 tpm_bn_init2(c, key->size);
9 tpm_bn_import(p, in_len, 1, in);
10
11 - if (!key->p || !key->q || !key->u) {
12 - /* c = p ^ d mod n */
13 - tpm_bn_powm(c, p, key->d, key->n);
14 - } else {
15 + {
16 tpm_bn_init2(m1, key->size / 2);
17 tpm_bn_init2(m2, key->size / 2);
18 tpm_bn_init2(h, key->size);