diff options
-rw-r--r-- | src/regress/lib/libtls/gotls/tls.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/regress/lib/libtls/gotls/tls.go b/src/regress/lib/libtls/gotls/tls.go index 0480888093..41b7d19a8b 100644 --- a/src/regress/lib/libtls/gotls/tls.go +++ b/src/regress/lib/libtls/gotls/tls.go | |||
@@ -107,6 +107,16 @@ func (c *TLSConfig) SetCAFile(filename string) error { | |||
107 | return nil | 107 | return nil |
108 | } | 108 | } |
109 | 109 | ||
110 | // SetCiphers sets the cipher suites enabled for the connection. | ||
111 | func (c *TLSConfig) SetCiphers(ciphers string) error { | ||
112 | cipherStr := C.CString(ciphers) | ||
113 | defer C.free(unsafe.Pointer(cipherStr)) | ||
114 | if C.tls_config_set_ciphers(c.tlsCfg, cipherStr) != 0 { | ||
115 | return c.Error() | ||
116 | } | ||
117 | return nil | ||
118 | } | ||
119 | |||
110 | // SetProtocols sets the protocol versions enabled for the connection. | 120 | // SetProtocols sets the protocol versions enabled for the connection. |
111 | func (c *TLSConfig) SetProtocols(proto ProtocolVersion) error { | 121 | func (c *TLSConfig) SetProtocols(proto ProtocolVersion) error { |
112 | if C.tls_config_set_protocols(c.tlsCfg, C.uint32_t(proto)) != 0 { | 122 | if C.tls_config_set_protocols(c.tlsCfg, C.uint32_t(proto)) != 0 { |