security: Ensure that KeyChain::getDefaultCeritifcate() does not return 0

Change-Id: I46e4bf19d94bc4b5cf017d8305b81696e1b78ab6
Refs: #1740