20#ifndef LC_PKCS7_GENERATOR_H
21#define LC_PKCS7_GENERATOR_H
75 size_t *avail_datalen);
97 struct lc_x509_certificate *x509);
137 struct lc_x509_certificate *x509_with_sk,
138 const struct lc_hash *signing_hash,
139 unsigned long auth_attribute);
int lc_hash(const struct lc_hash *hash, const uint8_t *in, size_t inlen, uint8_t *digest)
Calculate message digest - one-shot.
int lc_pkcs7_set_signer(struct lc_pkcs7_message *pkcs7, struct lc_x509_certificate *x509_with_sk, const struct lc_hash *signing_hash, unsigned long auth_attribute)
Set an PKCS#7 certificate as signer for a PKCS#7 message.
int lc_pkcs7_set_certificate(struct lc_pkcs7_message *pkcs7, struct lc_x509_certificate *x509)
Set an PKCS#7 certificate to be added to a PKCS#7 message.
int lc_pkcs7_set_data(struct lc_pkcs7_message *pkcs7, const uint8_t *data, size_t data_len, enum lc_pkcs7_set_data_flags flags)
Set the data to be signed with PKCS#7.
int lc_pkcs7_encode(const struct lc_pkcs7_message *pkcs7, uint8_t *data, size_t *avail_datalen)
Encode a PKCS#7 message.
@ lc_pkcs7_set_data_embed
@ lc_pkcs7_set_data_noflag