xref: /onnv-gate/usr/src/common/openssl/crypto/pkcs7/doc (revision 0:68f95e015346)
1*0Sstevel@tonic-gateint PKCS7_set_content_type(PKCS7 *p7, int type);
2*0Sstevel@tonic-gateCall to set the type of PKCS7 object we are working on
3*0Sstevel@tonic-gate
4*0Sstevel@tonic-gateint PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
5*0Sstevel@tonic-gate	EVP_MD *dgst);
6*0Sstevel@tonic-gateUse this to setup a signer info
7*0Sstevel@tonic-gateThere will also be functions to add signed and unsigned attributes.
8*0Sstevel@tonic-gate
9*0Sstevel@tonic-gateint PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
10*0Sstevel@tonic-gateAdd a signer info to the content.
11*0Sstevel@tonic-gate
12*0Sstevel@tonic-gateint PKCS7_add_certificae(PKCS7 *p7, X509 *x509);
13*0Sstevel@tonic-gateint PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509);
14*0Sstevel@tonic-gate
15*0Sstevel@tonic-gate----
16*0Sstevel@tonic-gate
17*0Sstevel@tonic-gatep7=PKCS7_new();
18*0Sstevel@tonic-gatePKCS7_set_content_type(p7,NID_pkcs7_signed);
19*0Sstevel@tonic-gate
20*0Sstevel@tonic-gatesigner=PKCS7_SINGNER_INFO_new();
21*0Sstevel@tonic-gatePKCS7_SIGNER_INFO_set(signer,x509,pkey,EVP_md5());
22*0Sstevel@tonic-gatePKCS7_add_signer(py,signer);
23*0Sstevel@tonic-gate
24*0Sstevel@tonic-gatewe are now setup.
25