summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
Diffstat (limited to 'regress')
-rw-r--r--regress/lib/libtls/gotls/tls.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/regress/lib/libtls/gotls/tls.go b/regress/lib/libtls/gotls/tls.go
index 0480888093d..41b7d19a8bf 100644
--- a/regress/lib/libtls/gotls/tls.go
+++ b/regress/lib/libtls/gotls/tls.go
@@ -107,6 +107,16 @@ func (c *TLSConfig) SetCAFile(filename string) error {
return nil
}
+// SetCiphers sets the cipher suites enabled for the connection.
+func (c *TLSConfig) SetCiphers(ciphers string) error {
+ cipherStr := C.CString(ciphers)
+ defer C.free(unsafe.Pointer(cipherStr))
+ if C.tls_config_set_ciphers(c.tlsCfg, cipherStr) != 0 {
+ return c.Error()
+ }
+ return nil
+}
+
// SetProtocols sets the protocol versions enabled for the connection.
func (c *TLSConfig) SetProtocols(proto ProtocolVersion) error {
if C.tls_config_set_protocols(c.tlsCfg, C.uint32_t(proto)) != 0 {