Эх сурвалжийг харах

Remove openssl dependency throughout the project.

parazyd 3 жил өмнө
parent
commit
8c1d3fe524

+ 17 - 113
Cargo.lock

@@ -175,18 +175,6 @@ dependencies = [
  "futures-lite",
  "futures-lite",
 ]
 ]
 
 
-[[package]]
-name = "async-native-tls"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d57d4cec3c647232e1094dc013546c0b33ce785d8aeb251e1f20dfaf8a9a13fe"
-dependencies = [
- "futures-util",
- "native-tls",
- "thiserror",
- "url",
-]
-
 [[package]]
 [[package]]
 name = "async-net"
 name = "async-net"
 version = "1.7.0"
 version = "1.7.0"
@@ -491,9 +479,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
 
 
 [[package]]
 [[package]]
 name = "bytes"
 name = "bytes"
-version = "1.3.0"
+version = "1.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c"
+checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
 
 
 [[package]]
 [[package]]
 name = "camino"
 name = "camino"
@@ -2651,24 +2639,6 @@ dependencies = [
  "pkg-config",
  "pkg-config",
 ]
 ]
 
 
-[[package]]
-name = "native-tls"
-version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"
-dependencies = [
- "lazy_static",
- "libc",
- "log",
- "openssl",
- "openssl-probe",
- "openssl-sys",
- "schannel",
- "security-framework",
- "security-framework-sys",
- "tempfile",
-]
-
 [[package]]
 [[package]]
 name = "nix"
 name = "nix"
 version = "0.26.2"
 version = "0.26.2"
@@ -2793,51 +2763,6 @@ version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
 checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
 
 
-[[package]]
-name = "openssl"
-version = "0.10.45"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1"
-dependencies = [
- "bitflags",
- "cfg-if",
- "foreign-types",
- "libc",
- "once_cell",
- "openssl-macros",
- "openssl-sys",
-]
-
-[[package]]
-name = "openssl-macros"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "openssl-probe"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
-
-[[package]]
-name = "openssl-sys"
-version = "0.9.80"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7"
-dependencies = [
- "autocfg",
- "cc",
- "libc",
- "pkg-config",
- "vcpkg",
-]
-
 [[package]]
 [[package]]
 name = "os_str_bytes"
 name = "os_str_bytes"
 version = "6.4.1"
 version = "6.4.1"
@@ -3568,15 +3493,6 @@ dependencies = [
  "winapi-util",
  "winapi-util",
 ]
 ]
 
 
-[[package]]
-name = "schannel"
-version = "0.1.21"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3"
-dependencies = [
- "windows-sys 0.42.0",
-]
-
 [[package]]
 [[package]]
 name = "scopeguard"
 name = "scopeguard"
 version = "1.1.0"
 version = "1.1.0"
@@ -3605,29 +3521,6 @@ version = "4.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b"
 checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b"
 
 
-[[package]]
-name = "security-framework"
-version = "2.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254"
-dependencies = [
- "bitflags",
- "core-foundation",
- "core-foundation-sys",
- "libc",
- "security-framework-sys",
-]
-
-[[package]]
-name = "security-framework-sys"
-version = "2.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4"
-dependencies = [
- "core-foundation-sys",
- "libc",
-]
-
 [[package]]
 [[package]]
 name = "semver"
 name = "semver"
 version = "0.11.0"
 version = "0.11.0"
@@ -3935,6 +3828,8 @@ dependencies = [
  "once_cell",
  "once_cell",
  "paste",
  "paste",
  "percent-encoding",
  "percent-encoding",
+ "rustls",
+ "rustls-pemfile",
  "sha2",
  "sha2",
  "smallvec",
  "smallvec",
  "sqlformat",
  "sqlformat",
@@ -3942,6 +3837,7 @@ dependencies = [
  "stringprep",
  "stringprep",
  "thiserror",
  "thiserror",
  "url",
  "url",
+ "webpki-roots",
 ]
 ]
 
 
 [[package]]
 [[package]]
@@ -3969,9 +3865,8 @@ version = "0.6.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "24c5b2d25fa654cc5f841750b8e1cdedbe21189bf9a9382ee90bfa9dd3562396"
 checksum = "24c5b2d25fa654cc5f841750b8e1cdedbe21189bf9a9382ee90bfa9dd3562396"
 dependencies = [
 dependencies = [
- "async-native-tls",
  "async-std",
  "async-std",
- "native-tls",
+ "futures-rustls",
 ]
 ]
 
 
 [[package]]
 [[package]]
