Remove HardwareAuthToken support from vold::Keymaster
HardwareAuthTokens are no longer used by vold since Android P. So remove
the auth token parameter from vold. This patch doesn't remove the token
from IVold.aidl, and the methods in VoldNativeService.cpp return an
error if a non-empty auth token is passed to them.
Bug: 181910578
Test: cuttlefish and bramble boot with patch
Change-Id: I1a9f54e10f9efdda9973906afd0a5de5a699ada5
diff --git a/KeyStorage.h b/KeyStorage.h
index 5fded41..09d0aac 100644
--- a/KeyStorage.h
+++ b/KeyStorage.h
@@ -33,11 +33,10 @@
// If only "secret" is nonempty, it is used to decrypt in a non-Keymaster process.
class KeyAuthentication {
public:
- KeyAuthentication(const std::string& t, const std::string& s) : token{t}, secret{s} {};
+ KeyAuthentication(const std::string& s) : secret{s} {};
- bool usesKeymaster() const { return !token.empty() || secret.empty(); };
+ bool usesKeymaster() const { return secret.empty(); };
- const std::string token;
const std::string secret;
};