Skip to content

Commit

Permalink
Fix the "Homebrew uses installed libgambit" issue. (#1113)
Browse files Browse the repository at this point in the history
The other commits are a rebase
  • Loading branch information
drewc authored Jan 30, 2024
1 parent c47bc90 commit 92b1a2f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 16 deletions.
7 changes: 7 additions & 0 deletions src/build/build-libgerbil.ss
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,13 @@
(path-expand "lib" build-home)))
+gerbil-lib-dir+)

(cond-expand
(darwin
(let (hblp (getenv "HOMEBREW_LIBRARY_PATHS" #f))
(when hblp (setenv "HOMEBREW_LIBRARY_PATHS"
(string-append (gerbil-libdir)":"hblp)))))
(else #f))

(def +gerbil-static-dir+ #f)
(def (gerbil-static-dir)
(unless +gerbil-static-dir+
Expand Down
36 changes: 20 additions & 16 deletions src/std/net/ssl-test.ss
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,21 @@ END
(test-case "ssl connection: google"
(test-request-ok "www.google.com:443"))

(test-case "ssl connection failure: badssl"
(test-request-error "expired.badssl.com:443")
(test-request-error "wrong.host.badssl.com:443")
(test-request-error "self-signed.badssl.com:443")
(test-request-error "untrusted-root.badssl.com:443")
(test-request-error "revoked.badssl.com:443"))

(test-case "ssl insecure connection: badssl"
(test-request-ok "expired.badssl.com:443" (insecure-client-ssl-context))
(test-request-ok "wrong.host.badssl.com:443" (insecure-client-ssl-context))
(test-request-ok "self-signed.badssl.com:443" (insecure-client-ssl-context))
(test-request-ok "untrusted-root.badssl.com:443" (insecure-client-ssl-context))
(test-request-ok "revoked.badssl.com:443" (insecure-client-ssl-context)))))
(cond-expand
(enable-badssl-test
(test-case "ssl connection failure: badssl"
(test-request-error "expired.badssl.com:443")
(test-request-error "wrong.host.badssl.com:443")
(test-request-error "self-signed.badssl.com:443")
(test-request-error "untrusted-root.badssl.com:443")
(test-request-error "revoked.badssl.com:443"))

(test-case "ssl insecure connection: badssl"
(test-request-ok "expired.badssl.com:443" (insecure-client-ssl-context))
(test-request-ok "wrong.host.badssl.com:443" (insecure-client-ssl-context))
(test-request-ok "self-signed.badssl.com:443" (insecure-client-ssl-context))
(test-request-ok "untrusted-root.badssl.com:443" (insecure-client-ssl-context))
(test-request-ok "revoked.badssl.com:443" (insecure-client-ssl-context)))))))

(def ssl-server-test
(test-suite "ssl server"
Expand Down Expand Up @@ -147,9 +149,11 @@ END
(let (req (http-get "https://www.google.com"))
(check (request-status req) => 200)
(request-close req)))
(test-case "https request failure: badssl"
(check-exception (http-get "https://expired.badssl.com") ssl-error?))
(test-case "https request insecure: badssl"
(cond-expand
(enable-badssl-test
(test-case "https request failure: badssl"
(check-exception (http-get "https://expired.badssl.com") ssl-error?))))
(test-case "https request insecure: www.google.com"
(let (req (http-get "https://www.google.com" ssl-context: (insecure-client-ssl-context)))
(check (request-status req) => 200)
(request-close req)))))
Expand Down

0 comments on commit 92b1a2f

Please sign in to comment.