X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/3b2676435dc4af39acd77e7fe232902e6651e42d..605347124bd39d347058bc3bd5356c184f654b1d:/src/main.sml diff --git a/src/main.sml b/src/main.sml index cc5b5b5..58b9768 100644 --- a/src/main.sml +++ b/src/main.sml @@ -136,34 +136,6 @@ fun eval fname = val dispatcher = Config.dispatcher ^ ":" ^ Int.toString Config.dispatcherPort -fun ssl_err s = - let - val err = F_OpenSSL_SML_get_error.f () - - val lib = F_OpenSSL_SML_lib_error_string.f err - val func = F_OpenSSL_SML_func_error_string.f err - val reason = F_OpenSSL_SML_reason_error_string.f err - in - print s; - print "\nReason: "; - if C.Ptr.isNull lib then - () - else - (print (ZString.toML lib); - print ":"); - if C.Ptr.isNull func then - () - else - (print (ZString.toML func); - print ":"); - if C.Ptr.isNull reason then - () - else - print (ZString.toML reason); - print "\n" - end - - fun request fname = let val context = OpenSSL.context ("/home/adamc/fake/clientcert.pem", @@ -193,14 +165,14 @@ fun service () = Config.serverKey, Config.trustStore) - val sock = OpenSSL.listen (Config.dispatcherPort, Config.queueSize) + val sock = OpenSSL.listen (context, Config.dispatcherPort) fun loop () = - case OpenSSL.accept (context, sock) of + case OpenSSL.accept sock of NONE => () | SOME bio => let - val _ = print ("Subject: " ^ OpenSSL.peerCN bio ^ "\n") + (*val _ = print ("Subject: " ^ OpenSSL.peerCN bio ^ "\n")*) fun loop' () = case OpenSSL.readOne bio of