diff options
-rw-r--r-- | include/keys/trusted.h | 2 | ||||
-rw-r--r-- | security/keys/trusted.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/keys/trusted.h b/include/keys/trusted.h index adbcb6817826..0071298b9b28 100644 --- a/include/keys/trusted.h +++ b/include/keys/trusted.h | |||
@@ -38,7 +38,7 @@ enum { | |||
38 | 38 | ||
39 | int TSS_authhmac(unsigned char *digest, const unsigned char *key, | 39 | int TSS_authhmac(unsigned char *digest, const unsigned char *key, |
40 | unsigned int keylen, unsigned char *h1, | 40 | unsigned int keylen, unsigned char *h1, |
41 | unsigned char *h2, unsigned char h3, ...); | 41 | unsigned char *h2, unsigned int h3, ...); |
42 | int TSS_checkhmac1(unsigned char *buffer, | 42 | int TSS_checkhmac1(unsigned char *buffer, |
43 | const uint32_t command, | 43 | const uint32_t command, |
44 | const unsigned char *ononce, | 44 | const unsigned char *ononce, |
diff --git a/security/keys/trusted.c b/security/keys/trusted.c index a284d790de8c..efdbf17f3915 100644 --- a/security/keys/trusted.c +++ b/security/keys/trusted.c | |||
@@ -125,7 +125,7 @@ out: | |||
125 | */ | 125 | */ |
126 | int TSS_authhmac(unsigned char *digest, const unsigned char *key, | 126 | int TSS_authhmac(unsigned char *digest, const unsigned char *key, |
127 | unsigned int keylen, unsigned char *h1, | 127 | unsigned int keylen, unsigned char *h1, |
128 | unsigned char *h2, unsigned char h3, ...) | 128 | unsigned char *h2, unsigned int h3, ...) |
129 | { | 129 | { |
130 | unsigned char paramdigest[SHA1_DIGEST_SIZE]; | 130 | unsigned char paramdigest[SHA1_DIGEST_SIZE]; |
131 | struct sdesc *sdesc; | 131 | struct sdesc *sdesc; |
@@ -144,7 +144,7 @@ int TSS_authhmac(unsigned char *digest, const unsigned char *key, | |||
144 | return PTR_ERR(sdesc); | 144 | return PTR_ERR(sdesc); |
145 | } | 145 | } |
146 | 146 | ||
147 | c = h3; | 147 | c = !!h3; |
148 | ret = crypto_shash_init(&sdesc->shash); | 148 | ret = crypto_shash_init(&sdesc->shash); |
149 | if (ret < 0) | 149 | if (ret < 0) |
150 | goto out; | 150 | goto out; |