Example #1
0
File: ssl.go Project: 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)
}
Example #2
0
File: conn.go Project: jb0n/openssl
func (c *Conn) SetCtx(ctx *Ctx) {
	c.ctx = ctx
	C.SSL_set_SSL_CTX(c.ssl, ctx.ctx)
}