apple_codesign::remote_signing::session_negotiation

Trait SessionInitiatePeer

Source
pub trait SessionInitiatePeer {
    // Required methods
    fn session_id(&self) -> &str;
    fn session_create_context(&self) -> Option<Vec<u8>>;
    fn session_join_string_bytes(&self) -> Result<Vec<u8>, RemoteSignError>;
    fn negotiate_session(
        self: Box<Self>,
        peer_context: Option<Vec<u8>>,
    ) -> Result<PeerKeys, RemoteSignError>;

    // Provided methods
    fn session_join_string_base64(&self) -> Result<String, RemoteSignError> { ... }
    fn session_join_string_pem(&self) -> Result<String, RemoteSignError> { ... }
}
Expand description

A peer that initiates a remote signing session.

Required Methods§

Source

fn session_id(&self) -> &str

Obtain the session ID to create / use.

Source

fn session_create_context(&self) -> Option<Vec<u8>>

Obtain additional session context to store with the server.

This context will be sent to the peer when it joins.

Source

fn session_join_string_bytes(&self) -> Result<Vec<u8>, RemoteSignError>

Obtain the raw bytes constituting the session join string.

Source

fn negotiate_session( self: Box<Self>, peer_context: Option<Vec<u8>>, ) -> Result<PeerKeys, RemoteSignError>

Finalize a peer joined session using optional context provided by the peer.

Yields encryption keys for this peer.

Provided Methods§

Source

fn session_join_string_base64(&self) -> Result<String, RemoteSignError>

Obtain the base 64 encoded session join string.

Source

fn session_join_string_pem(&self) -> Result<String, RemoteSignError>

Obtain the PEM encoded session join string.

Implementors§