Skip to content

wangborong12345/cert_mgr

Repository files navigation

cert_mgr

功能

列出,安装,移除系统受信任区域证书

使用

列出

	mgr := cert.NewSystemTrustCertMgr("test_pack")
	list, err := mgr.List()
	if err != nil {
		panic(err)
	}
	for _, certificate := range *list {
		fmt.Print(*certificate.SerialNumber)
	}

安装

    mgr := cert.NewSystemTrustCertMgr("test_pack")
err := mgr.Install(certificate)
if err != nil {
panic(err)
}

移除

	mgr := cert.NewSystemTrustCertMgr("test_pack")
	err := mgr.Uninstall(certificate)
	if err != nil {
		panic(err)
	}

About

certificate manager

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages