reference/openssl/functions/openssl-pkcs7-sign.xml
9e8ce329fd5025766d9cf4d983435a373cf9666a
...
...
@@ -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-sign">
3
+
<refentry xml:id="function.openssl-pkcs7-sign" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>openssl_pkcs7_sign</refname>
6
6
<refpurpose>Sign an S/MIME message</refpurpose>
...
...
@@ -10,19 +10,19 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>bool</type><methodname>openssl_pkcs7_sign</methodname>
13
-
<methodparam><type>string</type><parameter>infilename</parameter></methodparam>
14
-
<methodparam><type>string</type><parameter>outfilename</parameter></methodparam>
15
-
<methodparam><type>mixed</type><parameter>signcert</parameter></methodparam>
16
-
<methodparam><type>mixed</type><parameter>privkey</parameter></methodparam>
17
-
<methodparam><type>array</type><parameter>headers</parameter></methodparam>
18
-
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>PKCS7_DETACHED</initializer></methodparam>
19
-
<methodparam choice="opt"><type>string</type><parameter>extracerts</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>string</type></type><parameter>certificate</parameter></methodparam>
16
+
<methodparam><type class="union"><type>OpenSSLAsymmetricKey</type><type>OpenSSLCertificate</type><type>array</type><type>string</type></type><parameter>private_key</parameter></methodparam>
17
+
<methodparam><type class="union"><type>array</type><type>null</type></type><parameter>headers</parameter></methodparam>
18
+
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>PKCS7_DETACHED</constant></initializer></methodparam>
19
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>untrusted_certificates_filename</parameter><initializer>&null;</initializer></methodparam>
20
20
</methodsynopsis>
21
21
<para>
22
22
<function>openssl_pkcs7_sign</function> takes the contents of the file
23
-
named <parameter>infilename</parameter> and signs them using the
23
+
named <parameter>input_filename</parameter> and signs them using the
24
24
certificate and its matching private key specified by
25
-
<parameter>signcert</parameter> and <parameter>privkey</parameter>
25
+
<parameter>certificate</parameter> and <parameter>private_key</parameter>
26
26
parameters.
27
27
</para>
28
28
</refsect1>
...
...
@@ -32,7 +32,7 @@
32
32
<para>
33
33
<variablelist>
34
34
<varlistentry>
35
-
<term><parameter>infilename</parameter></term>
35
+
<term><parameter>input_filename</parameter></term>
36
36
<listitem>
37
37
<para>
38
38
The input file you are intending to digitally sign.
...
...
@@ -40,7 +40,7 @@
40
40
</listitem>
41
41
</varlistentry>
42
42
<varlistentry>
43
-
<term><parameter>outfilename</parameter></term>
43
+
<term><parameter>output_filename</parameter></term>
44
44
<listitem>
45
45
<para>
46
46
The file which the digital signature will be written to.
...
...
@@ -48,19 +48,19 @@
48
48
</listitem>
49
49
</varlistentry>
50
50
<varlistentry>
51
-
<term><parameter>signcert</parameter></term>
51
+
<term><parameter>certificate</parameter></term>
52
52
<listitem>
53
53
<para>
54
-
The X.509 certificate used to digitally sign infilename.
54
+
The X.509 certificate used to digitally sign <parameter>input_filename</parameter>.
55
55
See <link linkend="openssl.certparams">Key/Certificate parameters</link> for a list of valid values.
56
56
</para>
57
57
</listitem>
58
58
</varlistentry>
59
59
<varlistentry>
60
-
<term><parameter>privkey</parameter></term>
60
+
<term><parameter>private_key</parameter></term>
61
61
<listitem>
62
62
<para>
63
-
<parameter>privkey</parameter> is the private key corresponding to signcert.
63
+
<parameter>private_key</parameter> is the private key corresponding to <parameter>certificate</parameter>.
64
64
See <link linkend="openssl.certparams">Public/Private Key parameters</link> for a list of valid values.
65
65
</para>
66
66
</listitem>
...
...
@@ -80,16 +80,15 @@
80
80
<term><parameter>flags</parameter></term>
81
81
<listitem>
82
82
<para>
83
-
<parameter>flags</parameter> can be used to alter the output - see <link
84
-
linkend="openssl.pkcs7.flags">PKCS7 constants</link>.
83
+
<parameter>flags</parameter> can be used to alter the output - see <link linkend="openssl.pkcs7.flags">PKCS7 constants</link>.
85
84
</para>
86
85
</listitem>
87
86
</varlistentry>
88
87
<varlistentry>
89
-
<term><parameter>extracerts</parameter></term>
88
+
<term><parameter>untrusted_certificates_filename</parameter></term>
90
89
<listitem>
91
90
<para>
92
-
<parameter>extracerts</parameter> specifies the name of a file containing
91
+
<parameter>untrusted_certificates_filename</parameter> specifies the name of a file containing
93
92
a bunch of extra certificates to include in the signature which can for
94
93
example be used to help the recipient to verify the certificate that you used.
95
94
</para>
...
...
@@ -106,6 +105,38 @@
106
105
</para>
107
106
</refsect1>
108
107

108
+
<refsect1 role="changelog">
109
+
&reftitle.changelog;
110
+
<informaltable>
111
+
<tgroup cols="2">
112
+
<thead>
113
+
<row>
114
+
<entry>&Version;</entry>
115
+
<entry>&Description;</entry>
116
+
</row>
117
+
</thead>
118
+
<tbody>
119
+
<row>
120
+
<entry>8.0.0</entry>
121
+
<entry>
122
+
<parameter>certificate</parameter> accepts an <classname>OpenSSLCertificate</classname> instance now;
123
+
previously, a &resource; of type <literal>OpenSSL X.509 CSR</literal> was accepted.
124
+
</entry>
125
+
</row>
126
+
<row>
127
+
<entry>8.0.0</entry>
128
+
<entry>
129
+
<parameter>private_key</parameter> accepts an <classname>OpenSSLAsymmetricKey</classname>
130
+
or <classname>OpenSSLCertificate</classname> instance now;
131
+
previously, a &resource; of type <literal>OpenSSL key</literal> or <literal>OpenSSL X.509 CSR</literal>
132
+
was accepted.
133
+
</entry>
134
+
</row>
135
+
</tbody>
136
+
</tgroup>
137
+
</informaltable>
138
+
</refsect1>
139
+

109
140
<refsect1 role="examples">
110
141
&reftitle.examples;
111
142
<para>
...
...
@@ -144,7 +175,6 @@ if (openssl_pkcs7_sign("msg.txt", "signed.txt", "file://mycert.pem",
144
175
</refsect1>
145
176

146
177
</refentry>
147
-

148
178
<!-- Keep this comment at the end of the file
149
179
Local variables:
150
180
mode: sgml
151
181