fix build for d2, will have to account for hw keys if not set properly

Change-Id: Ice294f2422f24f7a555dc8d6a9bc163b5b6bceee