reference/openssl/functions/openssl-open.xml
d1e3ea622e5d4f542cd36eca59a9f22aa0142633
...
...
@@ -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-open">
3
+
<refentry xml:id="function.openssl-open" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>openssl_open</refname>
6
6
<refpurpose>Open sealed data</refpurpose>
...
...
@@ -10,19 +10,19 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>bool</type><methodname>openssl_open</methodname>
13
-
<methodparam><type>string</type><parameter>sealed_data</parameter></methodparam>
14
-
<methodparam><type>string</type><parameter role="reference">open_data</parameter></methodparam>
15
-
<methodparam><type>string</type><parameter>env_key</parameter></methodparam>
16
-
<methodparam><type>mixed</type><parameter>priv_key_id</parameter></methodparam>
17
-
<methodparam choice="opt"><type>string</type><parameter>method</parameter><initializer>"RC4"</initializer></methodparam>
18
-
<methodparam choice="opt"><type>string</type><parameter role="reference">iv</parameter></methodparam>
13
+
<methodparam><type>string</type><parameter>data</parameter></methodparam>
14
+
<methodparam><type>string</type><parameter role="reference">output</parameter></methodparam>
15
+
<methodparam><type>string</type><parameter>encrypted_key</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>string</type><parameter>cipher_algo</parameter></methodparam>
18
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>iv</parameter><initializer>&null;</initializer></methodparam>
19
19
</methodsynopsis>
20
20
<para>
21
21
<function>openssl_open</function> opens (decrypts)
22
-
<parameter>sealed_data</parameter> using the private key associated with
23
-
the key identifier <parameter>priv_key_id</parameter> and the envelope key
24
-
<parameter>env_key</parameter>, and fills
25
-
<parameter>open_data</parameter> with the decrypted data.
22
+
<parameter>data</parameter> using the private key associated with
23
+
the key identifier <parameter>private_key</parameter> and the envelope key
24
+
<parameter>encrypted_key</parameter>, and fills
25
+
<parameter>output</parameter> with the decrypted data.
26
26
The envelope key is generated when the
27
27
data are sealed and can only be used by one specific private key. See
28
28
<function>openssl_seal</function> for more information.
...
...
@@ -34,14 +34,14 @@
34
34
<para>
35
35
<variablelist>
36
36
<varlistentry>
37
-
<term><parameter>sealed_data</parameter></term>
37
+
<term><parameter>data</parameter></term>
38
38
<listitem>
39
39
<para>
40
40
</para>
41
41
</listitem>
42
42
</varlistentry>
43
43
<varlistentry>
44
-
<term><parameter>open_data</parameter></term>
44
+
<term><parameter>output</parameter></term>
45
45
<listitem>
46
46
<para>
47
47
If the call is successful the opened data is returned in this
...
...
@@ -50,24 +50,30 @@
50
50
</listitem>
51
51
</varlistentry>
52
52
<varlistentry>
53
-
<term><parameter>env_key</parameter></term>
53
+
<term><parameter>encrypted_key</parameter></term>
54
54
<listitem>
55
55
<para>
56
56
</para>
57
57
</listitem>
58
58
</varlistentry>
59
59
<varlistentry>
60
-
<term><parameter>priv_key_id</parameter></term>
60
+
<term><parameter>private_key</parameter></term>
61
61
<listitem>
62
62
<para>
63
63
</para>
64
64
</listitem>
65
65
</varlistentry>
66
66
<varlistentry>
67
-
<term><parameter>method</parameter></term>
67
+
<term><parameter>cipher_algo</parameter></term>
68
68
<listitem>
69
69
<para>
70
70
The cipher method.
71
+
<caution>
72
+
<simpara>
73
+
The default value (<literal>'RC4'</literal>) is considered insecure.
74
+
It is strongly recommended to explicitly specify a secure cipher method.
75
+
</simpara>
76
+
</caution>
71
77
</para>
72
78
</listitem>
73
79
</varlistentry>
...
...
@@ -90,7 +96,7 @@
90
96
</para>
91
97
</refsect1>
92
98

93
-
<refsect1 role="changelog"><!-- {{{ -->
99
+
<refsect1 role="changelog">
94
100
&reftitle.changelog;
95
101
<informaltable>
96
102
<tgroup cols="2">
...
...
@@ -102,21 +108,24 @@
102
108
</thead>
103
109
<tbody>
104
110
<row>
105
-
<entry>7.0.0</entry>
111
+
<entry>8.0.0</entry>
106
112
<entry>
107
-
The <parameter>iv</parameter> has been added.
113
+
<parameter>private_key</parameter> accepts an <classname>OpenSSLAsymmetricKey</classname>
114
+
or <classname>OpenSSLCertificate</classname> instance now;
115
+
previously, a &resource; of type <literal>OpenSSL key</literal> or <literal>OpenSSL X.509 CSR</literal>
116
+
was accepted.
108
117
</entry>
109
118
</row>
110
119
<row>
111
-
<entry>5.3.0</entry>
120
+
<entry>8.0.0</entry>
112
121
<entry>
113
-
The <parameter>method</parameter> has been added.
122
+
<parameter>cipher_algo</parameter> is no longer an optional parameter.
114
123
</entry>
115
124
</row>
116
125
</tbody>
117
126
</tgroup>
118
127
</informaltable>
119
-
</refsect1><!-- }}} -->
128
+
</refsect1>
120
129

121
130
<refsect1 role="examples">
122
131
&reftitle.examples;
...
...
@@ -161,7 +170,6 @@ openssl_free_key($pkeyid);
161
170
</refsect1>
162
171

163
172
</refentry>
164
-

165
173
<!-- Keep this comment at the end of the file
166
174
Local variables:
167
175
mode: sgml
168
176