Add AuthorizationSetBuilder.
Actually move it from google_keymaster_test, where it was called
ParamBuilder. This is a generally-useful tool.
Change-Id: I07200cdf2e5628289d9e544af02efe519ca124d3
diff --git a/rsa_key.cpp b/rsa_key.cpp
index aec0410..91e1499 100644
--- a/rsa_key.cpp
+++ b/rsa_key.cpp
@@ -123,7 +123,7 @@
uint32_t key_size;
if (authorizations.GetTagValue(TAG_KEY_SIZE, &key_size)) {
// key_size specified, make sure it matches the key.
- if (RSA_size(rsa_key.get()) != (openssl_size_t)key_size) {
+ if (RSA_size(rsa_key.get()) * 8 != (openssl_size_t)key_size) {
*error = KM_ERROR_IMPORT_PARAMETER_MISMATCH;
return NULL;
}