From dc3dbf99a56de10b4903ebe3665dcd142e93134b Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Mon, 28 Mar 2022 17:49:21 -0400 Subject: [PATCH] Fix build for iOS --- src/imp/security_framework.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/imp/security_framework.rs b/src/imp/security_framework.rs index 5a89dfa8..0b417722 100644 --- a/src/imp/security_framework.rs +++ b/src/imp/security_framework.rs @@ -85,6 +85,12 @@ pub struct Identity { } impl Identity { + #[cfg(target_os = "ios")] + pub fn from_pkcs8(_: &[u8], _: &[u8]) -> Result { + panic!("Not implemented on iOS"); + } + + #[cfg(not(target_os = "ios"))] pub fn from_pkcs8(pem: &[u8], key: &[u8]) -> Result { if !key.starts_with(b"-----BEGIN PRIVATE KEY-----") { return Err(Error(base::Error::from(errSecParam))); @@ -215,7 +221,7 @@ impl Certificate { } #[cfg(target_os = "ios")] - pub fn from_pem(buf: &[u8]) -> Result { + pub fn from_pem(_: &[u8]) -> Result { panic!("Not implemented on iOS"); }