Пример #1
0
func GetCertificateAuthority(d Depot) (crt *pkix.Certificate, err error) {
	b, err := d.Get(AuthCrtTag())
	if err != nil {
		return nil, err
	}
	return pkix.NewCertificateFromPEM(b)
}
Пример #2
0
func GetCertificateHost(d Depot, name string) (crt *pkix.Certificate, err error) {
	b, err := d.Get(HostCrtTag(name))
	if err != nil {
		return nil, err
	}
	return pkix.NewCertificateFromPEM(b)
}