1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-21 23:04:45 -05:00

perf: use deno_native_certs crate (#18072)

Fixes #18071 

Replace `rustls_native_certs` which links to Security framework.
https://github.com/denoland/deno_native_certs uses dlopen to lazy load
when needed.
This commit is contained in:
Divy Srivastava 2023-10-31 04:55:46 -07:00 committed by GitHub
parent f62e22a699
commit ba6bd444b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 4 deletions

15
Cargo.lock generated
View file

@ -1483,6 +1483,19 @@ dependencies = [
"libloading", "libloading",
] ]
[[package]]
name = "deno_native_certs"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9c7c5a7f03be0fccb523765d76aa6758760f3163459ce777ba3979596db0998"
dependencies = [
"dlopen",
"dlopen_derive",
"once_cell",
"rustls-native-certs",
"rustls-pemfile",
]
[[package]] [[package]]
name = "deno_net" name = "deno_net"
version = "0.113.0" version = "0.113.0"
@ -1687,9 +1700,9 @@ name = "deno_tls"
version = "0.108.0" version = "0.108.0"
dependencies = [ dependencies = [
"deno_core", "deno_core",
"deno_native_certs",
"once_cell", "once_cell",
"rustls", "rustls",
"rustls-native-certs",
"rustls-pemfile", "rustls-pemfile",
"rustls-webpki", "rustls-webpki",
"serde", "serde",

View file

@ -45,9 +45,9 @@ use deno_core::serde_json;
use deno_core::url::Url; use deno_core::url::Url;
use deno_runtime::colors; use deno_runtime::colors;
use deno_runtime::deno_node::PackageJson; use deno_runtime::deno_node::PackageJson;
use deno_runtime::deno_tls::deno_native_certs::load_native_certs;
use deno_runtime::deno_tls::rustls; use deno_runtime::deno_tls::rustls;
use deno_runtime::deno_tls::rustls::RootCertStore; use deno_runtime::deno_tls::rustls::RootCertStore;
use deno_runtime::deno_tls::rustls_native_certs::load_native_certs;
use deno_runtime::deno_tls::rustls_pemfile; use deno_runtime::deno_tls::rustls_pemfile;
use deno_runtime::deno_tls::webpki_roots; use deno_runtime::deno_tls::webpki_roots;
use deno_runtime::inspector_server::InspectorServer; use deno_runtime::inspector_server::InspectorServer;

View file

@ -15,9 +15,9 @@ path = "lib.rs"
[dependencies] [dependencies]
deno_core.workspace = true deno_core.workspace = true
deno_native_certs = "0.1.1"
once_cell.workspace = true once_cell.workspace = true
rustls = { workspace = true, features = ["dangerous_configuration"] } rustls = { workspace = true, features = ["dangerous_configuration"] }
rustls-native-certs.workspace = true
rustls-pemfile.workspace = true rustls-pemfile.workspace = true
rustls-webpki.workspace = true rustls-webpki.workspace = true
serde.workspace = true serde.workspace = true

View file

@ -1,7 +1,7 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
pub use deno_native_certs;
pub use rustls; pub use rustls;
pub use rustls_native_certs;
pub use rustls_pemfile; pub use rustls_pemfile;
pub use webpki; pub use webpki;
pub use webpki_roots; pub use webpki_roots;