178 lines
15 KiB
HTML
178 lines
15 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>GRPC C++: grpc_tls_certificate_verifier_external Struct Reference</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="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></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">GRPC C++
|
|
 <span id="projectnumber">1.58.0</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.17 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-attribs">Data Fields</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">grpc_tls_certificate_verifier_external Struct Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>EXPERIMENTAL API - Subject to change.
|
|
<a href="structgrpc__tls__certificate__verifier__external.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="grpc__security_8h_source.html">grpc_security.h</a>></code></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
|
|
Data Fields</h2></td></tr>
|
|
<tr class="memitem:a4426af18abaac5dde24da04e796d251b"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="structgrpc__tls__certificate__verifier__external.html#a4426af18abaac5dde24da04e796d251b">user_data</a></td></tr>
|
|
<tr class="separator:a4426af18abaac5dde24da04e796d251b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6eb957132a37782a572b5c2f0a3ee532"><td class="memItemLeft" align="right" valign="top">int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structgrpc__tls__certificate__verifier__external.html#a6eb957132a37782a572b5c2f0a3ee532">verify</a> )(void *<a class="el" href="structgrpc__tls__certificate__verifier__external.html#a4426af18abaac5dde24da04e796d251b">user_data</a>, <a class="el" href="structgrpc__tls__custom__verification__check__request.html">grpc_tls_custom_verification_check_request</a> *request, <a class="el" href="tls__certificate__verifier_8h.html#acb2cccf44dad8776d1a0abbd36781ee7">grpc_tls_on_custom_verification_check_done_cb</a> callback, void *callback_arg, <a class="el" href="grpc_2status_8h.html#a35ab2a68917eb836de84cb23253108eb">grpc_status_code</a> *sync_status, char **sync_error_details)</td></tr>
|
|
<tr class="memdesc:a6eb957132a37782a572b5c2f0a3ee532"><td class="mdescLeft"> </td><td class="mdescRight">A function pointer containing the verification logic that will be performed after the TLS handshake is done. <a href="structgrpc__tls__certificate__verifier__external.html#a6eb957132a37782a572b5c2f0a3ee532">More...</a><br /></td></tr>
|
|
<tr class="separator:a6eb957132a37782a572b5c2f0a3ee532"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad107cc92fee39f42179f4ff647469db1"><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structgrpc__tls__certificate__verifier__external.html#ad107cc92fee39f42179f4ff647469db1">cancel</a> )(void *<a class="el" href="structgrpc__tls__certificate__verifier__external.html#a4426af18abaac5dde24da04e796d251b">user_data</a>, <a class="el" href="structgrpc__tls__custom__verification__check__request.html">grpc_tls_custom_verification_check_request</a> *request)</td></tr>
|
|
<tr class="memdesc:ad107cc92fee39f42179f4ff647469db1"><td class="mdescLeft"> </td><td class="mdescRight">A function pointer that cleans up the caller-specified resources when the verifier is still running but the whole connection got cancelled. <a href="structgrpc__tls__certificate__verifier__external.html#ad107cc92fee39f42179f4ff647469db1">More...</a><br /></td></tr>
|
|
<tr class="separator:ad107cc92fee39f42179f4ff647469db1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad8faa48358d0336a49d7a79c42204df5"><td class="memItemLeft" align="right" valign="top">void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structgrpc__tls__certificate__verifier__external.html#ad8faa48358d0336a49d7a79c42204df5">destruct</a> )(void *<a class="el" href="structgrpc__tls__certificate__verifier__external.html#a4426af18abaac5dde24da04e796d251b">user_data</a>)</td></tr>
|
|
<tr class="memdesc:ad8faa48358d0336a49d7a79c42204df5"><td class="mdescLeft"> </td><td class="mdescRight">A function pointer that does some additional destruction work when the verifier is destroyed. <a href="structgrpc__tls__certificate__verifier__external.html#ad8faa48358d0336a49d7a79c42204df5">More...</a><br /></td></tr>
|
|
<tr class="separator:ad8faa48358d0336a49d7a79c42204df5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>EXPERIMENTAL API - Subject to change. </p>
|
|
<p>A struct containing all the necessary functions a custom external verifier needs to implement to be able to be converted to an internal verifier. </p>
|
|
</div><h2 class="groupheader">Field Documentation</h2>
|
|
<a id="ad107cc92fee39f42179f4ff647469db1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad107cc92fee39f42179f4ff647469db1">◆ </a></span>cancel</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void(* grpc_tls_certificate_verifier_external::cancel) (void *<a class="el" href="structgrpc__tls__certificate__verifier__external.html#a4426af18abaac5dde24da04e796d251b">user_data</a>, <a class="el" href="structgrpc__tls__custom__verification__check__request.html">grpc_tls_custom_verification_check_request</a> *request)</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>A function pointer that cleans up the caller-specified resources when the verifier is still running but the whole connection got cancelled. </p>
|
|
<p>This could happen when the verifier is doing some async operations, and the whole handshaker object got destroyed because of connection time limit is reached, or any other reasons. In such cases, function implementers might want to be notified, and properly clean up some resources.</p>
|
|
<p>user_data: any argument that is passed in the user_data of <a class="el" href="structgrpc__tls__certificate__verifier__external.html" title="EXPERIMENTAL API - Subject to change.">grpc_tls_certificate_verifier_external</a> during construction time can be retrieved later here. request: request information exposed to the function implementer. It will be the same request object that was passed to <a class="el" href="structgrpc__tls__certificate__verifier__external.html#a6eb957132a37782a572b5c2f0a3ee532" title="A function pointer containing the verification logic that will be performed after the TLS handshake i...">verify()</a>, and it tells the <a class="el" href="structgrpc__tls__certificate__verifier__external.html#ad107cc92fee39f42179f4ff647469db1" title="A function pointer that cleans up the caller-specified resources when the verifier is still running b...">cancel()</a> which request to cancel. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad8faa48358d0336a49d7a79c42204df5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad8faa48358d0336a49d7a79c42204df5">◆ </a></span>destruct</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void(* grpc_tls_certificate_verifier_external::destruct) (void *<a class="el" href="structgrpc__tls__certificate__verifier__external.html#a4426af18abaac5dde24da04e796d251b">user_data</a>)</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>A function pointer that does some additional destruction work when the verifier is destroyed. </p>
|
|
<p>This is used when the caller wants to associate some objects to the lifetime of external_verifier, and destroy them when external_verifier got destructed. For example, in C++, the class containing user-specified callback functions should not be destroyed before external_verifier, since external_verifier will invoke them while being used. Note that the caller MUST delete the <a class="el" href="structgrpc__tls__certificate__verifier__external.html" title="EXPERIMENTAL API - Subject to change.">grpc_tls_certificate_verifier_external</a> object itself in this function, otherwise it will cause memory leaks. That also means the user_data has to carries at least a self pointer, for the callers to later delete it in <a class="el" href="structgrpc__tls__certificate__verifier__external.html#ad8faa48358d0336a49d7a79c42204df5" title="A function pointer that does some additional destruction work when the verifier is destroyed.">destruct()</a>.</p>
|
|
<p>user_data: any argument that is passed in the user_data of <a class="el" href="structgrpc__tls__certificate__verifier__external.html" title="EXPERIMENTAL API - Subject to change.">grpc_tls_certificate_verifier_external</a> during construction time can be retrieved later here. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4426af18abaac5dde24da04e796d251b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4426af18abaac5dde24da04e796d251b">◆ </a></span>user_data</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void* grpc_tls_certificate_verifier_external::user_data</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a6eb957132a37782a572b5c2f0a3ee532"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6eb957132a37782a572b5c2f0a3ee532">◆ </a></span>verify</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int(* grpc_tls_certificate_verifier_external::verify) (void *<a class="el" href="structgrpc__tls__certificate__verifier__external.html#a4426af18abaac5dde24da04e796d251b">user_data</a>, <a class="el" href="structgrpc__tls__custom__verification__check__request.html">grpc_tls_custom_verification_check_request</a> *request, <a class="el" href="tls__certificate__verifier_8h.html#acb2cccf44dad8776d1a0abbd36781ee7">grpc_tls_on_custom_verification_check_done_cb</a> callback, void *callback_arg, <a class="el" href="grpc_2status_8h.html#a35ab2a68917eb836de84cb23253108eb">grpc_status_code</a> *sync_status, char **sync_error_details)</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>A function pointer containing the verification logic that will be performed after the TLS handshake is done. </p>
|
|
<p>It could be processed synchronously or asynchronously.</p><ul>
|
|
<li>If expected to be processed synchronously, the implementer should populate the verification result through |sync_status| and |sync_error_details|, and then return true.</li>
|
|
<li>If expected to be processed asynchronously, the implementer should return false immediately, and then in the asynchronous thread invoke |callback| with the verification result. The implementer MUST NOT invoke the async |callback| in the same thread before |verify| returns, otherwise it can lead to deadlocks.</li>
|
|
</ul>
|
|
<p>user_data: any argument that is passed in the user_data of <a class="el" href="structgrpc__tls__certificate__verifier__external.html" title="EXPERIMENTAL API - Subject to change.">grpc_tls_certificate_verifier_external</a> during construction time can be retrieved later here. request: request information exposed to the function implementer. callback: the callback that the function implementer needs to invoke, if return a non-zero value. It is usually invoked when the asynchronous verification is done, and serves to bring the control back to gRPC. callback_arg: A pointer to the internal ExternalVerifier instance. This is mainly used as an argument in |callback|, if want to invoke |callback| in async mode. sync_status: indicates if a connection should be allowed. This should only be used if the verification check is done synchronously. sync_error_details: the error generated while verifying a connection. This should only be used if the verification check is done synchronously. the implementation must allocate the error string via <a class="el" href="alloc_8h.html#aa15f6aa58f356420b0d955fc6e506a60" title="malloc.">gpr_malloc()</a> or <a class="el" href="string__util_8h.html#ac985fb3e83365807cb3ddf14c8f6a477" title="String utility functions.">gpr_strdup()</a>. return: return 0 if |verify| is expected to be executed asynchronously, otherwise return a non-zero value. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this struct was generated from the following file:<ul>
|
|
<li>include/grpc/<a class="el" href="grpc__security_8h_source.html">grpc_security.h</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Wed Sep 6 2023 16:09:16 for GRPC C++ by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.17
|
|
</small></address>
|
|
</body>
|
|
</html>
|