reference/openssl/functions/openssl-sign.xml
497c40ac164d5873fd87f622dfdeb5206392b446
...
...
@@ -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-sign">
3
+
<refentry xml:id="function.openssl-sign" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>openssl_sign</refname>
6
6
<refpurpose>Generate signature</refpurpose>
...
...
@@ -12,14 +12,14 @@
12
12
<type>bool</type><methodname>openssl_sign</methodname>
13
13
<methodparam><type>string</type><parameter>data</parameter></methodparam>
14
14
<methodparam><type>string</type><parameter role="reference">signature</parameter></methodparam>
15
-
<methodparam><type>mixed</type><parameter>priv_key_id</parameter></methodparam>
16
-
<methodparam choice="opt"><type>mixed</type><parameter>signature_alg</parameter><initializer>OPENSSL_ALGO_SHA1</initializer></methodparam>
15
+
<methodparam><type class="union"><type>OpenSSLAsymmetricKey</type><type>OpenSSLCertificate</type><type>array</type><type>string</type></type><parameter>private_key</parameter></methodparam>
16
+
<methodparam choice="opt"><type class="union"><type>string</type><type>int</type></type><parameter>algorithm</parameter><initializer><constant>OPENSSL_ALGO_SHA1</constant></initializer></methodparam>
17
17
</methodsynopsis>
18
18
<para>
19
19
<function>openssl_sign</function> computes a signature for the
20
20
specified <parameter>data</parameter> by generating a cryptographic
21
21
digital signature using the private key associated with
22
-
<parameter>priv_key_id</parameter>. Note that the data itself is
22
+
<parameter>private_key</parameter>. Note that the data itself is
23
23
not encrypted.
24
24
</para>
25
25
</refsect1>
...
...
@@ -46,18 +46,18 @@
46
46
</listitem>
47
47
</varlistentry>
48
48
<varlistentry>
49
-
<term><parameter>priv_key_id</parameter></term>
49
+
<term><parameter>private_key</parameter></term>
50
50
<listitem>
51
51
<para>
52
-
<type>resource</type> - a key, returned by <function>openssl_get_privatekey</function>
52
+
<classname>OpenSSLAsymmetricKey</classname> - a key, returned by <function>openssl_get_privatekey</function>
53
53
</para>
54
54
<para>
55
-
<type>string</type> - a PEM formatted key
55
+
<type>string</type> - a <acronym>PEM</acronym> formatted key
56
56
</para>
57
57
</listitem>
58
58
</varlistentry>
59
59
<varlistentry>
60
-
<term><parameter>signature_alg</parameter></term>
60
+
<term><parameter>algorithm</parameter></term>
61
61
<listitem>
62
62
<para>
63
63
<type>int</type> - one of these <link linkend="openssl.signature-algos">Signature Algorithms</link>.
...
...
@@ -78,6 +78,31 @@
78
78
</para>
79
79
</refsect1>
80
80

81
+
<refsect1 role="changelog">
82
+
&reftitle.changelog;
83
+
<informaltable>
84
+
<tgroup cols="2">
85
+
<thead>
86
+
<row>
87
+
<entry>&Version;</entry>
88
+
<entry>&Description;</entry>
89
+
</row>
90
+
</thead>
91
+
<tbody>
92
+
<row>
93
+
<entry>8.0.0</entry>
94
+
<entry>
95
+
<parameter>private_key</parameter> accepts an <classname>OpenSSLAsymmetricKey</classname>
96
+
or <classname>OpenSSLCertificate</classname> instance now;
97
+
previously, a &resource; of type <literal>OpenSSL key</literal> or <literal>OpenSSL X.509</literal>
98
+
was accepted.
99
+
</entry>
100
+
</row>
101
+
</tbody>
102
+
</tgroup>
103
+
</informaltable>
104
+
</refsect1>
105
+

81
106
<refsect1 role="examples">
82
107
&reftitle.examples;
83
108
<para>
...
...
@@ -147,7 +172,6 @@ var_dump($r);
147
172
</refsect1>
148
173

149
174
</refentry>
150
-

151
175
<!-- Keep this comment at the end of the file
152
176
Local variables:
153
177
mode: sgml
154
178