Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
eb7bf682
Commit
eb7bf682
authored
Oct 11, 2010
by
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
Changes
4
Hide whitespace changes
Inline
Side-by-side
tmcd/ssl.c
View file @
eb7bf682
...
...
@@ -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
"
);
...
...
tmcd/tmcd.c
View file @
eb7bf682
...
...
@@ -4447,7 +4447,7 @@ COMMAND_PROTOTYPE(dosecurestate)
ssize_t
pcomplen
,
quotelen
;
int
quote_passed
;
char
result
[
16
];
TPM_NONCE
nonce
;
E
TPM_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
;
E
TPM_NONCE
nonce
;
char
nonce_hex
[
2
*
TPM_NONCE_BYTES
+
1
];
int
i
;
...
...
tmcd/tpm.c
View file @
eb7bf682
...
...
@@ -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
,
E
TPM_NONCE
nonce
,
unsigned
short
wantpcrs
,
TPM_PCR
*
pcrs
,
unsigned
char
*
idkey
)
{
#ifdef WITHSSL
...
...
tmcd/tpm.h
View file @
eb7bf682
...
...
@@ -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
E
TPM_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
;
E
TPM_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
,
E
TPM_NONCE
,
unsigned
short
,
TPM_PCR
*
,
unsigned
char
*
);
int
tpm_extract_key
(
unsigned
char
*
,
struct
keydata
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment