reference/openssl/functions/openssl-pkey-get-public.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-pkey-get-public">
3
+
<refentry xml:id="function.openssl-pkey-get-public" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>openssl_pkey_get_public</refname>
6
6
<refpurpose>Extract public key from certificate and prepare it for use</refpurpose>
...
...
@@ -9,12 +9,12 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>resource</type><methodname>openssl_pkey_get_public</methodname>
13
-
<methodparam><type>mixed</type><parameter>certificate</parameter></methodparam>
12
+
<type class="union"><type>OpenSSLAsymmetricKey</type><type>false</type></type><methodname>openssl_pkey_get_public</methodname>
13
+
<methodparam><type class="union"><type>OpenSSLAsymmetricKey</type><type>OpenSSLCertificate</type><type>array</type><type>string</type></type><parameter>public_key</parameter></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
-
<function>openssl_get_publickey</function> extracts the public key from
17
-
<parameter>certificate</parameter> and prepares it for use by other
16
+
<function>openssl_pkey_get_public</function> extracts the public key from
17
+
<parameter>public_key</parameter> and prepares it for use by other
18
18
functions.
19
19
</para>
20
20
</refsect1>
...
...
@@ -24,18 +24,18 @@
24
24
<para>
25
25
<variablelist>
26
26
<varlistentry>
27
-
<term><parameter>certificate</parameter></term>
27
+
<term><parameter>public_key</parameter></term>
28
28
<listitem>
29
29
<para>
30
-
<parameter>certificate</parameter> can be one of the following:
30
+
<parameter>public_key</parameter> can be one of the following:
31
31
<orderedlist>
32
-
<listitem><simpara>an X.509 certificate resource</simpara></listitem>
32
+
<listitem><simpara>an <classname>OpenSSLAsymmetricKey</classname> instance</simpara></listitem>
33
33
<listitem><simpara>a string having the format
34
34
<filename>file://path/to/file.pem</filename>. The named file must
35
-
contain a PEM encoded certificate/public key (it may contain both).
35
+
contain a <acronym>PEM</acronym> encoded certificate/public key (it may contain both).
36
36
</simpara>
37
37
</listitem>
38
-
<listitem><simpara>A PEM formatted public key.</simpara></listitem>
38
+
<listitem><simpara>A <acronym>PEM</acronym> formatted public key.</simpara></listitem>
39
39
</orderedlist>
40
40
</para>
41
41
</listitem>
...
...
@@ -47,12 +47,42 @@
47
47
<refsect1 role="returnvalues">
48
48
&reftitle.returnvalues;
49
49
<para>
50
-
Returns a positive key resource identifier on success, or &false; on error.
50
+
Returns an <classname>OpenSSLAsymmetricKey</classname> instance on success, or &false; on error.
51
51
</para>
52
52
</refsect1>
53
53

54
+
<refsect1 role="changelog">
55
+
&reftitle.changelog;
56
+
<informaltable>
57
+
<tgroup cols="2">
58
+
<thead>
59
+
<row>
60
+
<entry>&Version;</entry>
61
+
<entry>&Description;</entry>
62
+
</row>
63
+
</thead>
64
+
<tbody>
65
+
<row>
66
+
<entry>8.0.0</entry>
67
+
<entry>
68
+
On success, this function returns an <classname>OpenSSLAsymmetricKey</classname> instance now;
69
+
previously, a &resource; of type <literal>OpenSSL key</literal> was returned.
70
+
</entry>
71
+
</row>
72
+
<row>
73
+
<entry>8.0.0</entry>
74
+
<entry>
75
+
<parameter>public_key</parameter> accepts an <classname>OpenSSLAsymmetricKey</classname>
76
+
or <classname>OpenSSLCertificate</classname> instance now;
77
+
previously, a &resource; of type <literal>OpenSSL key</literal> or <literal>OpenSSL X.509</literal>
78
+
was accepted.
79
+
</entry>
80
+
</row>
81
+
</tbody>
82
+
</tgroup>
83
+
</informaltable>
84
+
</refsect1>
54
85
</refentry>
55
-

56
86
<!-- Keep this comment at the end of the file
57
87
Local variables:
58
88
mode: sgml
59
89