コード例 #1
0
ファイル: ctx.go プロジェクト: devsaurin/mongo-tools
// 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}
}
コード例 #2
0
ファイル: context.go プロジェクト: postfix/go-ssl
func (self *Context) GetCertStore() *X509Store {
	return &X509Store{Store: C.SSL_CTX_get_cert_store(self.Ctx)}
}
コード例 #3
0
ファイル: x509.go プロジェクト: runcom/gossl
func NewX509Store(ctx unsafe.Pointer) *X509Store {
	cctx := (*C.SSL_CTX)(ctx)
	return &X509Store{Store: C.SSL_CTX_get_cert_store(cctx)}
}