Leancrypto 1.7.2
Post-Quantum Cryptographic Library
Data Structures | Functions
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. More...
 
int lc_pkcs7_decode_ctx_init (struct lc_pkcs7_parse_context *ctx)
 Initialize a context for decoding a PKCS#7 message. More...
 
void lc_pkcs7_decode_ctx_clear (struct lc_pkcs7_parse_context *ctx)
 Clear the context for decoding a PKCS#7 message. More...
 
int lc_pkcs7_decode_ctx_set_pkcs7 (struct lc_pkcs7_parse_context *ctx, struct lc_pkcs7_message *pkcs7)
 Set the PKCS#7 message definition. More...
 
int lc_pkcs7_decode_ctx_set_aa_content_type (struct lc_pkcs7_parse_context *ctx, enum OID oid)
 Set the expected authenticated attribute ContentType OID. More...
 
int lc_pkcs7_decode_ctx (struct lc_pkcs7_parse_context *ctx, const uint8_t *data, size_t datalen)
 Decode a PKCS#7 message using the provided context. More...
 
void lc_pkcs7_message_clear (struct lc_pkcs7_message *pkcs7)
 Clear the resources used by the PKCS#7 message parsing state. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void lc_pkcs7_trust_store_clear (struct lc_pkcs7_trust_store *trust_store)
 Release and clear the trust store. More...
 

Data Structure Documentation

◆ lc_verify_rules

struct lc_verify_rules

Definition at line 251 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).