@@ -4524,9 +4419,9 @@ dependencies = [
 
 
 [[package]]
 [[package]]
 name = "unicode-segmentation"
 name = "unicode-segmentation"
-version = "1.10.0"
+version = "1.10.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a"
+checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
 
 
 [[package]]
 [[package]]
 name = "unicode-width"
 name = "unicode-width"
@@ -4956,6 +4851,15 @@ dependencies = [
  "untrusted",
  "untrusted",
 ]
 ]
 
 
+[[package]]
+name = "webpki-roots"
+version = "0.22.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87"
+dependencies = [
+ "webpki",
+]
+
 [[package]]
 [[package]]
 name = "weezl"
 name = "weezl"
 version = "0.1.7"
 version = "0.1.7"

+ 2 - 2
Cargo.toml

@@ -120,8 +120,8 @@ wasmer-compiler-singlepass = {version = "3.1.1", optional = true}
 wasmer-middlewares = {version = "3.1.1", optional = true}
 wasmer-middlewares = {version = "3.1.1", optional = true}
 
 
 # Wallet management
 # Wallet management
-libsqlite3-sys = {version = "0.24.2", features = ["bundled-sqlcipher"],  optional = true }
-sqlx = {version = "0.6.2", features = ["runtime-async-std-native-tls", "sqlite"], optional = true}
+libsqlite3-sys = {version = "0.24.1", features = ["bundled-sqlcipher"],  optional = true }
+sqlx = {version = "0.6.2", features = ["runtime-async-std-rustls", "sqlite"], optional = true}
 
 
 # Blockchain store
 # Blockchain store
 sled = {version = "0.34.7", optional = true}
 sled = {version = "0.34.7", optional = true}

+ 1 - 3
README.md

@@ -43,7 +43,6 @@ The following dependencies are also required:
 | jq             | jq               |
 | jq             | jq               |
 | gcc            | gcc              |
 | gcc            | gcc              |
 | pkg-config     | pkg-config       |
 | pkg-config     | pkg-config       |
-| openssl libs   | libssl-dev       |
 
 
 Users of Debian-based systems (e.g. Ubuntu) can simply run the
 Users of Debian-based systems (e.g. Ubuntu) can simply run the
 following to install the required dependencies:
 following to install the required dependencies:
@@ -66,8 +65,7 @@ package manager, please consider adding support for it into the script
 and sending a patch.
 and sending a patch.
 
 
 To build the necessary binaries, we can just clone the repo, and use
 To build the necessary binaries, we can just clone the repo, and use
-the provided Makefile to build the project. This will download the
-trusted setup params, and compile the source code.
+the provided Makefile to build the project:
 
 
 ```shell
 ```shell
 % git clone https://github.com/darkrenaissance/darkfi
 % git clone https://github.com/darkrenaissance/darkfi

+ 1 - 1
bin/darkfid/Cargo.toml

@@ -23,7 +23,7 @@ serde_json = "1.0.91"
 simplelog = "0.12.0"
 simplelog = "0.12.0"
 sled = "0.34.7"
 sled = "0.34.7"
 smol = "1.3.0"
 smol = "1.3.0"
-sqlx = {version = "0.6.2", features = ["runtime-async-std-native-tls", "sqlite"]}
+sqlx = {version = "0.6.2", features = ["runtime-async-std-rustls", "sqlite"]}
 url = "2.3.1"
 url = "2.3.1"
 
 
 # Argument parsing
 # Argument parsing

+ 1 - 1
bin/darkwiki/darkwikid/Cargo.toml

@@ -30,5 +30,5 @@ structopt = "0.3.26"
 structopt-toml = "0.5.1"
 structopt-toml = "0.5.1"
 smol = "1.3.0"
 smol = "1.3.0"
 toml = "0.7.1"
 toml = "0.7.1"
-unicode-segmentation = "1.10.0"
+unicode-segmentation = "1.10.1"
 url = "2.3.1"
 url = "2.3.1"

+ 1 - 1
bin/drk/Cargo.toml

@@ -29,6 +29,6 @@ smol = "1.3.0"
 simplelog = "0.12.0"
 simplelog = "0.12.0"
 signal-hook-async-std = "0.2.2"
 signal-hook-async-std = "0.2.2"
 signal-hook = "0.3.14"
 signal-hook = "0.3.14"
-sqlx = {version = "0.6.2", features = ["runtime-async-std-native-tls", "sqlite"]}
+sqlx = {version = "0.6.2", features = ["runtime-async-std-rustls", "sqlite"]}
 url = "2.3.1"
 url = "2.3.1"
 play = {version = "0.5.3", optional = true}
 play = {version = "0.5.3", optional = true}

+ 1 - 1
bin/faucetd/Cargo.toml

