以编程方式将SSL证书安装到浏览器的存储中

I have an application written in Go which needs the web browser (ideally Firefox) to have a self-signed certificate installed.

Of course I can provide instructions to end users on how to install a certificate, but this is far from ideal.

Ideally, I want to programatically add the certificate - using a firefox API, command line, registry hack or some other approach. Of course I would love a cross platform solution, but even windows only would be a start.