reference/openssl/functions/openssl-pkcs7-encrypt.xml
0773339dce767078f1ee0e55cc1c0428e02ae0ad
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.openssl-pkcs7-encrypt">
3
+
<refentry xml:id="function.openssl-pkcs7-encrypt" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>openssl_pkcs7_encrypt</refname>
6
6
<refpurpose>Encrypt an S/MIME message</refpurpose>
...
...
@@ -10,18 +10,18 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>bool</type><methodname>openssl_pkcs7_encrypt</methodname>
13
-
<methodparam><type>string</type><parameter>infile</parameter></methodparam>
14
-
<methodparam><type>string</type><parameter>outfile</parameter></methodparam>
15
-
<methodparam><type>mixed</type><parameter>recipcerts</parameter></methodparam>
16
-
<methodparam><type>array</type><parameter>headers</parameter></methodparam>
13
+
<methodparam><type>string</type><parameter>input_filename</parameter></methodparam>
14
+
<methodparam><type>string</type><parameter>output_filename</parameter></methodparam>
15
+
<methodparam><type class="union"><type>OpenSSLCertificate</type><type>array</type><type>string</type></type><parameter>certificate</parameter></methodparam>
16
+
<methodparam><type class="union"><type>array</type><type>null</type></type><parameter>headers</parameter></methodparam>
17
17
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
18
-
<methodparam choice="opt"><type>int</type><parameter>cipherid</parameter><initializer>OPENSSL_CIPHER_RC2_40</initializer></methodparam>
18
+
<methodparam choice="opt"><type>int</type><parameter>cipher_algo</parameter><initializer><constant>OPENSSL_CIPHER_AES_128_CBC</constant></initializer></methodparam>
19
19
</methodsynopsis>
20
20
<para>
21
21
<function>openssl_pkcs7_encrypt</function> takes the contents of the
22
-
file named <parameter>infile</parameter> and encrypts them using an RC2
22
+
file named <parameter>input_filename</parameter> and encrypts them using an RC2
23
23
40-bit cipher so that they can only be read by the intended recipients
24
-
specified by <parameter>recipcerts</parameter>.
24
+
specified by <parameter>certificate</parameter>.
25
25
</para>
26
26
</refsect1>
27
27

...
...
@@ -30,21 +30,21 @@
30
30
<para>
31
31
<variablelist>
32
32
<varlistentry>
33
-
<term><parameter>infile</parameter></term>
33
+
<term><parameter>input_filename</parameter></term>
34
34
<listitem>
35
35
<para>
36
36
</para>
37
37
</listitem>
38
38
</varlistentry>
39
39
<varlistentry>
40
-
<term><parameter>outfile</parameter></term>
40
+
<term><parameter>output_filename</parameter></term>
41
41
<listitem>
42
42
<para>
43
43
</para>
44
44
</listitem>
45
45
</varlistentry>
46
46
<varlistentry>
47
-
<term><parameter>recipcerts</parameter></term>
47
+
<term><parameter>certificate</parameter></term>
48
48
<listitem>
49
49
<para>
50
50
Either a lone X.509 certificate, or an array of X.509 certificates.
...
...
@@ -76,7 +76,7 @@
76
76
</listitem>
77
77
</varlistentry>
78
78
<varlistentry>
79
-
<term><parameter>cipherid</parameter></term>
79
+
<term><parameter>cipher_algo</parameter></term>
80
80
<listitem>
81
81
<para>
82
82
One of <link linkend="openssl.ciphers">cipher constants</link>.
...
...
@@ -94,6 +94,37 @@
94
94
</para>
95
95
</refsect1>
96
96

97
+
<refsect1 role="changelog">
98
+
&reftitle.changelog;
99
+
<informaltable>
100
+
<tgroup cols="2">
101
+
<thead>
102
+
<row>
103
+
<entry>&Version;</entry>
104
+
<entry>&Description;</entry>
105
+
</row>
106
+
</thead>
107
+
<tbody>
108
+
<row>
109
+
<entry>8.1.0</entry>
110
+
<entry>
111
+
The default cipher algorithm (<parameter>cipher_algo</parameter>) is now
112
+
AES-128-CBC (<constant>OPENSSL_CIPHER_AES_128_CBC</constant>). Previously,
113
+
PKCS7/CMS was used (<constant>OPENSSL_CIPHER_RC2_40</constant>).
114
+
</entry>
115
+
</row>
116
+
<row>
117
+
<entry>8.0.0</entry>
118
+
<entry>
119
+
<parameter>certificate</parameter> accepts an <classname>OpenSSLCertificate</classname> instance now;
120
+
previously, a &resource; of type <literal>OpenSSL X.509 CSR</literal> was accepted.
121
+
</entry>
122
+
</row>
123
+
</tbody>
124
+
</tgroup>
125
+
</informaltable>
126
+
</refsect1>
127
+

97
128
<refsect1 role="examples">
98
129
&reftitle.examples;
99
130
<para>
...
...
@@ -140,7 +171,6 @@ if (openssl_pkcs7_encrypt("msg.txt", "enc.txt", $key,
140
171
</refsect1>
141
172

142
173
</refentry>
143
-

144
174
<!-- Keep this comment at the end of the file
145
175
Local variables:
146
176
mode: sgml
147
177