Files
php-doc-ru/reference/openssl/functions/openssl-pkey-get-public.xml
2023-09-09 13:20:26 +03:00

106 lines
3.8 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 497c40ac164d5873fd87f622dfdeb5206392b446 Maintainer: rjhdby Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.openssl-pkey-get-public" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>openssl_pkey_get_public</refname>
<refpurpose>Извлекает открытый ключ из сертификата и подготавливает его к использованию</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>OpenSSLAsymmetricKey</type><type>false</type></type><methodname>openssl_pkey_get_public</methodname>
<methodparam><type class="union"><type>OpenSSLAsymmetricKey</type><type>OpenSSLCertificate</type><type>array</type><type>string</type></type><parameter>public_key</parameter></methodparam>
</methodsynopsis>
<para>
<function>openssl_pkey_get_public</function> извлекает открытый ключ из
<parameter>public_key</parameter> и подготавливает его к использованию в
других функциях.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>public_key</parameter></term>
<listitem>
<para>
<parameter>public_key</parameter> может быть одним из:
<orderedlist>
<listitem><simpara>экземпляр <classname>OpenSSLAsymmetricKey</classname></simpara></listitem>
<listitem><simpara>строка вида
<filename>file://path/to/file.pem</filename>. Файл должен
содержать кодированный в <acronym>PEM</acronym> сертификат/публичный ключ (может содержать и то и другое).
</simpara>
</listitem>
<listitem><simpara>Открытый ключ в формате <acronym>PEM</acronym>.</simpara></listitem>
</orderedlist>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Возвращает экземпляр <classname>OpenSSLAsymmetricKey</classname> или &false; в случае возникновения ошибки.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
В случае успешного выполнения функция возвращает экземпляр <classname>OpenSSLAsymmetricKey</classname>;
ранее возвращался ресурс (&resource;) типа <literal>OpenSSL key</literal>.
</entry>
</row>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>public_key</parameter> теперь принимает экземпляр <classname>OpenSSLAsymmetricKey</classname>
или <classname>OpenSSLCertificate</classname>;
ранее принимался ресурс (&resource;) типа <literal>OpenSSL key</literal> или <literal>OpenSSL X.509</literal>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->