Skip to content

Commit

Permalink
utils: Hoist halg parameter, self-assign with RSA is compiled out.
Browse files Browse the repository at this point in the history
Some gcc want the assignment outside the switch statement.

Signed-off-by: Ken Goldman <[email protected]>
  • Loading branch information
kgoldman committed May 26, 2020
1 parent 67c4a69 commit aa6c6ec
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions utils/cryptoutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1740,7 +1740,10 @@ TPM_RC verifySignatureFromPem(unsigned char *message,
{
TPM_RC rc = 0;
EVP_PKEY *evpPkey = NULL; /* OpenSSL public key, EVP format */

#ifdef TPM_TSS_NORSA
halg = halg;
#endif /* TPM_TSS_NORSA */

/* read the public key from PEM format */
if (rc == 0) {
rc = convertPemToEvpPubKey(&evpPkey, /* freed @1*/
Expand All @@ -1758,8 +1761,6 @@ TPM_RC verifySignatureFromPem(unsigned char *message,
halg,
evpPkey);
break;
#else
halg = halg;
#endif /* TPM_TSS_NORSA */
#ifndef TPM_TSS_NOECC
case TPM_ALG_ECDSA:
Expand Down

0 comments on commit aa6c6ec

Please sign in to comment.