diff -Nru nim-1.6.6.orig/lib/pure/net.nim nim-1.6.6/lib/pure/net.nim
--- nim-1.6.6.orig/lib/pure/net.nim	2022-05-05 02:55:22.000000000 +0000
+++ nim-1.6.6/lib/pure/net.nim	2022-06-06 08:58:40.376467766 +0000
@@ -682,7 +682,11 @@
           # the SSL_CERT_FILE and SSL_CERT_DIR env vars
           var found = false
           for fn in scanSSLCertificates():
-            if newCTX.SSL_CTX_load_verify_locations(fn, nil) == VerifySuccess:
+            if fn.extractFilename == "":
+              if newCTX.SSL_CTX_load_verify_locations(nil, fn.normalizePathEnd(false)) == VerifySuccess:
+                found = true
+                break
+            elif newCTX.SSL_CTX_load_verify_locations(fn, nil) == VerifySuccess:
               found = true
               break
           if not found:
diff -Nru nim-1.6.6.orig/lib/pure/ssl_certs.nim nim-1.6.6/lib/pure/ssl_certs.nim
--- nim-1.6.6.orig/lib/pure/ssl_certs.nim	2022-05-05 02:55:22.000000000 +0000
+++ nim-1.6.6/lib/pure/ssl_certs.nim	2022-06-06 09:00:13.867568841 +0000
@@ -126,6 +126,11 @@
           if fileExists(p):
             yield p
         elif dirExists(p):
+          # check if it's a dir where each cert is one file
+          # named by it's hasg
+          for fn in joinPath(p, "*.0").walkFiles:
+            yield p.normalizePathEnd(true)
+            break
           for fn in joinPath(p, "*").walkFiles():
             yield fn
     else: