Skip to main content

HostWithStore

pub trait HostWithStore<T>: HasData + Send {
    // Required methods
    fn import_verifying_key_spki(
        accessor: &Accessor<T, Self>,
        variant: RsaVariant,
        salt_length: u32,
        spki: Vec<u8>,
    ) -> impl Future<Output = Result<Result<Resource<VerifyingKey>, Error>>> + Send;
    fn import_verifying_key_jwk(
        accessor: &Accessor<T, Self>,
        variant: RsaVariant,
        salt_length: u32,
        jwk: String,
    ) -> impl Future<Output = Result<Result<Resource<VerifyingKey>, Error>>> + Send;
}

Required Methods§

Source

fn import_verifying_key_spki( accessor: &Accessor<T, Self>, variant: RsaVariant, salt_length: u32, spki: Vec<u8>, ) -> impl Future<Output = Result<Result<Resource<VerifyingKey>, Error>>> + Send

Import a public key as an X.509 SubjectPublicKeyInfo (DER). Admission follows the family contract (see rsa).

salt-length is the PSS salt length in bytes the minted key verifies with; a signature made under any other salt length fails error.authentication-failed, like any other non-verifying signature. (JOSE’s PS* algorithms fix the salt length to the digest length.)

Source

fn import_verifying_key_jwk( accessor: &Accessor<T, Self>, variant: RsaVariant, salt_length: u32, jwk: String, ) -> impl Future<Output = Result<Result<Resource<VerifyingKey>, Error>>> + Send

Import a public key as an RSA public JWK (kty: "RSA", with n and e); see import-verifying-key-spki for salt-length, and mac-key.export-key-jwk for the package-wide JWK contract. An alg member, when present, must be the variant’s JOSE alg ("PS256", "PS384", or "PS512").

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§