derive keystore type from the extension