Skip to main content

EstHandler

Trait EstHandler 

Source
pub trait EstHandler:
    Send
    + Sync
    + 'static {
    // Required method
    fn handle(
        &self,
        operation: EstOperation,
        label: Option<&str>,
        payload: &[u8],
        content_format: Option<u16>,
        client_cert: Option<&ClientCertInfo>,
    ) -> Result<EstResponse, CoapError>;
}
Expand description

Callback trait for processing EST operations.

Implementors handle the actual EST logic (certificate issuance, CSR attribute retrieval, etc.) while the CoapDtlsServer handles CoAP/DTLS transport concerns.

The callback receives the EST operation, request payload, and optional client certificate information (from DTLS mTLS). It returns an EstResponse containing the response payload, content-format, and optional audit metadata for NIAP FAU_GEN.1 event recording.

Required Methods§

Source

fn handle( &self, operation: EstOperation, label: Option<&str>, payload: &[u8], content_format: Option<u16>, client_cert: Option<&ClientCertInfo>, ) -> Result<EstResponse, CoapError>

Processes an EST operation and returns the response.

§Arguments
  • operation - The EST operation being requested.
  • label - The optional EST label from the request URI (selects the CA and per-label access-control policy); None for the default endpoint.
  • payload - The request body (e.g., PKCS#10 CSR for enrollment).
  • content_format - The CoAP content-format of the request payload.
  • client_cert - Client certificate from DTLS mTLS, if presented.
§Returns

An EstResponse on success, or a CoapError on failure.

Implementors§