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,18 +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></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>
18
19
</methodsynopsis>
19
20
<para>
20
21
<function>openssl_open</function> opens (decrypts)
21
-
<parameter>sealed_data</parameter> using the private key associated with
22
-
the key identifier <parameter>priv_key_id</parameter> and the envelope key
23
-
<parameter>env_key</parameter>, and fills
24
-
<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.
25
26
The envelope key is generated when the
26
27
data are sealed and can only be used by one specific private key. See
27
28
<function>openssl_seal</function> for more information.
...
...
@@ -33,14 +34,14 @@
33
34
<para>
34
35
<variablelist>
35
36
<varlistentry>
36
-
<term><parameter>sealed_data</parameter></term>
37
+
<term><parameter>data</parameter></term>
37
38
<listitem>
38
39
<para>
39
40
</para>
40
41
</listitem>
41
42
</varlistentry>
42
43
<varlistentry>
43
-
<term><parameter>open_data</parameter></term>
44
+
<term><parameter>output</parameter></term>
44
45
<listitem>
45
46
<para>
46
47
If the call is successful the opened data is returned in this
...
...
@@ -49,19 +50,41 @@
49
50
</listitem>
50
51
</varlistentry>
51
52
<varlistentry>
52
-
<term><parameter>env_key</parameter></term>
53
+
<term><parameter>encrypted_key</parameter></term>
53
54
<listitem>
54
55
<para>
55
56
</para>
56
57
</listitem>
57
58
</varlistentry>
58
59
<varlistentry>
59
-
<term><parameter>priv_key_id</parameter></term>
60
+
<term><parameter>private_key</parameter></term>
60
61
<listitem>
61
62
<para>
62
63
</para>
63
64
</listitem>
64
65
</varlistentry>
66
+
<varlistentry>
67
+
<term><parameter>cipher_algo</parameter></term>
68
+
<listitem>
69
+
<para>
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>
77
+
</para>
78
+
</listitem>
79
+
</varlistentry>
80
+
<varlistentry>
81
+
<term><parameter>iv</parameter></term>
82
+
<listitem>
83
+
<para>
84
+
The initialization vector.
85
+
</para>
86
+
</listitem>
87
+
</varlistentry>
65
88
</variablelist>
66
89
</para>
67
90
</refsect1>
...
...
@@ -73,6 +96,37 @@
73
96
</para>
74
97
</refsect1>
75
98

99
+
<refsect1 role="changelog">
100
+
&reftitle.changelog;
101
+
<informaltable>
102
+
<tgroup cols="2">
103
+
<thead>
104
+
<row>
105
+
<entry>&Version;</entry>
106
+
<entry>&Description;</entry>
107
+
</row>
108
+
</thead>
109
+
<tbody>
110
+
<row>
111
+
<entry>8.0.0</entry>
112
+
<entry>
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.
117
+
</entry>
118
+
</row>
119
+
<row>
120
+
<entry>8.0.0</entry>
121
+
<entry>
122
+
<parameter>cipher_algo</parameter> is no longer an optional parameter.
123
+
</entry>
124
+
</row>
125
+
</tbody>
126
+
</tgroup>
127
+
</informaltable>
128
+
</refsect1>
129
+

76
130
<refsect1 role="examples">
77
131
&reftitle.examples;
78
132
<para>
...
...
@@ -116,7 +170,6 @@ openssl_free_key($pkeyid);
116
170
</refsect1>
117
171

118
172
</refentry>
119
-

120
173
<!-- Keep this comment at the end of the file
121
174
Local variables:
122
175
mode: sgml
123
176