doc 688 B

123456789101112131415161718192021222324
  1. int PKCS7_set_content_type(PKCS7 *p7, int type);
  2. Call to set the type of PKCS7 object we are working on
  3. int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
  4. EVP_MD *dgst);
  5. Use this to setup a signer info
  6. There will also be functions to add signed and unsigned attributes.
  7. int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
  8. Add a signer info to the content.
  9. int PKCS7_add_certificae(PKCS7 *p7, X509 *x509);
  10. int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509);
  11. ----
  12. p7=PKCS7_new();
  13. PKCS7_set_content_type(p7,NID_pkcs7_signed);
  14. signer=PKCS7_SINGNER_INFO_new();
  15. PKCS7_SIGNER_INFO_set(signer,x509,pkey,EVP_md5());
  16. PKCS7_add_signer(py,signer);
  17. we are now setup.