Bail out properly when we can't find a keymaster instance.
Just a band-aid fix as this code will soon be obsolete.
Bug: 180861644
Test: builds
Change-Id: I256a630c60a2580c6fa4887cde1220397037146c
diff --git a/ondevice-signing/Keymaster.cpp b/ondevice-signing/Keymaster.cpp
index 267dec8..6cfb565 100644
--- a/ondevice-signing/Keymaster.cpp
+++ b/ondevice-signing/Keymaster.cpp
@@ -66,6 +66,9 @@
}
}
+ if (devToUse == nullptr) {
+ LOG(WARNING) << "Didn't find a keymaster to use.";
+ }
mDevice = devToUse;
return mDevice != nullptr;