示例#1
0
文件: ssl.go 项目: Machyne/mongo
// SetSSLCtx changes context to new one. Useful for Server Name Indication (SNI)
// rfc6066 http://tools.ietf.org/html/rfc6066. See
// http://stackoverflow.com/questions/22373332/serving-multiple-domains-in-one-box-with-sni
func (s *SSL) SetSSLCtx(ctx *Ctx) {
	/*
	 * SSL_set_SSL_CTX() only changes certs as of 1.0.0d
	 * adjust other things we care about
	 */
	C.SSL_set_SSL_CTX(s.ssl, ctx.ctx)
}
示例#2
0
文件: conn.go 项目: jb0n/openssl
func (c *Conn) SetCtx(ctx *Ctx) {
	c.ctx = ctx
	C.SSL_set_SSL_CTX(c.ssl, ctx.ctx)
}