Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 1 | |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 2 | <!DOCTYPE html> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 3 | |
| 4 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 5 | <head> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 6 | <meta charset="utf-8" /> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 7 | <title>8.1. PSA status codes — PSA Crypto API 1.0.1 documentation</title> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 8 | <link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" /> |
| 9 | <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 10 | <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 11 | <script type="text/javascript" src="../../_static/jquery.js"></script> |
| 12 | <script type="text/javascript" src="../../_static/underscore.js"></script> |
| 13 | <script type="text/javascript" src="../../_static/doctools.js"></script> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 14 | <script type="text/javascript" src="../../_static/language_data.js"></script> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 15 | <link rel="author" title="About these documents" href="../../about.html" /> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 16 | <link rel="index" title="Index" href="../../genindex.html" /> |
| 17 | <link rel="search" title="Search" href="../../search.html" /> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 18 | <link rel="next" title="8.2. PSA Crypto library" href="library.html" /> |
| 19 | <link rel="prev" title="8. Library management reference" href="index.html" /> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 20 | |
| 21 | <link rel="stylesheet" href="../../_static/custom.css" type="text/css" /> |
| 22 | |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 23 | |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 24 | <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" /> |
| 25 | |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 26 | </head><body> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 27 | |
| 28 | |
| 29 | <div class="document"> |
| 30 | <div class="documentwrapper"> |
| 31 | <div class="bodywrapper"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 32 | |
| 33 | |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 34 | <div class="body" role="main"> |
| 35 | |
| 36 | <div class="section" id="psa-status-codes"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 37 | <span id="status-codes"></span><h1>8.1. PSA status codes</h1> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 38 | <div class="section" id="status-type"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 39 | <h2>8.1.1. Status type</h2> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 40 | <div class="section" id="psa_status_t"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 41 | <span id="c.psa_status_t"></span><h3><code class="docutils literal notranslate"><span class="pre">psa_status_t</span></code> (type)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 42 | <p>Function return status.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 43 | <pre class="literal-block">typedef int32_t <a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>;</pre> |
| 44 | <p>This is either <a class="reference internal" href="#c.PSA_SUCCESS" title="PSA_SUCCESS"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_SUCCESS</span></code></a>, which is zero, indicating success; or a small negative value indicating that an error occurred. Errors are encoded as one of the <code class="docutils literal notranslate"><span class="pre">PSA_ERROR_xxx</span></code> values defined here.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 45 | </div> |
| 46 | </div> |
| 47 | <div class="section" id="success-codes"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 48 | <h2>8.1.2. Success codes</h2> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 49 | <div class="section" id="PSA_SUCCESS"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 50 | <span id="c.PSA_SUCCESS"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_SUCCESS</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 51 | <p>The action was completed successfully.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 52 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_SUCCESS" title="PSA_SUCCESS">PSA_SUCCESS</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)0)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 53 | </div> |
| 54 | </div> |
| 55 | <div class="section" id="error-codes"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 56 | <h2>8.1.3. Error codes</h2> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 57 | <div class="section" id="PSA_ERROR_GENERIC_ERROR"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 58 | <span id="c.PSA_ERROR_GENERIC_ERROR"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_GENERIC_ERROR</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 59 | <p>An error occurred that does not correspond to any defined failure cause.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 60 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_GENERIC_ERROR" title="PSA_ERROR_GENERIC_ERROR">PSA_ERROR_GENERIC_ERROR</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-132)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 61 | <p>Implementations can use this error code if none of the other standard error codes are applicable.</p> |
| 62 | </div> |
| 63 | <div class="section" id="PSA_ERROR_NOT_SUPPORTED"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 64 | <span id="c.PSA_ERROR_NOT_SUPPORTED"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_NOT_SUPPORTED</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 65 | <p>The requested operation or a parameter is not supported by this implementation.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 66 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_NOT_SUPPORTED" title="PSA_ERROR_NOT_SUPPORTED">PSA_ERROR_NOT_SUPPORTED</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-134)</pre> |
| 67 | <p>It is recommended that implementations return this error code when an enumeration parameter such as a key type, algorithm, etc. is not recognized. If a combination of parameters is recognized and identified as not valid, return <a class="reference internal" href="#c.PSA_ERROR_INVALID_ARGUMENT" title="PSA_ERROR_INVALID_ARGUMENT"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_INVALID_ARGUMENT</span></code></a> instead.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 68 | </div> |
| 69 | <div class="section" id="PSA_ERROR_NOT_PERMITTED"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 70 | <span id="c.PSA_ERROR_NOT_PERMITTED"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_NOT_PERMITTED</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 71 | <p>The requested action is denied by a policy.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 72 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_NOT_PERMITTED" title="PSA_ERROR_NOT_PERMITTED">PSA_ERROR_NOT_PERMITTED</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-133)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 73 | <p>It is recommended that implementations return this error code when the parameters are recognized as valid and supported, and a policy explicitly denies the requested operation.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 74 | <p>If a subset of the parameters of a function call identify a forbidden operation, and another subset of the parameters are not valid or not supported, it is unspecified whether the function returns <a class="reference internal" href="#c.PSA_ERROR_NOT_PERMITTED" title="PSA_ERROR_NOT_PERMITTED"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_NOT_PERMITTED</span></code></a>, <a class="reference internal" href="#c.PSA_ERROR_NOT_SUPPORTED" title="PSA_ERROR_NOT_SUPPORTED"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_NOT_SUPPORTED</span></code></a> or <a class="reference internal" href="#c.PSA_ERROR_INVALID_ARGUMENT" title="PSA_ERROR_INVALID_ARGUMENT"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_INVALID_ARGUMENT</span></code></a>.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 75 | </div> |
| 76 | <div class="section" id="PSA_ERROR_BUFFER_TOO_SMALL"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 77 | <span id="c.PSA_ERROR_BUFFER_TOO_SMALL"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_BUFFER_TOO_SMALL</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 78 | <p>An output buffer is too small.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 79 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_BUFFER_TOO_SMALL" title="PSA_ERROR_BUFFER_TOO_SMALL">PSA_ERROR_BUFFER_TOO_SMALL</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-138)</pre> |
| 80 | <p>Applications can call the <code class="docutils literal notranslate"><span class="pre">PSA_xxx_SIZE</span></code> macro listed in the function description to determine a sufficient buffer size.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 81 | <p>It is recommended that implementations only return this error code in cases when performing the operation with a larger output buffer would succeed. However, implementations can also return this error if a function has invalid or unsupported parameters in addition to an insufficient output buffer size.</p> |
| 82 | </div> |
| 83 | <div class="section" id="PSA_ERROR_ALREADY_EXISTS"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 84 | <span id="c.PSA_ERROR_ALREADY_EXISTS"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_ALREADY_EXISTS</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 85 | <p>Asking for an item that already exists.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 86 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_ALREADY_EXISTS" title="PSA_ERROR_ALREADY_EXISTS">PSA_ERROR_ALREADY_EXISTS</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-139)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 87 | <p>It is recommended that implementations return this error code when attempting to write to a location where a key is already present.</p> |
| 88 | </div> |
| 89 | <div class="section" id="PSA_ERROR_DOES_NOT_EXIST"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 90 | <span id="c.PSA_ERROR_DOES_NOT_EXIST"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_DOES_NOT_EXIST</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 91 | <p>Asking for an item that doesn’t exist.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 92 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_DOES_NOT_EXIST" title="PSA_ERROR_DOES_NOT_EXIST">PSA_ERROR_DOES_NOT_EXIST</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-140)</pre> |
| 93 | <p>Implementations must not return this error code to indicate that a key identifier is invalid, but must return <a class="reference internal" href="#c.PSA_ERROR_INVALID_HANDLE" title="PSA_ERROR_INVALID_HANDLE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_INVALID_HANDLE</span></code></a> instead.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 94 | </div> |
| 95 | <div class="section" id="PSA_ERROR_BAD_STATE"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 96 | <span id="c.PSA_ERROR_BAD_STATE"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_BAD_STATE</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 97 | <p>The requested action cannot be performed in the current state.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 98 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_BAD_STATE" title="PSA_ERROR_BAD_STATE">PSA_ERROR_BAD_STATE</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-137)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 99 | <p>Multi-part operations return this error when one of the functions is called out of sequence. Refer to the function descriptions for permitted sequencing of functions.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 100 | <p>Implementations must not return this error code to indicate that a key identifier is invalid, but must return <a class="reference internal" href="#c.PSA_ERROR_INVALID_HANDLE" title="PSA_ERROR_INVALID_HANDLE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_INVALID_HANDLE</span></code></a> instead.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 101 | </div> |
| 102 | <div class="section" id="PSA_ERROR_INVALID_ARGUMENT"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 103 | <span id="c.PSA_ERROR_INVALID_ARGUMENT"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_INVALID_ARGUMENT</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 104 | <p>The parameters passed to the function are invalid.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 105 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_INVALID_ARGUMENT" title="PSA_ERROR_INVALID_ARGUMENT">PSA_ERROR_INVALID_ARGUMENT</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-135)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 106 | <p>Implementations can return this error any time a parameter or combination of parameters are recognized as invalid.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 107 | <p>Implementations must not return this error code to indicate that a key identifier is invalid, but must return <a class="reference internal" href="#c.PSA_ERROR_INVALID_HANDLE" title="PSA_ERROR_INVALID_HANDLE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_INVALID_HANDLE</span></code></a> instead.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 108 | </div> |
| 109 | <div class="section" id="PSA_ERROR_INSUFFICIENT_MEMORY"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 110 | <span id="c.PSA_ERROR_INSUFFICIENT_MEMORY"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_INSUFFICIENT_MEMORY</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 111 | <p>There is not enough runtime memory.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 112 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_INSUFFICIENT_MEMORY" title="PSA_ERROR_INSUFFICIENT_MEMORY">PSA_ERROR_INSUFFICIENT_MEMORY</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-141)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 113 | <p>If the action is carried out across multiple security realms, this error can refer to available memory in any of the security realms.</p> |
| 114 | </div> |
| 115 | <div class="section" id="PSA_ERROR_INSUFFICIENT_STORAGE"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 116 | <span id="c.PSA_ERROR_INSUFFICIENT_STORAGE"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_INSUFFICIENT_STORAGE</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 117 | <p>There is not enough persistent storage.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 118 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_INSUFFICIENT_STORAGE" title="PSA_ERROR_INSUFFICIENT_STORAGE">PSA_ERROR_INSUFFICIENT_STORAGE</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-142)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 119 | <p>Functions that modify the key storage return this error code if there is insufficient storage space on the host media. In addition, many functions that do not otherwise access storage might return this error code if the implementation requires a mandatory log entry for the requested action and the log storage space is full.</p> |
| 120 | </div> |
| 121 | <div class="section" id="PSA_ERROR_COMMUNICATION_FAILURE"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 122 | <span id="c.PSA_ERROR_COMMUNICATION_FAILURE"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_COMMUNICATION_FAILURE</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 123 | <p>There was a communication failure inside the implementation.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 124 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_COMMUNICATION_FAILURE" title="PSA_ERROR_COMMUNICATION_FAILURE">PSA_ERROR_COMMUNICATION_FAILURE</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-145)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 125 | <p>This can indicate a communication failure between the application and an external cryptoprocessor or between the cryptoprocessor and an external volatile or persistent memory. A communication failure can be transient or permanent depending on the cause.</p> |
| 126 | <div class="admonition warning"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 127 | <p class="admonition-title">Warning</p> |
| 128 | <p>If a function returns this error, it is undetermined whether the requested action has completed. Returning <a class="reference internal" href="#c.PSA_SUCCESS" title="PSA_SUCCESS"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_SUCCESS</span></code></a> is recommended on successful completion whenever possible, however functions can return <a class="reference internal" href="#c.PSA_ERROR_COMMUNICATION_FAILURE" title="PSA_ERROR_COMMUNICATION_FAILURE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_COMMUNICATION_FAILURE</span></code></a> if the requested action was completed successfully in an external cryptoprocessor but there was a breakdown of communication before the cryptoprocessor could report the status to the application.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 129 | </div> |
| 130 | </div> |
| 131 | <div class="section" id="PSA_ERROR_STORAGE_FAILURE"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 132 | <span id="c.PSA_ERROR_STORAGE_FAILURE"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_STORAGE_FAILURE</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 133 | <p>There was a storage failure that might have led to data loss.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 134 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_STORAGE_FAILURE" title="PSA_ERROR_STORAGE_FAILURE">PSA_ERROR_STORAGE_FAILURE</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-146)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 135 | <p>This error indicates that some persistent storage could not be read or written by the implementation. It does not indicate the following situations, which have specific error codes:</p> |
| 136 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 137 | <li><p>A corruption of volatile memory - use <a class="reference internal" href="#c.PSA_ERROR_CORRUPTION_DETECTED" title="PSA_ERROR_CORRUPTION_DETECTED"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_CORRUPTION_DETECTED</span></code></a>.</p></li> |
| 138 | <li><p>A communication error between the cryptoprocessor and its external storage - use <a class="reference internal" href="#c.PSA_ERROR_COMMUNICATION_FAILURE" title="PSA_ERROR_COMMUNICATION_FAILURE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_COMMUNICATION_FAILURE</span></code></a>.</p></li> |
| 139 | <li><p>When the storage is in a valid state but is full - use <a class="reference internal" href="#c.PSA_ERROR_INSUFFICIENT_STORAGE" title="PSA_ERROR_INSUFFICIENT_STORAGE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_INSUFFICIENT_STORAGE</span></code></a>.</p></li> |
| 140 | <li><p>When the storage or stored data is corrupted - use <a class="reference internal" href="#c.PSA_ERROR_DATA_CORRUPT" title="PSA_ERROR_DATA_CORRUPT"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_DATA_CORRUPT</span></code></a>.</p></li> |
| 141 | <li><p>When the stored data is not valid - use <a class="reference internal" href="#c.PSA_ERROR_DATA_INVALID" title="PSA_ERROR_DATA_INVALID"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_DATA_INVALID</span></code></a>.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 142 | </ul> |
| 143 | <p>A storage failure does not indicate that any data that was previously read is invalid. However this previously read data might no longer be readable from storage.</p> |
| 144 | <p>When a storage failure occurs, it is no longer possible to ensure the global integrity of the keystore. Depending on the global integrity guarantees offered by the implementation, access to other data might fail even if the data is still readable but its integrity cannot be guaranteed.</p> |
| 145 | <p>It is recommended to only use this error code to report a permanent storage corruption. However application writers must keep in mind that transient errors while reading the storage might be reported using this error code.</p> |
| 146 | </div> |
| 147 | <div class="section" id="PSA_ERROR_DATA_CORRUPT"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 148 | <span id="c.PSA_ERROR_DATA_CORRUPT"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_DATA_CORRUPT</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 149 | <p>Stored data has been corrupted.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 150 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_DATA_CORRUPT" title="PSA_ERROR_DATA_CORRUPT">PSA_ERROR_DATA_CORRUPT</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-152)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 151 | <p>This error indicates that some persistent storage has suffered corruption. It does not indicate the following situations, which have specific error codes:</p> |
| 152 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 153 | <li><p>A corruption of volatile memory - use <a class="reference internal" href="#c.PSA_ERROR_CORRUPTION_DETECTED" title="PSA_ERROR_CORRUPTION_DETECTED"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_CORRUPTION_DETECTED</span></code></a>.</p></li> |
| 154 | <li><p>A communication error between the cryptoprocessor and its external storage - use <a class="reference internal" href="#c.PSA_ERROR_COMMUNICATION_FAILURE" title="PSA_ERROR_COMMUNICATION_FAILURE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_COMMUNICATION_FAILURE</span></code></a>.</p></li> |
| 155 | <li><p>When the storage is in a valid state but is full - use <a class="reference internal" href="#c.PSA_ERROR_INSUFFICIENT_STORAGE" title="PSA_ERROR_INSUFFICIENT_STORAGE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_INSUFFICIENT_STORAGE</span></code></a>.</p></li> |
| 156 | <li><p>When the storage fails for other reasons - use <a class="reference internal" href="#c.PSA_ERROR_STORAGE_FAILURE" title="PSA_ERROR_STORAGE_FAILURE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_STORAGE_FAILURE</span></code></a>.</p></li> |
| 157 | <li><p>When the stored data is not valid - use <a class="reference internal" href="#c.PSA_ERROR_DATA_INVALID" title="PSA_ERROR_DATA_INVALID"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_DATA_INVALID</span></code></a>.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 158 | </ul> |
| 159 | <p>Note that a storage corruption does not indicate that any data that was previously read is invalid. However this previously read data might no longer be readable from storage.</p> |
| 160 | <p>When a storage failure occurs, it is no longer possible to ensure the global integrity of the keystore. Depending on the global integrity guarantees offered by the implementation, access to other data might fail even if the data is still readable but its integrity cannot be guaranteed.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 161 | <p>It is recommended to only use this error code to report when a storage component indicates that the stored data is corrupt, or fails an integrity check. For example, in situations that the <span><em>PSA Storage API</em> <a class="reference internal" href="../../about.html#citation-psa-its"><span class="cite">[PSA-ITS]</span></a></span> reports <a class="reference internal" href="#c.PSA_ERROR_DATA_CORRUPT" title="PSA_ERROR_DATA_CORRUPT"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_DATA_CORRUPT</span></code></a> or <a class="reference internal" href="#c.PSA_ERROR_INVALID_SIGNATURE" title="PSA_ERROR_INVALID_SIGNATURE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_INVALID_SIGNATURE</span></code></a>.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 162 | </div> |
| 163 | <div class="section" id="PSA_ERROR_DATA_INVALID"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 164 | <span id="c.PSA_ERROR_DATA_INVALID"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_DATA_INVALID</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 165 | <p>Data read from storage is not valid for the implementation.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 166 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_DATA_INVALID" title="PSA_ERROR_DATA_INVALID">PSA_ERROR_DATA_INVALID</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-153)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 167 | <p>This error indicates that some data read from storage does not have a valid format. It does not indicate the following situations, which have specific error codes:</p> |
| 168 | <ul class="simple"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 169 | <li><p>When the storage or stored data is corrupted - use <a class="reference internal" href="#c.PSA_ERROR_DATA_CORRUPT" title="PSA_ERROR_DATA_CORRUPT"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_DATA_CORRUPT</span></code></a>.</p></li> |
| 170 | <li><p>When the storage fails for other reasons - use <a class="reference internal" href="#c.PSA_ERROR_STORAGE_FAILURE" title="PSA_ERROR_STORAGE_FAILURE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_STORAGE_FAILURE</span></code></a>.</p></li> |
| 171 | <li><p>An invalid argument to the API - use <a class="reference internal" href="#c.PSA_ERROR_INVALID_ARGUMENT" title="PSA_ERROR_INVALID_ARGUMENT"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_INVALID_ARGUMENT</span></code></a>.</p></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 172 | </ul> |
| 173 | <p>This error is typically a result of an integration failure, where the implementation reading the data is not compatible with the implementation that stored the data.</p> |
| 174 | <p>It is recommended to only use this error code to report when data that is successfully read from storage is invalid.</p> |
| 175 | </div> |
| 176 | <div class="section" id="PSA_ERROR_HARDWARE_FAILURE"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 177 | <span id="c.PSA_ERROR_HARDWARE_FAILURE"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_HARDWARE_FAILURE</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 178 | <p>A hardware failure was detected.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 179 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_HARDWARE_FAILURE" title="PSA_ERROR_HARDWARE_FAILURE">PSA_ERROR_HARDWARE_FAILURE</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-147)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 180 | <p>A hardware failure can be transient or permanent depending on the cause.</p> |
| 181 | </div> |
| 182 | <div class="section" id="PSA_ERROR_CORRUPTION_DETECTED"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 183 | <span id="c.PSA_ERROR_CORRUPTION_DETECTED"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_CORRUPTION_DETECTED</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 184 | <p>A tampering attempt was detected.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 185 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_CORRUPTION_DETECTED" title="PSA_ERROR_CORRUPTION_DETECTED">PSA_ERROR_CORRUPTION_DETECTED</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-151)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 186 | <p>If an application receives this error code, there is no guarantee that previously accessed or computed data was correct and remains confidential. In this situation, it is recommended that applications perform no further security functions and enter a safe failure state.</p> |
| 187 | <p>Implementations can return this error code if they detect an invalid state that cannot happen during normal operation and that indicates that the implementation’s security guarantees no longer hold. Depending on the implementation architecture and on its security and safety goals, the implementation might forcibly terminate the application.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 188 | <p>This error code is intended as a last resort when a security breach is detected and it is unsure whether the keystore data is still protected. Implementations must only return this error code to report an alarm from a tampering detector, to indicate that the confidentiality of stored data can no longer be guaranteed, or to indicate that the integrity of previously returned data is now considered compromised. Implementations must not use this error code to indicate a hardware failure that merely makes it impossible to perform the requested operation, instead use <a class="reference internal" href="#c.PSA_ERROR_COMMUNICATION_FAILURE" title="PSA_ERROR_COMMUNICATION_FAILURE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_COMMUNICATION_FAILURE</span></code></a>, <a class="reference internal" href="#c.PSA_ERROR_STORAGE_FAILURE" title="PSA_ERROR_STORAGE_FAILURE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_STORAGE_FAILURE</span></code></a>, <a class="reference internal" href="#c.PSA_ERROR_HARDWARE_FAILURE" title="PSA_ERROR_HARDWARE_FAILURE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_HARDWARE_FAILURE</span></code></a>, <a class="reference internal" href="#c.PSA_ERROR_INSUFFICIENT_ENTROPY" title="PSA_ERROR_INSUFFICIENT_ENTROPY"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_INSUFFICIENT_ENTROPY</span></code></a> or other applicable error code.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 189 | <p>This error indicates an attack against the application. Implementations must not return this error code as a consequence of the behavior of the application itself.</p> |
| 190 | </div> |
| 191 | <div class="section" id="PSA_ERROR_INSUFFICIENT_ENTROPY"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 192 | <span id="c.PSA_ERROR_INSUFFICIENT_ENTROPY"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_INSUFFICIENT_ENTROPY</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 193 | <p>There is not enough entropy to generate random data needed for the requested action.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 194 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_INSUFFICIENT_ENTROPY" title="PSA_ERROR_INSUFFICIENT_ENTROPY">PSA_ERROR_INSUFFICIENT_ENTROPY</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-148)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 195 | <p>This error indicates a failure of a hardware random generator. Application writers must note that this error can be returned not only by functions whose purpose is to generate random data, such as key, IV or nonce generation, but also by functions that execute an algorithm with a randomized result, as well as functions that use randomization of intermediate computations as a countermeasure to certain attacks.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 196 | <p>It is recommended that implementations do not return this error after <a class="reference internal" href="library.html#c.psa_crypto_init" title="psa_crypto_init"><code class="xref any c c-func docutils literal notranslate"><span class="pre">psa_crypto_init()</span></code></a> has succeeded. This can be achieved if the implementation generates sufficient entropy during initialization and subsequently a cryptographically secure pseudorandom generator (PRNG) is used. However, implementations might return this error at any time, for example, if a policy requires the PRNG to be reseeded during normal operation.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 197 | </div> |
| 198 | <div class="section" id="PSA_ERROR_INVALID_SIGNATURE"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 199 | <span id="c.PSA_ERROR_INVALID_SIGNATURE"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_INVALID_SIGNATURE</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 200 | <p>The signature, MAC or hash is incorrect.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 201 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_INVALID_SIGNATURE" title="PSA_ERROR_INVALID_SIGNATURE">PSA_ERROR_INVALID_SIGNATURE</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-149)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 202 | <p>Verification functions return this error if the verification calculations completed successfully, and the value to be verified was determined to be incorrect.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 203 | <p>If the value to verify has an invalid size, implementations can return either <a class="reference internal" href="#c.PSA_ERROR_INVALID_ARGUMENT" title="PSA_ERROR_INVALID_ARGUMENT"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_INVALID_ARGUMENT</span></code></a> or <a class="reference internal" href="#c.PSA_ERROR_INVALID_SIGNATURE" title="PSA_ERROR_INVALID_SIGNATURE"><code class="xref any c c-macro docutils literal notranslate"><span class="pre">PSA_ERROR_INVALID_SIGNATURE</span></code></a>.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 204 | </div> |
| 205 | <div class="section" id="PSA_ERROR_INVALID_PADDING"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 206 | <span id="c.PSA_ERROR_INVALID_PADDING"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_INVALID_PADDING</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 207 | <p>The decrypted padding is incorrect.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 208 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_INVALID_PADDING" title="PSA_ERROR_INVALID_PADDING">PSA_ERROR_INVALID_PADDING</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-150)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 209 | <div class="admonition warning"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 210 | <p class="admonition-title">Warning</p> |
| 211 | <p>In some protocols, when decrypting data, it is essential that the behavior of the application does not depend on whether the padding is correct, down to precise timing. Protocols that use authenticated encryption are recommended for use by applications, rather than plain encryption. If the application must perform a decryption of unauthenticated data, the application writer must take care not to reveal whether the padding is invalid.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 212 | </div> |
| 213 | <p>Implementations must handle padding carefully, aiming to make it impossible for an external observer to distinguish between valid and invalid padding. In particular, it is recommended that the timing of a decryption operation does not depend on the validity of the padding.</p> |
| 214 | </div> |
| 215 | <div class="section" id="PSA_ERROR_INSUFFICIENT_DATA"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 216 | <span id="c.PSA_ERROR_INSUFFICIENT_DATA"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_INSUFFICIENT_DATA</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 217 | <p>Return this error when there’s insufficient data when attempting to read from a resource.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 218 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_INSUFFICIENT_DATA" title="PSA_ERROR_INSUFFICIENT_DATA">PSA_ERROR_INSUFFICIENT_DATA</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-143)</pre> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 219 | </div> |
| 220 | <div class="section" id="PSA_ERROR_INVALID_HANDLE"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 221 | <span id="c.PSA_ERROR_INVALID_HANDLE"></span><h3><code class="docutils literal notranslate"><span class="pre">PSA_ERROR_INVALID_HANDLE</span></code> (macro)</h3> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 222 | <p>The key identifier is not valid.</p> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 223 | <pre class="literal-block">#define <a class="reference internal" href="#c.PSA_ERROR_INVALID_HANDLE" title="PSA_ERROR_INVALID_HANDLE">PSA_ERROR_INVALID_HANDLE</a> ((<a class="reference internal" href="#c.psa_status_t" title="psa_status_t">psa_status_t</a>)-136)</pre> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 224 | <p>See also <a class="reference internal" href="../../overview/functionality.html#key-ids"><span class="secref">Key identifiers</span></a>.</p> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 225 | </div> |
| 226 | </div> |
| 227 | </div> |
| 228 | |
| 229 | |
| 230 | </div> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 231 | |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 232 | </div> |
| 233 | </div> |
| 234 | <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 235 | <div class="sphinxsidebarwrapper"><h3><a href="../../index.html"><b>PSA Crypto API</b></a></h3> |
| 236 | IHI 0086<br/> |
| 237 | Non-confidential<br/> |
| 238 | Version 1.0.1 |
| 239 | <span style="color: red; font-weight: bold;"></span> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 240 | <ul> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 241 | <li class="toctree-l1"><a class="reference internal" href="../../about.html">About this document</a></li> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 242 | </ul> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 243 | <ul class="current"> |
| 244 | <li class="toctree-l1"><a class="reference internal" href="../../overview/intro.html">1. Introduction</a></li> |
| 245 | <li class="toctree-l1"><a class="reference internal" href="../../overview/goals.html">2. Design goals</a></li> |
| 246 | <li class="toctree-l1"><a class="reference internal" href="../../overview/functionality.html">3. Functionality overview</a></li> |
| 247 | <li class="toctree-l1"><a class="reference internal" href="../../overview/sample-arch.html">4. Sample architectures</a></li> |
| 248 | <li class="toctree-l1"><a class="reference internal" href="../../overview/conventions.html">5. Library conventions</a></li> |
| 249 | <li class="toctree-l1"><a class="reference internal" href="../../overview/implementation.html">6. Implementation considerations</a></li> |
| 250 | <li class="toctree-l1"><a class="reference internal" href="../../overview/usage.html">7. Usage considerations</a></li> |
| 251 | <li class="toctree-l1 current"><a class="reference internal" href="index.html">8. Library management reference</a><ul class="current"> |
| 252 | <li class="toctree-l2 current"><a class="current reference internal" href="#">8.1. PSA status codes</a><ul> |
| 253 | <li class="toctree-l3"><a class="reference internal" href="#status-type">8.1.1. Status type</a></li> |
| 254 | <li class="toctree-l3"><a class="reference internal" href="#success-codes">8.1.2. Success codes</a></li> |
| 255 | <li class="toctree-l3"><a class="reference internal" href="#error-codes">8.1.3. Error codes</a></li> |
| 256 | </ul> |
| 257 | </li> |
| 258 | <li class="toctree-l2"><a class="reference internal" href="library.html">8.2. PSA Crypto library</a></li> |
| 259 | </ul> |
| 260 | </li> |
| 261 | <li class="toctree-l1"><a class="reference internal" href="../keys/index.html">9. Key management reference</a></li> |
| 262 | <li class="toctree-l1"><a class="reference internal" href="../ops/index.html">10. Cryptographic operation reference</a></li> |
| 263 | </ul> |
| 264 | <ul> |
| 265 | <li class="toctree-l1"><a class="reference internal" href="../../appendix/example_header.html">Example header file</a></li> |
| 266 | <li class="toctree-l1"><a class="reference internal" href="../../appendix/specdef_values.html">Example macro implementations</a></li> |
| 267 | <li class="toctree-l1"><a class="reference internal" href="../../appendix/history.html">Changes to the API</a></li> |
| 268 | </ul> |
| 269 | <ul> |
| 270 | <li class="toctree-l1"><a class="reference internal" href="../../psa_c-identifiers.html">Index of API elements</a></li> |
| 271 | </ul> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 272 | <div id="searchbox" style="display: none" role="search"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 273 | <h3 id="searchlabel">Quick search</h3> |
| 274 | <div class="searchformwrapper"> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 275 | <form class="search" action="../../search.html" method="get"> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 276 | <input type="text" name="q" aria-labelledby="searchlabel" /> |
| 277 | <input type="submit" value="Go" /> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 278 | </form> |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 279 | </div> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 280 | </div> |
| 281 | <script type="text/javascript">$('#searchbox').show(0);</script> |
| 282 | </div> |
| 283 | </div> |
| 284 | <div class="clearer"></div> |
| 285 | </div> |
| 286 | <div class="footer"> |
Gilles Peskine | c2db5f0 | 2021-01-18 20:36:53 +0100 | [diff] [blame] | 287 | © 2018-2020, Arm Limited or its affiliates. All rights reserved. |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 288 | |
| 289 | | |
Bence Szépkúti | e26ccad | 2021-02-01 14:26:11 +0100 | [diff] [blame] | 290 | Powered by <a href="http://sphinx-doc.org/">Sphinx 2.1.2</a> |
| 291 | & <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a> |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 292 | |
Gilles Peskine | 6c723a2 | 2020-04-17 16:57:52 +0200 | [diff] [blame] | 293 | </div> |
| 294 | |
| 295 | |
| 296 | |
| 297 | |
| 298 | </body> |
| 299 | </html> |