The law is unjust. St. Thomas Aquinas says that an unjust law is not law at all. It need not be complied with. This finding is a result of an increasing growth in paganism and as a result a growing disdain and aggression toward Christianity and the public practice and living out of the tenets of the Catholic Christian life in the world.
Justice requires not revenge, rather, the reparation of human relationships and the common good. Confession is a divinely instituted sacrament. One of the requirements of confession is that the priest maintain the seal of confession. In my humble opinion the virtues cannot exist apart from each other. In charity and with fortitude, keeping in mind justice, considering the good of all other parishioners in the diocese, Fr. ought to have the courage to refuse to testify. Persecution is beginning and in order to be compelling witnesses, we must be willing to sacrifice ourselves for the good of others and to suffer for others. Yes, Fr. may be charged in this case. However, if he is willing to say publicly that Christ and His Church come before tyrannical government, he will become a pillar and model to follow. He will encourage and strengthen those who make frequent confession, that the seal is certain.
No one should ever have to worry about whether or not those things which they have revealed in the privacy of the confessional will ever be made public.
Pray the Rosary Daily! Be Holy, Not Worldly!