mirror of
https://github.com/stefanberger/libtpms
synced 2026-01-13 10:33:54 +00:00
tpm2: Add missing semicolons after pAsserts
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
01ffc69132
commit
09c9ea1a44
@ -2376,7 +2376,7 @@ NV_TPMT_SENSITIVE_Marshal(TPMT_SENSITIVE *source, BYTE **buffer, INT32 *size)
|
||||
/* we wrote these but they must have been 0 in this case */
|
||||
pAssert(source->authValue.t.size == 0);
|
||||
pAssert(source->seedValue.t.size == 0);
|
||||
pAssert(source->sensitiveType == TPM_ALG_ERROR)
|
||||
pAssert(source->sensitiveType == TPM_ALG_ERROR);
|
||||
/* public keys */
|
||||
}
|
||||
return written;
|
||||
@ -2409,7 +2409,7 @@ NV_TPMT_SENSITIVE_Unmarshal(TPMT_SENSITIVE *target, BYTE **buffer, INT32 *size)
|
||||
default:
|
||||
pAssert(target->authValue.t.size == 0);
|
||||
pAssert(target->seedValue.t.size == 0);
|
||||
pAssert(target->sensitiveType == TPM_ALG_ERROR)
|
||||
pAssert(target->sensitiveType == TPM_ALG_ERROR);
|
||||
/* nothing do to do */
|
||||
}
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ OpenSSLCryptGenerateKeyDes(
|
||||
if (!(ctx = EVP_CIPHER_CTX_new()))
|
||||
return TPM_RC_MEMORY;
|
||||
|
||||
pAssert(sizeof(sensitive->sensitive.sym.t.buffer) >= 3 * sizeof(DES_cblock))
|
||||
pAssert(sizeof(sensitive->sensitive.sym.t.buffer) >= 3 * sizeof(DES_cblock));
|
||||
|
||||
if (EVP_CipherInit_ex(ctx, EVP_des_ede3(), NULL, NULL, NULL, 0) != 1 ||
|
||||
EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_RAND_KEY, 0,
|
||||
@ -172,7 +172,7 @@ GetEVPCipher(TPM_ALG_ID algorithm, // IN
|
||||
if (i < 0 || i > 2)
|
||||
return NULL;
|
||||
|
||||
pAssert(*keyToUseLen >= keySizeInBytes)
|
||||
pAssert(*keyToUseLen >= keySizeInBytes);
|
||||
memcpy(keyToUse, key, keySizeInBytes);
|
||||
|
||||
switch (algorithm) {
|
||||
@ -219,7 +219,7 @@ GetEVPCipher(TPM_ALG_ID algorithm, // IN
|
||||
case TPM_ALG_TDES:
|
||||
algIdx = 1;
|
||||
if (keySizeInBits == 128) {
|
||||
pAssert(*keyToUseLen >= BITS_TO_BYTES(192))
|
||||
pAssert(*keyToUseLen >= BITS_TO_BYTES(192));
|
||||
// stretch the key
|
||||
memcpy(&keyToUse[16], &keyToUse[0], 8);
|
||||
*keyToUseLen = BITS_TO_BYTES(192);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user