summaryrefslogtreecommitdiff
path: root/gemini/tlsUtils.ml
diff options
context:
space:
mode:
Diffstat (limited to 'gemini/tlsUtils.ml')
-rw-r--r--gemini/tlsUtils.ml10
1 files changed, 5 insertions, 5 deletions
diff --git a/gemini/tlsUtils.ml b/gemini/tlsUtils.ml
index b0d65ae..0a3f59d 100644
--- a/gemini/tlsUtils.ml
+++ b/gemini/tlsUtils.ml
@@ -1,12 +1,12 @@
module type TLS_UTILS =
sig
- type authenticator = X509_lwt.authenticator Lwt.t
+ type authenticator = X509_lwt.authenticator
type ciphers = Tls.Ciphersuite.ciphersuite list
type own_cert = Tls.Config.own_cert
val null_auth : authenticator
- val ca : Lwt_io.file_name -> authenticator
+ val ca : Lwt_io.file_name -> authenticator Lwt.t
val self_sign : ?bits:int -> ?days:int
-> X509.Distinguished_name.t
@@ -19,11 +19,11 @@ end
module TlsUtils : TLS_UTILS =
struct
- type authenticator = X509_lwt.authenticator Lwt.t
+ type authenticator = X509_lwt.authenticator
type ciphers = Tls.Ciphersuite.ciphersuite list
type own_cert = Tls.Config.own_cert
- let null_auth = Lwt.return (fun ~host:_ -> fun _ -> Ok None)
+ let null_auth ~host:_ _ = Ok None
let ca path = if Sys.is_directory path then
X509_lwt.authenticator (`Ca_dir path)
@@ -49,7 +49,7 @@ struct
let peer_name = match peer_name with
| Some name -> name
| None -> host in
- let%lwt authenticator = authenticator in
+ let authenticator = authenticator in
Tls_lwt.connect_ext
Tls.Config.(client ~peer_name:peer_name ~authenticator
~ciphers ~certificates:own_cert ()) (host, port)