reference/openssl/functions/openssl-spki-new.xml
497c40ac164d5873fd87f622dfdeb5206392b446
...
...
@@ -1,6 +1,5 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-

4
3
<refentry xml:id="function.openssl-spki-new" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
4
<refnamediv>
6
5
<refname>openssl_spki_new</refname>
...
...
@@ -9,11 +8,11 @@
9
8

10
9
<refsect1 role="description">
11
10
&reftitle.description;
12
-
<methodsynopsis role="procedural">
13
-
<type>string</type><methodname>openssl_spki_new</methodname>
14
-
<methodparam><type>resource</type><parameter role="reference">privkey</parameter></methodparam>
15
-
<methodparam><type>string</type><parameter role="reference">challenge</parameter></methodparam>
16
-
<methodparam choice="opt"><type>int</type><parameter>algorithm</parameter><initializer>0</initializer></methodparam>
11
+
<methodsynopsis>
12
+
<type class="union"><type>string</type><type>false</type></type><methodname>openssl_spki_new</methodname>
13
+
<methodparam><type>OpenSSLAsymmetricKey</type><parameter>private_key</parameter></methodparam>
14
+
<methodparam><type>string</type><parameter>challenge</parameter></methodparam>
15
+
<methodparam choice="opt"><type>int</type><parameter>digest_algo</parameter><initializer><constant>OPENSSL_ALGO_MD5</constant></initializer></methodparam>
17
16
</methodsynopsis>
18
17
<para>
19
18
Generates a signed public key and challenge using specified hashing algorithm
...
...
@@ -24,14 +23,14 @@
24
23
&reftitle.parameters;
25
24
<variablelist>
26
25
<varlistentry>
27
-
<term><parameter>privkey</parameter></term>
26
+
<term><parameter>private_key</parameter></term>
28
27
<listitem>
29
28
<para>
30
-
<parameter>privkey</parameter> should be set to a private key that was
29
+
<parameter>private_key</parameter> should be set to a private key that was
31
30
previously generated by <function>openssl_pkey_new</function> (or
32
31
otherwise obtained from the other openssl_pkey family of functions).
33
32
The corresponding public portion of the key will be used to sign the
34
-
CSR.
33
+
<acronym>CSR</acronym>.
35
34
</para>
36
35
</listitem>
37
36
</varlistentry>
...
...
@@ -44,7 +43,7 @@
44
43
</listitem>
45
44
</varlistentry>
46
45
<varlistentry>
47
-
<term><parameter>algorithm</parameter></term>
46
+
<term><parameter>digest_algo</parameter></term>
48
47
<listitem>
49
48
<para>
50
49
The digest algorithm. See openssl_get_md_method().
...
...
@@ -57,7 +56,7 @@
57
56
<refsect1 role="returnvalues">
58
57
&reftitle.returnvalues;
59
58
<para>
60
-
Returns a signed public key and challenge string or NULL on failure.
59
+
Returns a signed public key and challenge string or &false; on failure.
61
60
</para>
62
61
</refsect1>
63
62

...
...
@@ -65,10 +64,33 @@
65
64
&reftitle.errors;
66
65
<para>
67
66
Emits an <constant>E_WARNING</constant> level error if an unknown signature algorithm
68
-
is passed via the <parameter>algorithm</parameter> parameter.
67
+
is passed via the <parameter>digest_algo</parameter> parameter.
69
68
</para>
70
69
</refsect1>
71
70

71
+
<refsect1 role="changelog">
72
+
&reftitle.changelog;
73
+
<informaltable>
74
+
<tgroup cols="2">
75
+
<thead>
76
+
<row>
77
+
<entry>&Version;</entry>
78
+
<entry>&Description;</entry>
79
+
</row>
80
+
</thead>
81
+
<tbody>
82
+
<row>
83
+
<entry>8.0.0</entry>
84
+
<entry>
85
+
<parameter>private_key</parameter> accepts an <classname>OpenSSLAsymmetricKey</classname> instance now;
86
+
previously, a &resource; of type <literal>OpenSSL key</literal> was accepted.
87
+
</entry>
88
+
</row>
89
+
</tbody>
90
+
</tgroup>
91
+
</informaltable>
92
+
</refsect1>
93
+

72
94
<refsect1 role="examples">
73
95
&reftitle.examples;
74
96
<example xml:id="openssl_spki_new.example.basic">
...
...
@@ -115,9 +137,10 @@ MML5G2iNVgNozAo=
115
137
&reftitle.seealso;
116
138
<para>
117
139
<simplelist>
118
-
<member><function>openssl_spki_new</function></member>
140
+
<member><function>openssl_spki_verify</function></member>
119
141
<member><function>openssl_spki_export_challenge</function></member>
120
142
<member><function>openssl_spki_export</function></member>
143
+
<member><function>openssl_get_md_methods</function></member>
121
144
<member><function>openssl_csr_new</function></member>
122
145
<member><function>openssl_csr_sign</function></member>
123
146
</simplelist>
...
...
@@ -125,7 +148,6 @@ MML5G2iNVgNozAo=
125
148
</refsect1>
126
149

127
150
</refentry>
128
-

129
151
<!-- Keep this comment at the end of the file
130
152
Local variables:
131
153
mode: sgml
132
154