<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.13"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>tpm2-tss: Fapi_VerifySignature</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">tpm2-tss  <span id="projectnumber">3.2.0</span> </div> <div id="projectbrief">TPM Software stack 2.0 TCG spec compliant implementation</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.13 --> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> $(function() { initMenu('',false,false,'search.php','Search'); }); </script> <div id="main-nav"></div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('group___fapi___verify_signature.html','');}); </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">Fapi_VerifySignature<div class="ingroups"><a class="el" href="group__fapi.html">Feature API</a></div></div> </div> </div><!--header--> <div class="contents"> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:ga58684071de48343db7d8b7eb726b975e"><td class="memItemLeft" align="right" valign="top">TSS2_RC </td><td class="memItemRight" valign="bottom"><a class="el" href="group___fapi___verify_signature.html#ga58684071de48343db7d8b7eb726b975e">Fapi_VerifySignature</a> (<a class="el" href="struct_f_a_p_i___c_o_n_t_e_x_t.html">FAPI_CONTEXT</a> *context, char const *keyPath, uint8_t const *digest, size_t digestSize, uint8_t const *signature, size_t signatureSize)</td></tr> <tr class="separator:ga58684071de48343db7d8b7eb726b975e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga5290dee5018382130316e8e53fab3c41"><td class="memItemLeft" align="right" valign="top">TSS2_RC </td><td class="memItemRight" valign="bottom"><a class="el" href="group___fapi___verify_signature.html#ga5290dee5018382130316e8e53fab3c41">Fapi_VerifySignature_Async</a> (<a class="el" href="struct_f_a_p_i___c_o_n_t_e_x_t.html">FAPI_CONTEXT</a> *context, char const *keyPath, uint8_t const *digest, size_t digestSize, uint8_t const *signature, size_t signatureSize)</td></tr> <tr class="separator:ga5290dee5018382130316e8e53fab3c41"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gadfbccf281b07699eb44d4ad384bdef22"><td class="memItemLeft" align="right" valign="top">TSS2_RC </td><td class="memItemRight" valign="bottom"><a class="el" href="group___fapi___verify_signature.html#gadfbccf281b07699eb44d4ad384bdef22">Fapi_VerifySignature_Finish</a> (<a class="el" href="struct_f_a_p_i___c_o_n_t_e_x_t.html">FAPI_CONTEXT</a> *context)</td></tr> <tr class="separator:gadfbccf281b07699eb44d4ad384bdef22"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <p>FAPI functions to invoke VerifySignature either as one-call or in an asynchronous manner. </p> <h2 class="groupheader">Function Documentation</h2> <a id="ga58684071de48343db7d8b7eb726b975e"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga58684071de48343db7d8b7eb726b975e">◆ </a></span>Fapi_VerifySignature()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Fapi_VerifySignature </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_f_a_p_i___c_o_n_t_e_x_t.html">FAPI_CONTEXT</a> * </td> <td class="paramname"><em>context</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char const * </td> <td class="paramname"><em>keyPath</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint8_t const * </td> <td class="paramname"><em>digest</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>digestSize</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint8_t const * </td> <td class="paramname"><em>signature</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>signatureSize</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>One-Call function for Fapi_VerifySignature</p> <p>Verifies a signature using a public key found in a keyPath.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[in,out]</td><td class="paramname">context</td><td>The <a class="el" href="struct_f_a_p_i___c_o_n_t_e_x_t.html">FAPI_CONTEXT</a> </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">keyPath</td><td>The path to the verification public key </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">digest</td><td>The that was signed. Must be already hashed </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">digestSize</td><td>the size of digest in bytes </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">signature</td><td>The signature to be verified </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">signatureSize</td><td>The size of signature in bytes</td></tr> </table> </dd> </dl> <dl class="retval"><dt>Return values</dt><dd> <table class="retval"> <tr><td class="paramname">TSS2_RC_SUCCESS</td><td>if the function call was a success. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_REFERENCE</td><td>if context, keyPath, signature, or digest is NULL. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_CONTEXT</td><td>if context corruption is detected. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_KEY_NOT_FOUND</td><td>if keyPath does not map to a FAPI object. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_KEY</td><td>if the object at publicKeyPath is not a key, or is a key that is unsuitable for the requested operation. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_VALUE</td><td>if signature is invalid (has the wrong format) or if digestSize is zero. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED</td><td>if the signature fails to verify. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_SEQUENCE</td><td>if the context has an asynchronous operation already pending. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_IO_ERROR</td><td>if the data cannot be saved. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_MEMORY</td><td>if the FAPI cannot allocate enough memory for internal operations or return parameters. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_PATH_NOT_FOUND</td><td>if a FAPI object path was not found during authorization. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_TRY_AGAIN</td><td>if an I/O operation is not finished yet and this function needs to be called again. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_GENERAL_FAILURE</td><td>if an internal error occurred. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_NOT_PROVISIONED</td><td>FAPI was not provisioned. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_PATH</td><td>if the path is used in inappropriate context or contains illegal characters. </td></tr> </table> </dd> </dl> </div> </div> <a id="ga5290dee5018382130316e8e53fab3c41"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga5290dee5018382130316e8e53fab3c41">◆ </a></span>Fapi_VerifySignature_Async()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Fapi_VerifySignature_Async </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_f_a_p_i___c_o_n_t_e_x_t.html">FAPI_CONTEXT</a> * </td> <td class="paramname"><em>context</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char const * </td> <td class="paramname"><em>keyPath</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint8_t const * </td> <td class="paramname"><em>digest</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>digestSize</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint8_t const * </td> <td class="paramname"><em>signature</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>signatureSize</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Asynchronous function for Fapi_VerifySignature</p> <p>Verifies a signature using a public key found in a keyPath.</p> <p>Call Fapi_VerifySignature_Finish to finish the execution of this command.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[in,out]</td><td class="paramname">context</td><td>The <a class="el" href="struct_f_a_p_i___c_o_n_t_e_x_t.html">FAPI_CONTEXT</a> </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">keyPath</td><td>The path to the verification public key </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">digest</td><td>The that was signed. Must be already hashed </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">digestSize</td><td>the size of digest in bytes </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">signature</td><td>The signature to be verified </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">signatureSize</td><td>The size of signature in bytes</td></tr> </table> </dd> </dl> <dl class="retval"><dt>Return values</dt><dd> <table class="retval"> <tr><td class="paramname">TSS2_RC_SUCCESS</td><td>if the function call was a success. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_REFERENCE</td><td>if context, keyPath, signature, or digest is NULL. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_CONTEXT</td><td>if context corruption is detected. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_KEY_NOT_FOUND</td><td>if keyPath does not map to a FAPI object. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_KEY</td><td>if the object at publicKeyPath is not a key, or is a key that is unsuitable for the requested operation. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_VALUE</td><td>if signature is invalid (has the wrong format) or if digestSize is zero. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED</td><td>if the signature fails to verify. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_SEQUENCE</td><td>if the context has an asynchronous operation already pending. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_IO_ERROR</td><td>if the data cannot be saved. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_MEMORY</td><td>if the FAPI cannot allocate enough memory for internal operations or return parameters. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_PATH_NOT_FOUND</td><td>if a FAPI object path was not found during authorization. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_NOT_PROVISIONED</td><td>FAPI was not provisioned. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_PATH</td><td>if the path is used in inappropriate context or contains illegal characters. </td></tr> </table> </dd> </dl> </div> </div> <a id="gadfbccf281b07699eb44d4ad384bdef22"></a> <h2 class="memtitle"><span class="permalink"><a href="#gadfbccf281b07699eb44d4ad384bdef22">◆ </a></span>Fapi_VerifySignature_Finish()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Fapi_VerifySignature_Finish </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_f_a_p_i___c_o_n_t_e_x_t.html">FAPI_CONTEXT</a> * </td> <td class="paramname"><em>context</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Asynchronous finish function for Fapi_VerifySignature</p> <p>This function should be called after a previous Fapi_VerifySignature_Async.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[in,out]</td><td class="paramname">context</td><td>The <a class="el" href="struct_f_a_p_i___c_o_n_t_e_x_t.html">FAPI_CONTEXT</a></td></tr> </table> </dd> </dl> <dl class="retval"><dt>Return values</dt><dd> <table class="retval"> <tr><td class="paramname">TSS2_RC_SUCCESS</td><td>if the function call was a success. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_REFERENCE</td><td>if context is NULL. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_CONTEXT</td><td>if context corruption is detected. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_SEQUENCE</td><td>if the context has an asynchronous operation already pending. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_IO_ERROR</td><td>if the data cannot be saved. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_MEMORY</td><td>if the FAPI cannot allocate enough memory for internal operations or return parameters. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_TRY_AGAIN</td><td>if the asynchronous operation is not yet complete. Call this function again later. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_GENERAL_FAILURE</td><td>if an internal error occurred. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_BAD_VALUE</td><td>if an invalid value was passed into the function. </td></tr> <tr><td class="paramname">TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED</td><td>if the signature could not be verified </td></tr> </table> </dd> </dl> </div> </div> </div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> </ul> </div> </body> </html>