Skip to content

Commit dc3dbf9

Browse files
committed
Fix build for iOS
1 parent 2496ac8 commit dc3dbf9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/imp/security_framework.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ pub struct Identity {
8585
}
8686

8787
impl Identity {
88+
#[cfg(target_os = "ios")]
89+
pub fn from_pkcs8(_: &[u8], _: &[u8]) -> Result<Identity, Error> {
90+
panic!("Not implemented on iOS");
91+
}
92+
93+
#[cfg(not(target_os = "ios"))]
8894
pub fn from_pkcs8(pem: &[u8], key: &[u8]) -> Result<Identity, Error> {
8995
if !key.starts_with(b"-----BEGIN PRIVATE KEY-----") {
9096
return Err(Error(base::Error::from(errSecParam)));
@@ -215,7 +221,7 @@ impl Certificate {
215221
}
216222

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

0 commit comments

Comments
 (0)