Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 561 Bytes

README.MD

File metadata and controls

39 lines (31 loc) · 561 Bytes

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)
	}