Commit eb7bf682 authored by Cody Cutler's avatar Cody Cutler
Browse files

Fix identifier conflict and type warning

typedef TPM_NONCE is already defined by TrouSers.  I renamed it ETPM_NONCE.
parent 1ea97082
......@@ -692,7 +692,7 @@ tmcd_quote_verifysig(void *final, void *sig, size_t siglen, void *pubkey)
}
/* Cannot fail */
tpm_extract_key((char *)pubkey, &k);
tpm_extract_key((unsigned char *)pubkey, &k);
rsa = convpubkey(&k.pub);
if (!rsa) {
error("Error extracting and converting key\n");
......
......@@ -4447,7 +4447,7 @@ COMMAND_PROTOTYPE(dosecurestate)
ssize_t pcomplen, quotelen;
int quote_passed;
char result[16];
TPM_NONCE nonce;
ETPM_NONCE nonce;
MYSQL_RES *res;
MYSQL_ROW row;
......@@ -4727,7 +4727,7 @@ COMMAND_PROTOTYPE(dosecurestate)
COMMAND_PROTOTYPE(doquoteprep)
{
char newstate[128]; /* More then we will ever need */
TPM_NONCE nonce;
ETPM_NONCE nonce;
char nonce_hex[2*TPM_NONCE_BYTES + 1];
int i;
......
......@@ -196,7 +196,7 @@ tmcd_tpm_generate_nonce(unsigned char *nonce)
* Returns 1 if the quote is valid, 0 otherwise.
*/
int tmcd_tpm_verify_quote(char *quote, ssize_t quotelen, unsigned char *pcomp,
ssize_t pcomplen, TPM_NONCE nonce, unsigned short wantpcrs,
ssize_t pcomplen, ETPM_NONCE nonce, unsigned short wantpcrs,
TPM_PCR *pcrs, unsigned char *idkey)
{
#ifdef WITHSSL
......
......@@ -21,7 +21,7 @@ int tmcd_tpm_free(void);
*/
#define TPM_NONCE_BYTES 0x14 // 160 bits
#define TPM_PCR_BYTES 0x14 // 160 bits
typedef unsigned char TPM_NONCE[TPM_NONCE_BYTES];
typedef unsigned char ETPM_NONCE[TPM_NONCE_BYTES];
typedef unsigned char TPM_PCR[TPM_PCR_BYTES];
int tmcd_tpm_generate_nonce(unsigned char*);
......@@ -32,7 +32,7 @@ struct signed_pcomp {
unsigned char fixed[8];
/* Hash of PCR composite */
unsigned char comphash[20];
TPM_NONCE nonce;
ETPM_NONCE nonce;
};
struct pubkeydata {
......@@ -70,7 +70,7 @@ struct keydata {
#define PCOMP_PCR_LEN 20
#define PCOMP_PCRMASK_BITS 16
int tmcd_tpm_verify_quote(char *, ssize_t, unsigned char *, ssize_t, TPM_NONCE,
int tmcd_tpm_verify_quote(char *, ssize_t, unsigned char *, ssize_t, ETPM_NONCE,
unsigned short, TPM_PCR*, unsigned char*);
int tpm_extract_key(unsigned char *, struct keydata *);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment