Files
php-doc-ru/reference/openssl/functions/openssl-x509-parse.xml
2024-05-23 18:03:22 +03:00

103 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: d1e3ea622e5d4f542cd36eca59a9f22aa0142633 Maintainer: rjhdby Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.openssl-x509-parse" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>openssl_x509_parse</refname>
<refpurpose>Разбирает сертификат X509 и получает массив с данными о нём</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>array</type><type>false</type></type><methodname>openssl_x509_parse</methodname>
<methodparam><type class="union"><type>OpenSSLCertificate</type><type>string</type></type><parameter>certificate</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>short_names</parameter><initializer>&true;</initializer></methodparam>
</methodsynopsis>
<para>
Функция <function>openssl_x509_parse</function> возвращает информацию сертификате
с идентификатором <parameter>certificate</parameter>, включая такие поля, как
имя субъекта, имя издателя, назначение, даты начала и окончания действия и т. д.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>certificate</parameter></term>
<listitem>
<para>
Сертификат X509. Список корректных значений даёт <link linkend="openssl.certparams">Параметры ключа или сертификата</link>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>short_names</parameter></term>
<listitem>
<para>
Параметр <parameter>short_names</parameter> определяет, как будут индексироваться
данные в итоговом массиве.
Если для параметра <parameter>short_names</parameter> задать значение &true; (по умолчанию),
поля будут индексироваться короткими именами, а не длинными.
Например, CN — это короткое имя для commonName.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<emphasis>Структура возвращаемого массива ещё не до конца устоялась, поэтому пока не документируется.</emphasis>
</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>
Параметр <parameter>certificate</parameter> теперь принимает экземпляр класса <classname>OpenSSLCertificate</classname>;
раньше принимался ресурс (&resource;) с типом <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
-->