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
7cd94c8d
Commit
7cd94c8d
authored
Dec 07, 2010
by
Cody Cutler
Browse files
Fix warnings in dosecurestate()
From nonce and PCR parsing
parent
3a96cf99
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/tmcd.c
View file @
7cd94c8d
...
...
@@ -4669,6 +4669,7 @@ COMMAND_PROTOTYPE(dosecurestate)
unsigned
long
*
nlen
;
int
i
,
j
;
unsigned
int
temp
;
unsigned
short
wantpcrs
;
TPM_PCR
*
pcrs
;
...
...
@@ -4768,7 +4769,8 @@ COMMAND_PROTOTYPE(dosecurestate)
reqp
->
nodeid
,
nlen
[
0
]);
}
for
(
i
=
0
;
i
<
TPM_NONCE_BYTES
;
i
++
)
{
if
(
sscanf
(
row
[
0
]
+
(
i
*
2
),
"%2x"
,
&
(
nonce
[
i
]))
!=
1
)
{
if
(
sscanf
(
row
[
0
]
+
(
i
*
2
),
"%2x"
,
&
temp
)
!=
1
)
{
nonce
[
i
]
=
(
unsigned
char
)
temp
;
error
(
"SECURESTATE: %s: Error parsing nonce
\n
"
,
reqp
->
nodeid
);
mysql_free_result
(
res
);
// XXX: return error to client
...
...
@@ -4815,7 +4817,8 @@ COMMAND_PROTOTYPE(dosecurestate)
pcr
=
atoi
(
row
[
0
]);
wantpcrs
|=
(
1
<<
pcr
);
for
(
j
=
0
;
j
<
TPM_PCR_BYTES
;
j
++
)
{
if
(
sscanf
(
row
[
1
]
+
(
j
*
2
),
"%2x"
,
&
(
pcrs
[
i
][
j
]))
!=
1
)
{
if
(
sscanf
(
row
[
1
]
+
(
j
*
2
),
"%2x"
,
&
temp
)
!=
1
)
{
pcrs
[
i
][
j
]
=
(
unsigned
char
)
temp
;
error
(
"SECURESTATE: %s: Error parsing PCR
\n
"
,
reqp
->
nodeid
);
free
(
pcrs
);
mysql_free_result
(
res
);
...
...
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