diff --git a/Cargo.toml b/Cargo.toml
index ff005df..591410d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,6 +12,7 @@ RustyVault's RESTful API is designed to be fully compatible with Hashicorp Vault
"""
repository = "https://github.com/Tongsuo-Project/RustyVault"
documentation = "https://docs.rs/rusty_vault/latest/rusty_vault/"
+build = "build.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -24,8 +25,8 @@ serde_json = "^1.0"
serde_bytes = "0.11"
go-defer = "^0.1"
rand = "^0.8"
-openssl = "0.10"
-openssl-sys = "0.9.92"
+openssl = { version = "0.10" }
+openssl-sys = { version = "0.9" }
derivative = "2.2.0"
enum-map = "2.6.1"
strum = { version = "0.25", features = ["derive"] }
@@ -60,6 +61,10 @@ serde_asn1_der = "0.8"
base64 = "0.22"
ipnetwork = "0.20"
+[patch.crates-io]
+openssl = { git = "https://github.com/Tongsuo-Project/rust-tongsuo.git" }
+openssl-sys = { git = "https://github.com/Tongsuo-Project/rust-tongsuo.git" }
+
[features]
storage_mysql = ["diesel", "r2d2", "r2d2-diesel"]
diff --git a/build.rs b/build.rs
new file mode 100644
index 0000000..2c0ca9e
--- /dev/null
+++ b/build.rs
@@ -0,0 +1,7 @@
+use std::env;
+
+fn main() {
+ if let Ok(_) = env::var("DEP_OPENSSL_TONGSUO") {
+ println!("cargo:rustc-cfg=tongsuo");
+ }
+}
diff --git a/src/modules/pki/path_config_ca.rs b/src/modules/pki/path_config_ca.rs
index 56b41d8..98120de 100644
--- a/src/modules/pki/path_config_ca.rs
+++ b/src/modules/pki/path_config_ca.rs
@@ -46,7 +46,7 @@ For security reasons, you can only view the certificate when reading this endpoi
impl PkiBackendInner {
pub fn write_path_ca(&self, _backend: &dyn Backend, req: &mut Request) -> Result