More fixes for BoringSSL compilation.
EC_GROUP_set_point_conversion_form has been removed in BoringSSL because
it didn't do anything.
Also, BoringSSL uses size_t and keymaster builds with a signed/unsigned
mismatch as a fatal error. This means that the casts to int aren't
needed in BoringSSL and, in fact, cause an error.
Change-Id: I52b7d34a5c90f40cfcc84c60b746404f374b1e80
diff --git a/hmac_operation.cpp b/hmac_operation.cpp
index a179655..9050f99 100644
--- a/hmac_operation.cpp
+++ b/hmac_operation.cpp
@@ -19,6 +19,12 @@
#include <openssl/evp.h>
#include <openssl/hmac.h>
+#if defined(OPENSSL_IS_BORINGSSL)
+typedef size_t openssl_size_t;
+#else
+typedef int openssl_size_t;
+#endif
+
namespace keymaster {
HmacOperation::HmacOperation(keymaster_purpose_t purpose, const Logger& logger,
@@ -47,7 +53,7 @@
return;
}
- if ((int)tag_length_ > EVP_MD_size(md)) {
+ if ((openssl_size_t)tag_length_ > EVP_MD_size(md)) {
error_ = KM_ERROR_UNSUPPORTED_MAC_LENGTH;
return;
}