Leancrypto 1.6.0
Post-Quantum Cryptographic Library
Loading...
Searching...
No Matches
lc_pkcs7_parser.h File Reference
#include "ext_headers.h"
#include "lc_hash.h"
#include "lc_pkcs7_common.h"
#include "lc_x509_parser.h"
Include dependency graph for lc_pkcs7_parser.h:

Go to the source code of this file.

Data Structures

struct  lc_verify_rules

Functions

int lc_pkcs7_decode (struct lc_pkcs7_message *pkcs7, const uint8_t *data, size_t datalen)
 Decode a PKCS#7 message.
void lc_pkcs7_message_clear (struct lc_pkcs7_message *pkcs7)
 Clear the resources used by the PKCS#7 message parsing state.
int lc_pkcs7_get_content_data (const struct lc_pkcs7_message *pkcs7, const uint8_t **data, size_t *datalen)
 Get access to the PKCS#7 encapsulated content.
int lc_pkcs7_verify (struct lc_pkcs7_message *pkcs7, const struct lc_pkcs7_trust_store *trust_store, const struct lc_verify_rules *verify_rules)
 Verify a PKCS#7 message.
int lc_pkcs7_supply_detached_data (struct lc_pkcs7_message *pkcs7, const uint8_t *data, size_t datalen)
 Supply the data needed to verify a PKCS#7 message.
int lc_pkcs7_get_digest (struct lc_pkcs7_message *pkcs7, const uint8_t **message_digest, size_t *message_digest_len, const struct lc_hash **hash_algo)
 Calculate and return the message digest of the data.
int lc_pkcs7_trust_store_add (struct lc_pkcs7_trust_store *trust_store, struct lc_x509_certificate *x509)
 Add a certificate to a certificate trust store.
void lc_pkcs7_trust_store_clear (struct lc_pkcs7_trust_store *trust_store)
 Release and clear the trust store.

Data Structure Documentation

◆ lc_verify_rules

struct lc_verify_rules

Definition at line 137 of file lc_pkcs7_parser.h.

Data Fields
uint16_t required_eku

Specify the extended key usage flags a signer certificate must possess.

The allowed flags are documented as part of struct lc_public_key. If any key usage flag should match (e.g. the key usage field is irrelevant, use 0).

uint16_t required_keyusage

Specify the key usage flags a signer certificate must possess.

The allowed flags are documented as part of struct lc_public_key. If any key usage flag should match (e.g. the key usage field is irrelevant, use 0).