Skip to main content

ms_icpr/
error.rs

1//! Error types for ms-icpr.
2
3use thiserror::Error;
4
5pub type Result<T> = core::result::Result<T, Error>;
6
7#[derive(Debug, Error)]
8pub enum Error {
9    #[error("invalid RSA key: {0}")]
10    Key(String),
11
12    #[error("signing failed: {0}")]
13    Sign(String),
14
15    #[error("invalid oid: {0}")]
16    Oid(String),
17
18    #[error("invalid input: {0}")]
19    Invalid(String),
20
21    // Reserved for future RPC transport wiring (currently unused because
22    // submit_request is stubbed offline — see rpc.rs).
23    #[error("rpc transport: {0}")]
24    Rpc(String),
25
26    // Live-DC-only surface: returned by submit_request until MS-ICPR / WCCE
27    // marshalling is wired to a real \PIPE\cert transport.
28    #[error("live-DC-only path not implemented in offline skeleton")]
29    LiveDcOnly,
30}