func (c *Ctx) SetSessionId(session_id []byte) error { runtime.LockOSThread() defer runtime.UnlockOSThread() var ptr *C.uchar if len(session_id) > 0 { ptr = (*C.uchar)(unsafe.Pointer(&session_id[0])) } if int(C.SSL_CTX_set_session_id_context(c.ctx, ptr, C.uint(len(session_id)))) == 0 { return errorFromErrorQueue() } return nil }
func (self *Context) SetSessionIdContext(ctx []byte) { C.SSL_CTX_set_session_id_context(self.Ctx, (*C.uchar)(unsafe.Pointer(&ctx[0])), C.uint(len(ctx))) }