Refurbish granting mechanism
am: aca4c4cf48  -s ours

Change-Id: I7608b863d5bfcbee7ae7e960c56601be4a5bfd6f
diff --git a/keystore-engine/android_engine.cpp b/keystore-engine/android_engine.cpp
index b7b8199..368590c 100644
--- a/keystore-engine/android_engine.cpp
+++ b/keystore-engine/android_engine.cpp
@@ -207,23 +207,14 @@
   NULL /* size */,
 
   NULL /* sign */,
-  NULL /* verify */,
 
   NULL /* encrypt */,
   NULL /* sign_raw */,
   NULL /* decrypt */,
-  NULL /* verify_raw */,
 
   rsa_private_transform,
 
-  NULL /* mod_exp */,
-  NULL /* bn_mod_exp */,
-
   RSA_FLAG_CACHE_PUBLIC | RSA_FLAG_OPAQUE,
-
-  NULL /* keygen */,
-  NULL /* multi_prime_keygen */,
-  NULL /* supports_digest */,
 };
 
 const char* ecdsa_get_key_id(const EC_KEY* ec_key) {
@@ -283,7 +274,6 @@
     NULL /* finish */,
     NULL /* group_order_size */,
     ecdsa_sign,
-    NULL /* verify */,
     ECDSA_FLAG_OPAQUE,
 };
 
diff --git a/keystore/auth_token_table.cpp b/keystore/auth_token_table.cpp
index 3f476cd..eea24c9 100644
--- a/keystore/auth_token_table.cpp
+++ b/keystore/auth_token_table.cpp
@@ -235,7 +235,7 @@
 
     return (token_->userId == entry.token_->userId &&
             token_->authenticatorType == entry.token_->authenticatorType &&
-            token_->authenticatorType == entry.token_->authenticatorType &&
+            token_->authenticatorId == entry.token_->authenticatorId &&
             timestamp_host_order() > entry.timestamp_host_order());
 }