mirror of
https://github.com/php/doc-ru.git
synced 2025-08-15 23:42:35 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@343583 c90b9560-bf6c-de11-be94-00142212c4b1
113 lines
3.0 KiB
XML
113 lines
3.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- $Revision$ -->
|
||
<!-- EN-Revision: 4b87f18f059b7917d832cd5a6589ba5cdd9483bb Maintainer: rjhdby Status: ready -->
|
||
<!-- Reviewed: no -->
|
||
|
||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.openssl-pkcs12-read">
|
||
<refnamediv>
|
||
<refname>openssl_pkcs12_read</refname>
|
||
<refpurpose>Разбирает хранилище сертификатов PKCS#12 в массив</refpurpose>
|
||
</refnamediv>
|
||
|
||
<refsect1 role="description">
|
||
&reftitle.description;
|
||
<methodsynopsis>
|
||
<type>bool</type><methodname>openssl_pkcs12_read</methodname>
|
||
<methodparam><type>string</type><parameter>pkcs12</parameter></methodparam>
|
||
<methodparam><type>array</type><parameter role="reference">certs</parameter></methodparam>
|
||
<methodparam><type>string</type><parameter>pass</parameter></methodparam>
|
||
</methodsynopsis>
|
||
<para>
|
||
<function>openssl_pkcs12_read</function> разбирает хранилище сертификатов PKCS#12
|
||
заданное в <parameter>pkcs12</parameter> и помещает в массив
|
||
<parameter>certs</parameter>.
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="parameters">
|
||
&reftitle.parameters;
|
||
<para>
|
||
<variablelist>
|
||
<varlistentry>
|
||
<term><parameter>pkcs12</parameter></term>
|
||
<listitem>
|
||
<para>
|
||
Содержимое хранилища сертификатов (не имя файла!).
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry>
|
||
<term><parameter>certs</parameter></term>
|
||
<listitem>
|
||
<para>
|
||
В случае успеха будет содержать сертификаты.
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry>
|
||
<term><parameter>pass</parameter></term>
|
||
<listitem>
|
||
<para>
|
||
Пароль для расшифровки файла PKCS#12.
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
</variablelist>
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="returnvalues">
|
||
&reftitle.returnvalues;
|
||
<para>
|
||
&return.success;
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="examples">
|
||
&reftitle.examples;
|
||
<example>
|
||
<title>Пример использования <function>openssl_pkcs12_read</function></title>
|
||
<programlisting role="php">
|
||
<![CDATA[
|
||
<?php
|
||
if (!$cert_store = file_get_contents("/certs/file.p12")) {
|
||
echo "Error: Unable to read the cert file\n";
|
||
exit;
|
||
}
|
||
|
||
if (openssl_pkcs12_read($cert_store, $cert_info, "my_secret_pass")) {
|
||
echo "Certificate Information\n";
|
||
print_r($cert_info);
|
||
} else {
|
||
echo "Error: Unable to read the cert store.\n";
|
||
exit;
|
||
}
|
||
?>
|
||
]]>
|
||
</programlisting>
|
||
</example>
|
||
</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
|
||
-->
|