1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
|
<?xml version="1.0" encoding="utf-8"?>
<refentry xml:id="function.rnp-op-verify" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>rnp_op_verify</refname>
<refpurpose>Verify embedded or cleartext signatures</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>array</type><type>false</type></type><methodname>rnp_op_verify</methodname>
<methodparam><type>RnpFFI</type><parameter>ffi</parameter></methodparam>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<para>
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>ffi</parameter></term>
<listitem>
<para>
&rnp.parameter.ffi-description;
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
Signed data.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
An associative array with information about verification results&return.falseforfailure;.
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Key</entry>
<entry>Data type</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>"verification_status"</literal></entry>
<entry>string</entry>
<entry>
Overall verification result, either "Success" string or appropriate error message.
"Success" result is set when at least one signature is valid and successfully verified.
Individual verification results for each signature can be checked in the "signatures" array.
</entry>
</row>
<row>
<entry><literal>"file_name"</literal></entry>
<entry>string</entry>
<entry>File name.</entry>
</row>
<row>
<entry><literal>"file_mtime"</literal></entry>
<entry>integer</entry>
<entry>File modification time.</entry>
</row>
<row>
<entry><literal>"mode"</literal></entry>
<entry>string</entry>
<entry>Data protection (encryption) mode used in processed message.
Currently defined values are "none", "cfb", "cfb-mdc", "aead-ocb", "aead-eax".
</entry>
</row>
<row>
<entry><literal>"cipher"</literal></entry>
<entry>string</entry>
<entry>Symmetric cipher used for data encryption.</entry>
</row>
<row>
<entry><literal>"valid_integrity"</literal></entry>
<entry>boolean</entry>
<entry>&true; if message integrity protection was used (i.e. MDC or AEAD) and it was
validated successfully.
</entry>
</row>
<row>
<entry><literal>"signatures"</literal></entry>
<entry>array</entry>
<entry>
An associative array describing each signature found. See description below.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
"signatures" sub-array.
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Key</entry>
<entry>Data type</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>"verification_status"</entry>
<entry>string</entry>
<entry>Signature verification status, either "Success" string or appropriate error message.</entry>
</row>
<row>
<entry>"creation_time"</entry>
<entry>integer</entry>
<entry>Signature creation time in seconds since Jan, 1 1970 UTC.</entry>
</row>
<row>
<entry>"expiration_time"</entry>
<entry>integer</entry>
<entry>Signature expiration time in seconds since the creation time or 0 if signature never expires.</entry>
</row>
<row>
<entry>"hash"</entry>
<entry>string</entry>
<entry>Hash function algorithm used to calculate the signature.</entry>
</row>
<row>
<entry>"signing_key"</entry>
<entry>string</entry>
<entry>Fingerprint of the key used for signing. Could be "Not found" if corresponding public key is not loaded to the FFI object.</entry>
</row>
<row>
<entry>"signature_type"</entry>
<entry>string</entry>
<entry>
Signature type. Currently defined values are: 'binary', 'text', 'standalone', 'certification (generic)', 'certification (persona)',
'certification (casual)', 'certification (positive)', 'subkey binding', 'primary key binding', 'direct', 'key revocation',
'subkey revocation', 'certification revocation', 'timestamp', 'uknown: 0..255'.
</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
-->
|