@@ -25,7 +25,7 @@ serde_json = "1.0.91"
 simplelog = "0.12.0"
 simplelog = "0.12.0"
 sled = "0.34.7"
 sled = "0.34.7"
 smol = "1.3.0"
 smol = "1.3.0"
-sqlx = {version = "0.6.2", features = ["runtime-async-std-native-tls", "sqlite"]}
+sqlx = {version = "0.6.2", features = ["runtime-async-std-rustls", "sqlite"]}
 url = "2.3.1"
 url = "2.3.1"
 
 
 # Argument parsing
 # Argument parsing

+ 7 - 7
contrib/dependency_setup.sh

@@ -22,37 +22,37 @@ setup_mac() {
 }
 }
 
 
 setup_apt() {
 setup_apt() {
-	apt_deps="git make jq gcc pkg-config libssl-dev"
+	apt_deps="git make jq gcc pkg-config"
 	$1 install $apt_deps || return 1
 	$1 install $apt_deps || return 1
 }
 }
 
 
 setup_pacman() {
 setup_pacman() {
-	pacman_deps="git make jq gcc pkgconf openssl"
+	pacman_deps="git make jq gcc pkgconf"
 	$1 -Sy $pacman_deps || return 1
 	$1 -Sy $pacman_deps || return 1
 }
 }
 
 
 setup_xbps() {
 setup_xbps() {
-	xbps_deps="git make jq gcc pkg-config openssl-devel"
+	xbps_deps="git make jq gcc pkg-config"
 	$1 -S $xbps_deps || return 1
 	$1 -S $xbps_deps || return 1
 }
 }
 
 
 setup_dnf() {
 setup_dnf() {
-	dnf_deps="git make jq gcc pkg-config openssl-devel findutils lato-fonts"
+	dnf_deps="git make jq gcc pkg-config findutils lato-fonts"
 	$1 install -y $dnf_deps || return 1
 	$1 install -y $dnf_deps || return 1
 }
 }
 
 
 setup_apk() {
 setup_apk() {
-	apk_deps="git make jq gcc musl-dev openssl-dev"
+	apk_deps="git make jq gcc musl-dev"
 	$1 add $apk_deps || return 1
 	$1 add $apk_deps || return 1
 }
 }
 
 
 setup_zypper() {
 setup_zypper() {
-	zypper_deps="git make jq gcc pkg-config openssl-devel findutils"
+	zypper_deps="git make jq gcc pkg-config findutils"
 	$1 install -y $zypper_deps || return 1
 	$1 install -y $zypper_deps || return 1
 }
 }
 
 
 setup_emerge() {
 setup_emerge() {
-	emerge_deps="dev-vcs/git app-misc/jq dev-util/pkgconf dev-libs/openssl"
+	emerge_deps="dev-vcs/git app-misc/jq dev-util/pkgconf"
 	$1 $emerge_deps || return 1
 	$1 $emerge_deps || return 1
 }
 }
 
 

+ 1 - 1
src/contract/dao/Cargo.toml

@@ -29,7 +29,7 @@ darkfi = {path = "../../../", features = ["tx", "blockchain"]}
 darkfi-money-contract = { path = "../money", features = ["client", "no-entrypoint"] }
 darkfi-money-contract = { path = "../money", features = ["client", "no-entrypoint"] }
 simplelog = "0.12.0"
 simplelog = "0.12.0"
 sled = "0.34.7"
 sled = "0.34.7"
-sqlx = {version = "0.6.2", features = ["runtime-async-std-native-tls", "sqlite"]}
+sqlx = {version = "0.6.2", features = ["runtime-async-std-rustls", "sqlite"]}
 
 
 # We need to disable random using "custom" which makes the crate a noop
 # We need to disable random using "custom" which makes the crate a noop
 # so the wasm32-unknown-unknown target is enabled.
 # so the wasm32-unknown-unknown target is enabled.

+ 1 - 1
src/contract/money/Cargo.toml

@@ -26,7 +26,7 @@ async-std = {version = "1.12.0", features = ["attributes"]}
 darkfi = {path = "../../../", features = ["tx", "blockchain"]}
 darkfi = {path = "../../../", features = ["tx", "blockchain"]}
 simplelog = "0.12.0"
 simplelog = "0.12.0"
 sled = "0.34.7"
 sled = "0.34.7"
-sqlx = {version = "0.6.2", features = ["runtime-async-std-native-tls", "sqlite"]}
+sqlx = {version = "0.6.2", features = ["runtime-async-std-rustls", "sqlite"]}
 
 
 # We need to disable random using "custom" which makes the crate a noop
 # We need to disable random using "custom" which makes the crate a noop
 # so the wasm32-unknown-unknown target is enabled.
 # so the wasm32-unknown-unknown target is enabled.