security: Make getDefaultCertificate throw an exception if the default is not defined.