Skip to content

Commit 8fc071f

Browse files
authored
remove pkcs8 file loading functions (#208)
1 parent 767ed74 commit 8fc071f

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

biscuit-auth/src/crypto/mod.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ use ed25519_dalek::*;
1616

1717
use nom::Finish;
1818
use rand_core::{CryptoRng, RngCore};
19-
#[cfg(feature = "pem")]
20-
use std::path::Path;
2119
use std::{convert::TryInto, fmt::Display, hash::Hash, ops::Drop, str::FromStr};
2220
use zeroize::Zeroize;
2321

@@ -58,20 +56,6 @@ impl KeyPair {
5856
Ok(KeyPair { kp })
5957
}
6058

61-
#[cfg(feature = "pem")]
62-
pub fn from_private_key_der_file(path: impl AsRef<Path>) -> Result<Self, error::Format> {
63-
let kp = SigningKey::read_pkcs8_der_file(path)
64-
.map_err(|e| error::Format::InvalidKey(e.to_string()))?;
65-
Ok(KeyPair { kp })
66-
}
67-
68-
#[cfg(feature = "pem")]
69-
pub fn from_private_key_pem_file(path: impl AsRef<Path>) -> Result<Self, error::Format> {
70-
let kp = SigningKey::read_pkcs8_pem_file(path)
71-
.map_err(|e| error::Format::InvalidKey(e.to_string()))?;
72-
Ok(KeyPair { kp })
73-
}
74-
7559
pub fn private(&self) -> PrivateKey {
7660
let secret = self.kp.to_bytes();
7761
PrivateKey(secret)

0 commit comments

Comments
 (0)