Ejemplo n.º 1
0
// GetCertificateStore returns the context's certificate store that will be
// used for peer validation.
func (c *Ctx) GetCertificateStore() *CertificateStore {
	// we don't need to dealloc the cert store pointer here, because it points
	// to a ctx internal. so we do need to keep the ctx around
	return &CertificateStore{
		store: C.SSL_CTX_get_cert_store(c.ctx),
		ctx:   c}
}
Ejemplo n.º 2
0
func (self *Context) GetCertStore() *X509Store {
	return &X509Store{Store: C.SSL_CTX_get_cert_store(self.Ctx)}
}
Ejemplo n.º 3
0
Archivo: x509.go Proyecto: runcom/gossl
func NewX509Store(ctx unsafe.Pointer) *X509Store {
	cctx := (*C.SSL_CTX)(ctx)
	return &X509Store{Store: C.SSL_CTX_get_cert_store(cctx)}
}