pub struct Pkcs7(_);
Expand description

A PKCS#7 structure.

Contains signed and/or encrypted data.

Implementations

Deserializes a PEM-encoded PKCS#7 signature

The input should have a header of -----BEGIN PKCS7-----.

This corresponds to PEM_read_bio_PKCS7.

Deserializes a DER-encoded PKCS#7 signature

This corresponds to d2i_PKCS7.

Parses a message in S/MIME format.

Returns the loaded signature, along with the cleartext message (if available).

This corresponds to SMIME_read_PKCS7.

Creates and returns a PKCS#7 envelopedData structure.

certs is a list of recipient certificates. input is the content to be encrypted. cipher is the symmetric cipher to use. flags is an optional set of flags.

This corresponds to PKCS7_encrypt.

Creates and returns a PKCS#7 signedData structure.

signcert is the certificate to sign with, pkey is the corresponding private key. certs is an optional additional set of certificates to include in the PKCS#7 structure (for example any intermediate CAs in the chain).

This corresponds to PKCS7_sign.

Methods from Deref<Target = Pkcs7Ref>

Converts PKCS#7 structure to S/MIME format

This corresponds to SMIME_write_PKCS7.

Serializes the data into a PEM-encoded PKCS#7 structure.

The output will have a header of -----BEGIN PKCS7-----.

This corresponds to PEM_write_bio_PKCS7.

Serializes the data into a DER-encoded PKCS#7 structure.

This corresponds to i2d_PKCS7.

Decrypts data using the provided private key.

pkey is the recipient’s private key, and cert is the recipient’s certificate.

Returns the decrypted message.

This corresponds to PKCS7_decrypt.

Verifies the PKCS#7 signedData structure contained by &self.

certs is a set of certificates in which to search for the signer’s certificate. store is a trusted certificate store (used for chain verification). indata is the signed data if the content is not present in &self. The content is written to out if it is not None.

This corresponds to PKCS7_verify.

Retrieve the signer’s certificates from the PKCS#7 structure without verifying them.

This corresponds to PKCS7_get0_signers.

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.
Immutably borrows from an owned value. Read more
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Executes the destructor for this type. Read more
The raw C type.
The type representing a reference to this type.
Constructs an instance of this type from its raw type.
Returns a raw pointer to the wrapped value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.