We need to check the size of public key before trying to use it. Fix return value if no correct keys in file