From 1a211f0d960327c189a9005979074a85c4663598 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 1 Dec 2021 09:28:47 +0100 Subject: [PATCH] pbs-api-types: remove openssl dependency for target wasm Signed-off-by: Dietmar Maurer --- pbs-api-types/Cargo.toml | 4 +++- pbs-api-types/src/lib.rs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pbs-api-types/Cargo.toml b/pbs-api-types/Cargo.toml index 50746c79..d295893e 100644 --- a/pbs-api-types/Cargo.toml +++ b/pbs-api-types/Cargo.toml @@ -9,7 +9,6 @@ description = "general API type helpers for PBS" anyhow = "1.0" hex = "0.4.3" lazy_static = "1.4" -openssl = "0.10" percent-encoding = "2.1" regex = "1.2" serde = { version = "1.0", features = ["derive"] } @@ -21,3 +20,6 @@ proxmox-time = "1.1.1" proxmox-uuid = { version = "1.0.0", features = [ "serde" ] } proxmox-sys = "0.2" # only needed for nodename()?? + +[target.'cfg(not(target_arch="wasm32"))'.dependencies] +openssl = "0.10" diff --git a/pbs-api-types/src/lib.rs b/pbs-api-types/src/lib.rs index 2ecd5170..56a80313 100644 --- a/pbs-api-types/src/lib.rs +++ b/pbs-api-types/src/lib.rs @@ -326,6 +326,7 @@ pub struct RsaPubKeyInfo { pub length: usize, } +#[cfg(not(target_arch="wasm32"))] impl std::convert::TryFrom> for RsaPubKeyInfo { type Error = anyhow::Error;