コード例 #1
0
ファイル: ctx.go プロジェクト: devsaurin/mongo-tools
// SetVerify controls peer verification settings. See
// http://www.openssl.org/docs/ssl/SSL_CTX_set_verify.html
func (c *Ctx) SetVerify(options VerifyOptions, verify_cb VerifyCallback) {
	c.verify_cb = verify_cb
	if verify_cb != nil {
		C.SSL_CTX_set_verify(c.ctx, C.int(options), (*[0]byte)(C.verify_cb))
	} else {
		C.SSL_CTX_set_verify(c.ctx, C.int(options), nil)
	}
}
コード例 #2
0
ファイル: context.go プロジェクト: postfix/go-ssl
func (self *Context) SetVerify(mode int) {
	//TODO allow people to customize this
	C.SSL_CTX_set_verify(self.Ctx, C.int(mode), nil)
}