예제 #1
0
// 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)
}