File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -4,4 +4,10 @@ include("ca_roots.jl")
44include (" ssh_options.jl" )
55include (" verify_host.jl" )
66
7+ function __init__ ()
8+ SYSTEM_CA_ROOTS[] = nothing
9+ BUNDLED_KNOWN_HOSTS_FILE[] = nothing
10+ empty! (ENV_HOST_PATTERN_CACHE)
11+ end
12+
713end # module
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ const BSD_CA_ROOTS = [
7474]
7575
7676const SYSTEM_CA_ROOTS_LOCK = ReentrantLock ()
77- const SYSTEM_CA_ROOTS = Ref {String} ( )
77+ const SYSTEM_CA_ROOTS = Ref {Union{Nothing, String}} ( nothing )
7878
7979const BEGIN_CERT_REGULAR = " -----BEGIN CERTIFICATE-----"
8080const BEGIN_CERT_OPENSSL = " -----BEGIN TRUSTED CERTIFICATE-----"
@@ -84,7 +84,7 @@ NetworkOptions could only find OpenSSL-specific TLS certificates which cannot be
8484
8585function system_ca_roots ()
8686 lock (SYSTEM_CA_ROOTS_LOCK) do
87- isassigned ( SYSTEM_CA_ROOTS) && return # from lock()
87+ SYSTEM_CA_ROOTS[] != = nothing && return # from lock()
8888 search_path = Sys. islinux () ? LINUX_CA_ROOTS :
8989 Sys. isbsd () && ! Sys. isapple () ? BSD_CA_ROOTS : String[]
9090 openssl_only = false
Original file line number Diff line number Diff line change @@ -160,13 +160,6 @@ function bundled_known_hosts()
160160 end
161161end
162162
163- function __init__ ()
164- # Reset in case we serialized a value here.
165- lock (BUNDLED_KNOWN_HOSTS_LOCK) do
166- BUNDLED_KNOWN_HOSTS_FILE[] = nothing
167- end
168- end
169-
170163const BUNDLED_KNOWN_HOSTS = """
171164github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=
172165github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl
You can’t perform that action at this time.
0 commit comments