Fixing comparison types.
Trusty treats comparison of signed and unsigned types as an error during
build. This fixes the instances where that was being done in
system/keymaster.
Bug: 190665713
Test: Trusty RKP builds
Change-Id: Ib4fb75357e16d142824f292e3c31207f77805807
Merged-In: Ib4fb75357e16d142824f292e3c31207f77805807
diff --git a/cppcose/cppcose.cpp b/cppcose/cppcose.cpp
index 2d8652e..b37900e 100644
--- a/cppcose/cppcose.cpp
+++ b/cppcose/cppcose.cpp
@@ -419,7 +419,7 @@
plaintext.size())) {
return "Failed to encrypt plaintext";
}
- assert(plaintext.size() == outlen);
+ assert(plaintext.size() == static_cast<uint64_t>(outlen));
if (!EVP_CipherFinal_ex(ctx->get(), ciphertext.data() + outlen, &outlen)) {
return "Failed to finalize encryption";
@@ -447,7 +447,7 @@
ciphertextWithTag.size() - kAesGcmTagSize)) {
return "Failed to decrypt plaintext";
}
- assert(plaintext.size() == outlen);
+ assert(plaintext.size() == static_cast<uint64_t>(outlen));
bytevec tag(ciphertextWithTag.end() - kAesGcmTagSize, ciphertextWithTag.end());
if (!EVP_CIPHER_CTX_ctrl(ctx->get(), EVP_CTRL_GCM_SET_TAG, kAesGcmTagSize, tag.data())) {