Fix parsing certificate with fallback to PEM.

Also moving extractPubKey to wifikeystorehal_utils.h for visibility
for unit testing.

Bug: 196323960
Test: WifiLegacyKeystoreIntegrationTest
Merged-In: I2374de6566355b24b6678d6876481f576aae6c37
Change-Id: I2374de6566355b24b6678d6876481f576aae6c37
4 files changed