Пример #1
0
// AddCertificate marks the provided Certificate as a trusted certificate in
// the given CertificateStore.
func (s *CertificateStore) AddCertificate(cert *Certificate) error {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()
	if int(C.X509_STORE_add_cert(s.store, cert.x)) != 1 {
		return errorFromErrorQueue()
	}
	return nil
}
Пример #2
0
func (self *X509Store) AddCert(cert *Certificate) int {
	return int(C.X509_STORE_add_cert(self.Store, cert.x509))
}