Mudrit
Reference

Pickers

WinStorePicker, Pkcs11Picker, PickerLabels, and the native certificate-properties viewer

Part of mudrit-keystore

For the narrative tour — why there are two pickers, and when to use which — see Certificate Pickers. This page is the exhaustive API reference.

WinStorePicker

Feature winstore · Windows only. Configures the native Windows certificate-selection dialog: which certificates appear (CertFilter) and the title / prompt text. Implements Default.

Prop

Type

use mudrit::prelude::*;

let signer = WinStorePicker::new()
    .filter(CertFilter::default().signing_only(true))
    .title("Acme Sign — choose your certificate")
    .prompt("Select your signing DSC / token:")
    .parent_hwnd(hwnd)
    .auto_select_single(true)
    .select()?;

view_certificate

Feature winstore-viewer (Windows only). Shows the native Windows certificate-properties viewer for a DER-encoded certificate — the same dialog the OS certificate-selection UI links to.

Prop

Type

use mudrit::mudrit_keystore::view_certificate;

view_certificate(signer.certificate(), None)?; // None = no parent hwnd

For a cross-platform, zero-extra-dependency alternative, render your own view from parse_certificate()CertDetails instead of the native viewer.

Pkcs11Picker

Feature pkcs11-picker (mudrit-keystore) / picker (mudrit facade). A cross-platform Iced picker over one or more PKCS#11 modules — a themed selection window, then a separate PIN window, returning the unlocked Signer.

Prop

Type

use mudrit::mudrit_keystore::{Pkcs11Picker, PickerLabels};

let signer = Pkcs11Picker::new(modules)
    .title("Acme Sign — choose your certificate")
    .pin_title("Acme Sign — unlock token")
    .labels(PickerLabels { ok: "Sign".into(), cancel: "Dismiss".into(), ..Default::default() })
    .select()?;

PickerLabels

Every user-facing string in Pkcs11Picker — one struct rebrands and translates the whole UI. Clone + Debug; Default is the bundled English set.

Prop

Type

Next

On this page