Skip to content

Commit

Permalink
Fix build for iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Mar 28, 2022
1 parent 2496ac8 commit dc3dbf9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/imp/security_framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ pub struct Identity {
}

impl Identity {
#[cfg(target_os = "ios")]
pub fn from_pkcs8(_: &[u8], _: &[u8]) -> Result<Identity, Error> {
panic!("Not implemented on iOS");
}

#[cfg(not(target_os = "ios"))]
pub fn from_pkcs8(pem: &[u8], key: &[u8]) -> Result<Identity, Error> {
if !key.starts_with(b"-----BEGIN PRIVATE KEY-----") {
return Err(Error(base::Error::from(errSecParam)));
Expand Down Expand Up @@ -215,7 +221,7 @@ impl Certificate {
}

#[cfg(target_os = "ios")]
pub fn from_pem(buf: &[u8]) -> Result<Certificate, Error> {
pub fn from_pem(_: &[u8]) -> Result<Certificate, Error> {
panic!("Not implemented on iOS");
}

Expand Down

0 comments on commit dc3dbf9

Please sign in to comment.