Less noisy pinging and shutting down
[hcoop/domtool2.git] / src / openssl.sml
index aad3925..26001cc 100644 (file)
@@ -266,9 +266,15 @@ fun context printErr (chain, key, root) =
            context
     end
 
-fun connect (context, hostname) =
+fun connect printErr (context, hostname) =
     let
        val bio = F_OpenSSL_SML_new_ssl_connect.f' context
+
+       val ssl_err =
+           if printErr then
+               ssl_err
+           else
+               (fn _ => ())
     in
        if C.Ptr.isNull' bio then
            (ssl_err ("Error initializating connection to " ^ hostname);