⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pkcs7_encrypt.pod

📁 开源的ssl算法openssl,版本0.9.8H
💻 POD
字号:
=pod=head1 NAMEPKCS7_encrypt - create a PKCS#7 envelopedData structure=head1 SYNOPSISPKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher, int flags);=head1 DESCRIPTIONPKCS7_encrypt() creates and returns a PKCS#7 envelopedData structure. B<certs>is a list of recipient certificates. B<in> is the content to be encrypted.B<cipher> is the symmetric cipher to use. B<flags> is an optional set of flags.=head1 NOTESOnly RSA keys are supported in PKCS#7 and envelopedData so the recipient certificatessupplied to this function must all contain RSA public keys, though they do not have tobe signed using the RSA algorithm.EVP_des_ede3_cbc() (triple DES) is the algorithm of choice for S/MIME use becausemost clients will support it.Some old "export grade" clients may only support weak encryption using 40 or 64 bitRC2. These can be used by passing EVP_rc2_40_cbc() and EVP_rc2_64_cbc() respectively.The algorithm passed in the B<cipher> parameter must support ASN1 encoding of itsparameters. Many browsers implement a "sign and encrypt" option which is simply an S/MIME envelopedData containing an S/MIME signed message. This can be readily producedby storing the S/MIME signed message in a memory BIO and passing it toPKCS7_encrypt().The following flags can be passed in the B<flags> parameter.If the B<PKCS7_TEXT> flag is set MIME headers for type B<text/plain> are prependedto the data.Normally the supplied content is translated into MIME canonical format (as requiredby the S/MIME specifications) if B<PKCS7_BINARY> is set no translation occurs. Thisoption should be used if the supplied data is in binary format otherwise the translationwill corrupt it. If B<PKCS7_BINARY> is set then B<PKCS7_TEXT> is ignored.=head1 RETURN VALUESPKCS7_encrypt() returns either a valid PKCS7 structure or NULL if an error occurred.The error can be obtained from ERR_get_error(3).=head1 BUGSThe lack of single pass processing and need to hold all data in memory asmentioned in PKCS7_sign() also applies to PKCS7_verify().=head1 SEE ALSOL<ERR_get_error(3)|ERR_get_error(3)>, L<PKCS7_decrypt(3)|PKCS7_decrypt(3)>=head1 HISTORYPKCS7_decrypt() was added to OpenSSL 0.9.5=cut

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -