private static function _oidForEC(HashAlgorithmIdentifier $hash_algo): string
    {
        if (!array_key_exists($hash_algo->oid(), self::MAP_EC_OID)) {
            throw new \UnexpectedValueException(
                sprintf("No EC signature algorithm for %s.", $hash_algo->name()));
        }
        return self::MAP_EC_OID[$hash_algo->oid()];
    }