Lines Matching refs:KeyRejected
23 error::{self, KeyRejected},
139 pub fn from_pkcs8(pkcs8: &[u8]) -> Result<Self, KeyRejected> { in from_pkcs8() argument
164 pub fn from_der(input: &[u8]) -> Result<Self, KeyRejected> { in from_der() argument
165 untrusted::Input::from(input).read_all(KeyRejected::invalid_encoding(), |input| { in from_der()
169 error::KeyRejected::invalid_encoding(), in from_der()
175 fn from_der_reader(input: &mut untrusted::Reader) -> Result<Self, KeyRejected> { in from_der_reader() argument
177 .map_err(|error::Unspecified| KeyRejected::invalid_encoding())?; in from_der_reader()
179 return Err(KeyRejected::version_not_supported()); in from_der_reader()
184 ) -> Result<io::Positive<'a>, KeyRejected> { in from_der_reader() argument
186 .map_err(|error::Unspecified| KeyRejected::invalid_encoding()) in from_der_reader()
199 .map_err(|error::Unspecified| KeyRejected::invalid_encoding())?; in from_der_reader()
201 .map_err(|error::Unspecified| KeyRejected::invalid_encoding())?; in from_der_reader()
262 return Err(KeyRejected::inconsistent_components()); in from_der_reader()
275 return Err(KeyRejected::inconsistent_components()); in from_der_reader()
282 .map_err(|error::Unspecified| KeyRejected::inconsistent_components())?; in from_der_reader()
302 .map_err(|error::Unspecified| KeyRejected::inconsistent_components())?; in from_der_reader()
305 return Err(KeyRejected::inconsistent_components()); in from_der_reader()
316 .map_err(|_| error::KeyRejected::invalid_encoding())?; in from_der_reader()
318 return Err(KeyRejected::inconsistent_components()); in from_der_reader()
323 .map_err(|error::Unspecified| KeyRejected::inconsistent_components())?; in from_der_reader()
325 return Err(KeyRejected::invalid_component()); in from_der_reader()
343 .map_err(|error::Unspecified| KeyRejected::invalid_component())? in from_der_reader()
349 .map_err(|error::Unspecified| KeyRejected::unexpected_error())? in from_der_reader()
359 .map_err(|error::Unspecified| KeyRejected::inconsistent_components())?; in from_der_reader()
442 fn new(p: bigint::Nonnegative, dP: untrusted::Input) -> Result<Self, KeyRejected> { in new() argument
445 return Err(error::KeyRejected::private_modulus_len_not_multiple_of_512_bits()); in new()
450 .map_err(|error::Unspecified| KeyRejected::inconsistent_components())?; in new()