func (self *Context) SetClientCAList(names []X509Name) { s := C.sk_new(nil) for i := range names { C.sk_push(s, unsafe.Pointer(names[i].Name)) } //This could go crashy //It's cutting through all the abstraction of SSL //Stacks because they are all macro based. C.SSL_CTX_set_client_CA_list(self.Ctx, (*C.struct_stack_st_X509_NAME)(unsafe.Pointer(s))) }
// SetClientCAList sets the list of CAs sent to the client when requesting a // client certificate for Ctx. See // https://www.openssl.org/docs/ssl/SSL_CTX_set_client_CA_list.html func (c *Ctx) SetClientCAList(caList *StackOfX509Name) { C.SSL_CTX_set_client_CA_list(c.ctx, caList.stack) caList.shared = true }