/
githubmirror
/
xmlsec
Обзор
Документация
Войти
/
githubmirror
/
xmlsec
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
1.3.8
docs/api/xmlsec-nss-app.html
1 221 строка
54 KB
lsh123
Docs update (#869)
29 янв 2025, 20:55
Не верифицирован
29 янв 2025, 20:55
c61a4a9
Код
Авторство
О чём код?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>app: XML Security Library Reference Manual</title> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> <link rel="home" href="index.html" title="XML Security Library Reference Manual"> <link rel="up" href="xmlsec-nss-ref.html" title="XML Security Library for NSS API Reference."> <link rel="prev" href="xmlsec-nss-ref.html" title="XML Security Library for NSS API Reference."> <link rel="next" href="xmlsec-nss-crypto.html" title="crypto"> <meta name="generator" content="GTK-Doc V1.34.0 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> <td width="100%" align="left" class="shortcuts"> <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> <a href="#xmlsec-nss-app.description" class="shortcut">Description</a></span> </td> <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> <td><a accesskey="u" href="xmlsec-nss-ref.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> <td><a accesskey="p" href="xmlsec-nss-ref.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> <td><a accesskey="n" href="xmlsec-nss-crypto.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> </tr></table> <div class="refentry"> <a name="xmlsec-nss-app"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2><span class="refentrytitle"><a name="xmlsec-nss-app.top_of_page"></a>app</span></h2> <p>app — Application support functions for NSS.</p> </td> <td class="gallery_image" valign="top" align="right"></td> </tr></table></div> <div class="refsect1"> <a name="xmlsec-nss-app.stability-level"></a><h2>Stability Level</h2> <a href="http://foldoc.org/Stable"><span class="acronym">Stable</span></a>, unless otherwise indicated </div> <div class="refsect1"> <a name="xmlsec-nss-app.functions"></a><h2>Functions</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> </colgroup> <tbody> <tr> <td class="function_type"> <font><span class="returnvalue">int</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppInit" title="xmlSecNssAppInit ()">xmlSecNssAppInit</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">int</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppShutdown" title="xmlSecNssAppShutdown ()">xmlSecNssAppShutdown</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">int</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppDefaultKeysMngrInit" title="xmlSecNssAppDefaultKeysMngrInit ()">xmlSecNssAppDefaultKeysMngrInit</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">int</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppDefaultKeysMngrAdoptKey" title="xmlSecNssAppDefaultKeysMngrAdoptKey ()">xmlSecNssAppDefaultKeysMngrAdoptKey</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">int</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppDefaultKeysMngrVerifyKey" title="xmlSecNssAppDefaultKeysMngrVerifyKey ()">xmlSecNssAppDefaultKeysMngrVerifyKey</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">int</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppDefaultKeysMngrLoad" title="xmlSecNssAppDefaultKeysMngrLoad ()">xmlSecNssAppDefaultKeysMngrLoad</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">int</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppDefaultKeysMngrSave" title="xmlSecNssAppDefaultKeysMngrSave ()">xmlSecNssAppDefaultKeysMngrSave</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">int</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppKeysMngrCertLoad" title="xmlSecNssAppKeysMngrCertLoad ()">xmlSecNssAppKeysMngrCertLoad</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">int</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppKeysMngrCertLoadMemory" title="xmlSecNssAppKeysMngrCertLoadMemory ()">xmlSecNssAppKeysMngrCertLoadMemory</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">int</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppKeysMngrCertLoadSECItem" title="xmlSecNssAppKeysMngrCertLoadSECItem ()">xmlSecNssAppKeysMngrCertLoadSECItem</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">int</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppKeysMngrCrlLoad" title="xmlSecNssAppKeysMngrCrlLoad ()">xmlSecNssAppKeysMngrCrlLoad</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">int</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppKeysMngrCrlLoadMemory" title="xmlSecNssAppKeysMngrCrlLoadMemory ()">xmlSecNssAppKeysMngrCrlLoadMemory</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="returnvalue">xmlSecKeyPtr</span></a> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppKeyLoadEx" title="xmlSecNssAppKeyLoadEx ()">xmlSecNssAppKeyLoadEx</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="returnvalue">xmlSecKeyPtr</span></a> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppKeyLoadMemory" title="xmlSecNssAppKeyLoadMemory ()">xmlSecNssAppKeyLoadMemory</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="returnvalue">xmlSecKeyPtr</span></a> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppKeyLoadSECItem" title="xmlSecNssAppKeyLoadSECItem ()">xmlSecNssAppKeyLoadSECItem</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="returnvalue">xmlSecKeyPtr</span></a> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppPkcs12Load" title="xmlSecNssAppPkcs12Load ()">xmlSecNssAppPkcs12Load</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="returnvalue">xmlSecKeyPtr</span></a> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppPkcs12LoadMemory" title="xmlSecNssAppPkcs12LoadMemory ()">xmlSecNssAppPkcs12LoadMemory</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="returnvalue">xmlSecKeyPtr</span></a> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppPkcs12LoadSECItem" title="xmlSecNssAppPkcs12LoadSECItem ()">xmlSecNssAppPkcs12LoadSECItem</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">int</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppKeyCertLoad" title="xmlSecNssAppKeyCertLoad ()">xmlSecNssAppKeyCertLoad</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">int</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppKeyCertLoadMemory" title="xmlSecNssAppKeyCertLoadMemory ()">xmlSecNssAppKeyCertLoadMemory</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">int</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppKeyCertLoadSECItem" title="xmlSecNssAppKeyCertLoadSECItem ()">xmlSecNssAppKeyCertLoadSECItem</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="returnvalue">xmlSecKeyPtr</span></a> </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppKeyFromCertLoadSECItem" title="xmlSecNssAppKeyFromCertLoadSECItem ()">xmlSecNssAppKeyFromCertLoadSECItem</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">void</span></font> * </td> <td class="function_name"> <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppGetDefaultPwdCallback" title="xmlSecNssAppGetDefaultPwdCallback ()">xmlSecNssAppGetDefaultPwdCallback</a> <span class="c_punctuation">()</span> </td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="xmlsec-nss-app.description"></a><h2>Description</h2> <p>Common functions for xmlsec1 command line utility tool for NSS.</p> </div> <div class="refsect1"> <a name="xmlsec-nss-app.functions_details"></a><h2>Functions</h2> <div class="refsect2"> <a name="xmlSecNssAppInit"></a><h3>xmlSecNssAppInit ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecNssAppInit (<em class="parameter"><code>const <font><span class="type">char</span></font> *config</code></em>);</pre> <p>General crypto engine initialization. This function is used by XMLSec command line utility and called before <em class="parameter"><code>xmlSecInit</code></em> function.</p> <div class="refsect3"> <a name="xmlSecNssAppInit.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody><tr> <td class="parameter_name"><p>config</p></td> <td class="parameter_description"><p>the path to NSS database files.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppInit.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppShutdown"></a><h3>xmlSecNssAppShutdown ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecNssAppShutdown (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> <p>General crypto engine shutdown. This function is used by XMLSec command line utility and called after <em class="parameter"><code>xmlSecShutdown</code></em> function.</p> <div class="refsect3"> <a name="xmlSecNssAppShutdown.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppDefaultKeysMngrInit"></a><h3>xmlSecNssAppDefaultKeysMngrInit ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecNssAppDefaultKeysMngrInit (<em class="parameter"><code><a class="link" href="xmlsec-keysmngr.html#xmlSecKeysMngr" title="struct xmlSecKeysMngr"><span class="type">xmlSecKeysMngrPtr</span></a> mngr</code></em>);</pre> <p>Initializes <em class="parameter"><code>mngr</code></em> with NSS keys store <a class="link" href="xmlsec-nss-keysstore.html#xmlSecNssKeysStoreId" title="xmlSecNssKeysStoreId"><span class="type">xmlSecNssKeysStoreId</span></a> and a default NSS crypto key data stores.</p> <div class="refsect3"> <a name="xmlSecNssAppDefaultKeysMngrInit.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody><tr> <td class="parameter_name"><p>mngr</p></td> <td class="parameter_description"><p>the pointer to keys manager.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppDefaultKeysMngrInit.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppDefaultKeysMngrAdoptKey"></a><h3>xmlSecNssAppDefaultKeysMngrAdoptKey ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecNssAppDefaultKeysMngrAdoptKey (<em class="parameter"><code><a class="link" href="xmlsec-keysmngr.html#xmlSecKeysMngr" title="struct xmlSecKeysMngr"><span class="type">xmlSecKeysMngrPtr</span></a> mngr</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="type">xmlSecKeyPtr</span></a> key</code></em>);</pre> <p>Adds <em class="parameter"><code>key</code></em> to the keys manager <em class="parameter"><code>mngr</code></em> created with <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppDefaultKeysMngrInit" title="xmlSecNssAppDefaultKeysMngrInit ()"><span class="type">xmlSecNssAppDefaultKeysMngrInit</span></a> function.</p> <div class="refsect3"> <a name="xmlSecNssAppDefaultKeysMngrAdoptKey.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>mngr</p></td> <td class="parameter_description"><p>the pointer to keys manager.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>key</p></td> <td class="parameter_description"><p>the pointer to key.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppDefaultKeysMngrAdoptKey.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppDefaultKeysMngrVerifyKey"></a><h3>xmlSecNssAppDefaultKeysMngrVerifyKey ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecNssAppDefaultKeysMngrVerifyKey (<em class="parameter"><code><a class="link" href="xmlsec-keysmngr.html#xmlSecKeysMngr" title="struct xmlSecKeysMngr"><span class="type">xmlSecKeysMngrPtr</span></a> mngr</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="type">xmlSecKeyPtr</span></a> key</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keyinfo.html#xmlSecKeyInfoCtx" title="struct xmlSecKeyInfoCtx"><span class="type">xmlSecKeyInfoCtxPtr</span></a> keyInfoCtx</code></em>);</pre> <p>Verifies <em class="parameter"><code>key</code></em> with the keys manager <em class="parameter"><code>mngr</code></em> created with <a class="link" href="xmlsec-app.html#xmlSecCryptoAppDefaultKeysMngrInit" title="xmlSecCryptoAppDefaultKeysMngrInit ()"><span class="type">xmlSecCryptoAppDefaultKeysMngrInit</span></a> function:</p> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p>Checks that key certificate is present</p></li> <li class="listitem"><p>Checks that key certificate is valid</p></li> </ul></div> <p>Adds <em class="parameter"><code>key</code></em> to the keys manager <em class="parameter"><code>mngr</code></em> created with <a class="link" href="xmlsec-app.html#xmlSecCryptoAppDefaultKeysMngrInit" title="xmlSecCryptoAppDefaultKeysMngrInit ()"><span class="type">xmlSecCryptoAppDefaultKeysMngrInit</span></a> function.</p> <div class="refsect3"> <a name="xmlSecNssAppDefaultKeysMngrVerifyKey.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>mngr</p></td> <td class="parameter_description"><p>the pointer to keys manager.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>key</p></td> <td class="parameter_description"><p>the pointer to key.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>keyInfoCtx</p></td> <td class="parameter_description"><p>the key info context for verification.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppDefaultKeysMngrVerifyKey.returns"></a><h4>Returns</h4> <p> 1 if key is verified, 0 otherwise, or a negative value if an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppDefaultKeysMngrLoad"></a><h3>xmlSecNssAppDefaultKeysMngrLoad ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecNssAppDefaultKeysMngrLoad (<em class="parameter"><code><a class="link" href="xmlsec-keysmngr.html#xmlSecKeysMngr" title="struct xmlSecKeysMngr"><span class="type">xmlSecKeysMngrPtr</span></a> mngr</code></em>, <em class="parameter"><code>const <font><span class="type">char</span></font> *uri</code></em>);</pre> <p>Loads XML keys file from <em class="parameter"><code>uri</code></em> to the keys manager <em class="parameter"><code>mngr</code></em> created with <a class="link" href="xmlsec-nss-app.html#xmlSecNssAppDefaultKeysMngrInit" title="xmlSecNssAppDefaultKeysMngrInit ()"><span class="type">xmlSecNssAppDefaultKeysMngrInit</span></a> function.</p> <div class="refsect3"> <a name="xmlSecNssAppDefaultKeysMngrLoad.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>mngr</p></td> <td class="parameter_description"><p>the pointer to keys manager.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>uri</p></td> <td class="parameter_description"><p>the uri.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppDefaultKeysMngrLoad.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppDefaultKeysMngrSave"></a><h3>xmlSecNssAppDefaultKeysMngrSave ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecNssAppDefaultKeysMngrSave (<em class="parameter"><code><a class="link" href="xmlsec-keysmngr.html#xmlSecKeysMngr" title="struct xmlSecKeysMngr"><span class="type">xmlSecKeysMngrPtr</span></a> mngr</code></em>, <em class="parameter"><code>const <font><span class="type">char</span></font> *filename</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataType" title="xmlSecKeyDataType"><span class="type">xmlSecKeyDataType</span></a> type</code></em>);</pre> <p>Saves keys from <em class="parameter"><code>mngr</code></em> to XML keys file.</p> <div class="refsect3"> <a name="xmlSecNssAppDefaultKeysMngrSave.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>mngr</p></td> <td class="parameter_description"><p>the pointer to keys manager.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>filename</p></td> <td class="parameter_description"><p>the destination filename.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>type</p></td> <td class="parameter_description"><p>the type of keys to save (public/private/symmetric).</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppDefaultKeysMngrSave.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppKeysMngrCertLoad"></a><h3>xmlSecNssAppKeysMngrCertLoad ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecNssAppKeysMngrCertLoad (<em class="parameter"><code><a class="link" href="xmlsec-keysmngr.html#xmlSecKeysMngr" title="struct xmlSecKeysMngr"><span class="type">xmlSecKeysMngrPtr</span></a> mngr</code></em>, <em class="parameter"><code>const <font><span class="type">char</span></font> *filename</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataFormat" title="enum xmlSecKeyDataFormat"><span class="type">xmlSecKeyDataFormat</span></a> format</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataType" title="xmlSecKeyDataType"><span class="type">xmlSecKeyDataType</span></a> type</code></em>);</pre> <p>Reads cert from <em class="parameter"><code>filename</code></em> and adds to the list of trusted or known untrusted certs in <em class="parameter"><code>store</code></em> </p> <div class="refsect3"> <a name="xmlSecNssAppKeysMngrCertLoad.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>mngr</p></td> <td class="parameter_description"><p>the pointer to keys manager.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>filename</p></td> <td class="parameter_description"><p>the certificate file.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>the certificate file format (PEM or DER).</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>type</p></td> <td class="parameter_description"><p>the certificate type (trusted/untrusted).</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppKeysMngrCertLoad.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppKeysMngrCertLoadMemory"></a><h3>xmlSecNssAppKeysMngrCertLoadMemory ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecNssAppKeysMngrCertLoadMemory (<em class="parameter"><code><a class="link" href="xmlsec-keysmngr.html#xmlSecKeysMngr" title="struct xmlSecKeysMngr"><span class="type">xmlSecKeysMngrPtr</span></a> mngr</code></em>, <em class="parameter"><code>const <a class="link" href="xmlsec-xmlsec.html#xmlSecByte" title="xmlSecByte"><span class="type">xmlSecByte</span></a> *data</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-xmlsec.html#xmlSecSize" title="xmlSecSize"><span class="type">xmlSecSize</span></a> dataSize</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataFormat" title="enum xmlSecKeyDataFormat"><span class="type">xmlSecKeyDataFormat</span></a> format</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataType" title="xmlSecKeyDataType"><span class="type">xmlSecKeyDataType</span></a> type</code></em>);</pre> <p>Reads cert from <em class="parameter"><code>data</code></em> and adds to the list of trusted or known untrusted certs in <em class="parameter"><code>store</code></em> </p> <div class="refsect3"> <a name="xmlSecNssAppKeysMngrCertLoadMemory.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>mngr</p></td> <td class="parameter_description"><p>the pointer to keys manager.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>data</p></td> <td class="parameter_description"><p>the certificatedata.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>dataSize</p></td> <td class="parameter_description"><p>the certificate data size.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>the certificate format (PEM or DER).</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>type</p></td> <td class="parameter_description"><p>the certificate type (trusted/untrusted).</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppKeysMngrCertLoadMemory.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppKeysMngrCertLoadSECItem"></a><h3>xmlSecNssAppKeysMngrCertLoadSECItem ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecNssAppKeysMngrCertLoadSECItem (<em class="parameter"><code><a class="link" href="xmlsec-keysmngr.html#xmlSecKeysMngr" title="struct xmlSecKeysMngr"><span class="type">xmlSecKeysMngrPtr</span></a> mngr</code></em>, <em class="parameter"><code><font><span class="type">SECItem</span></font> *secItem</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataFormat" title="enum xmlSecKeyDataFormat"><span class="type">xmlSecKeyDataFormat</span></a> format</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataType" title="xmlSecKeyDataType"><span class="type">xmlSecKeyDataType</span></a> type</code></em>);</pre> <p>Reads cert from <em class="parameter"><code>secItem</code></em> and adds to the list of trusted or known untrusted certs in <em class="parameter"><code>store</code></em> </p> <div class="refsect3"> <a name="xmlSecNssAppKeysMngrCertLoadSECItem.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>mngr</p></td> <td class="parameter_description"><p>the pointer to keys manager.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>secItem</p></td> <td class="parameter_description"><p>the pointer to SECItem.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>the certificate format (PEM or DER).</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>type</p></td> <td class="parameter_description"><p>the certificate type (trusted/untrusted).</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppKeysMngrCertLoadSECItem.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppKeysMngrCrlLoad"></a><h3>xmlSecNssAppKeysMngrCrlLoad ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecNssAppKeysMngrCrlLoad (<em class="parameter"><code><a class="link" href="xmlsec-keysmngr.html#xmlSecKeysMngr" title="struct xmlSecKeysMngr"><span class="type">xmlSecKeysMngrPtr</span></a> mngr</code></em>, <em class="parameter"><code>const <font><span class="type">char</span></font> *filename</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataFormat" title="enum xmlSecKeyDataFormat"><span class="type">xmlSecKeyDataFormat</span></a> format</code></em>);</pre> <p>Reads crl from <em class="parameter"><code>filename</code></em> and adds to the list of crls in <em class="parameter"><code>store</code></em> </p> <div class="refsect3"> <a name="xmlSecNssAppKeysMngrCrlLoad.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>mngr</p></td> <td class="parameter_description"><p>the pointer to keys manager.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>filename</p></td> <td class="parameter_description"><p>the CRL file.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>the CRL file format (PEM or DER).</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppKeysMngrCrlLoad.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppKeysMngrCrlLoadMemory"></a><h3>xmlSecNssAppKeysMngrCrlLoadMemory ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecNssAppKeysMngrCrlLoadMemory (<em class="parameter"><code><a class="link" href="xmlsec-keysmngr.html#xmlSecKeysMngr" title="struct xmlSecKeysMngr"><span class="type">xmlSecKeysMngrPtr</span></a> mngr</code></em>, <em class="parameter"><code>const <a class="link" href="xmlsec-xmlsec.html#xmlSecByte" title="xmlSecByte"><span class="type">xmlSecByte</span></a> *data</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-xmlsec.html#xmlSecSize" title="xmlSecSize"><span class="type">xmlSecSize</span></a> dataSize</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataFormat" title="enum xmlSecKeyDataFormat"><span class="type">xmlSecKeyDataFormat</span></a> format</code></em>);</pre> <p>Reads crl from <em class="parameter"><code>data</code></em> and adds to the list of crls in <em class="parameter"><code>store</code></em> </p> <div class="refsect3"> <a name="xmlSecNssAppKeysMngrCrlLoadMemory.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>mngr</p></td> <td class="parameter_description"><p>the pointer to keys manager.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>data</p></td> <td class="parameter_description"><p>the CRL data.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>dataSize</p></td> <td class="parameter_description"><p>the CRL data size.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>the CRL format (PEM or DER).</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppKeysMngrCrlLoadMemory.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppKeyLoadEx"></a><h3>xmlSecNssAppKeyLoadEx ()</h3> <pre class="programlisting"><a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="returnvalue">xmlSecKeyPtr</span></a> xmlSecNssAppKeyLoadEx (<em class="parameter"><code>const <font><span class="type">char</span></font> *filename</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataType" title="xmlSecKeyDataType"><span class="type">xmlSecKeyDataType</span></a> type</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataFormat" title="enum xmlSecKeyDataFormat"><span class="type">xmlSecKeyDataFormat</span></a> format</code></em>, <em class="parameter"><code>const <font><span class="type">char</span></font> *pwd</code></em>, <em class="parameter"><code><font><span class="type">void</span></font> *pwdCallback</code></em>, <em class="parameter"><code><font><span class="type">void</span></font> *pwdCallbackCtx</code></em>);</pre> <p>Reads key from a file</p> <div class="refsect3"> <a name="xmlSecNssAppKeyLoadEx.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>filename</p></td> <td class="parameter_description"><p>the key filename.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>type</p></td> <td class="parameter_description"><p>the key type (public / private).</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>the key file format.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwd</p></td> <td class="parameter_description"><p>the key file password.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwdCallback</p></td> <td class="parameter_description"><p>the key password callback.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwdCallbackCtx</p></td> <td class="parameter_description"><p>the user context for password callback.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppKeyLoadEx.returns"></a><h4>Returns</h4> <p> pointer to the key or NULL if an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppKeyLoadMemory"></a><h3>xmlSecNssAppKeyLoadMemory ()</h3> <pre class="programlisting"><a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="returnvalue">xmlSecKeyPtr</span></a> xmlSecNssAppKeyLoadMemory (<em class="parameter"><code>const <a class="link" href="xmlsec-xmlsec.html#xmlSecByte" title="xmlSecByte"><span class="type">xmlSecByte</span></a> *data</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-xmlsec.html#xmlSecSize" title="xmlSecSize"><span class="type">xmlSecSize</span></a> dataSize</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataFormat" title="enum xmlSecKeyDataFormat"><span class="type">xmlSecKeyDataFormat</span></a> format</code></em>, <em class="parameter"><code>const <font><span class="type">char</span></font> *pwd</code></em>, <em class="parameter"><code><font><span class="type">void</span></font> *pwdCallback</code></em>, <em class="parameter"><code><font><span class="type">void</span></font> *pwdCallbackCtx</code></em>);</pre> <p>Reads key from a binary <em class="parameter"><code>data</code></em> .</p> <div class="refsect3"> <a name="xmlSecNssAppKeyLoadMemory.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>data</p></td> <td class="parameter_description"><p>the key binary data.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>dataSize</p></td> <td class="parameter_description"><p>the key binary data size.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>the key data format.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwd</p></td> <td class="parameter_description"><p>the key data2 password.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwdCallback</p></td> <td class="parameter_description"><p>the key password callback.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwdCallbackCtx</p></td> <td class="parameter_description"><p>the user context for password callback.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppKeyLoadMemory.returns"></a><h4>Returns</h4> <p> pointer to the key or NULL if an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppKeyLoadSECItem"></a><h3>xmlSecNssAppKeyLoadSECItem ()</h3> <pre class="programlisting"><a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="returnvalue">xmlSecKeyPtr</span></a> xmlSecNssAppKeyLoadSECItem (<em class="parameter"><code><font><span class="type">SECItem</span></font> *secItem</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataFormat" title="enum xmlSecKeyDataFormat"><span class="type">xmlSecKeyDataFormat</span></a> format</code></em>, <em class="parameter"><code>const <font><span class="type">char</span></font> *pwd</code></em>, <em class="parameter"><code><font><span class="type">void</span></font> *pwdCallback</code></em>, <em class="parameter"><code><font><span class="type">void</span></font> *pwdCallbackCtx</code></em>);</pre> <p>Reads key from a file</p> <div class="refsect3"> <a name="xmlSecNssAppKeyLoadSECItem.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>secItem</p></td> <td class="parameter_description"><p>the pointer to sec item.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>the key format.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwd</p></td> <td class="parameter_description"><p>the key password.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwdCallback</p></td> <td class="parameter_description"><p>the key password callback.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwdCallbackCtx</p></td> <td class="parameter_description"><p>the user context for password callback.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppKeyLoadSECItem.returns"></a><h4>Returns</h4> <p> pointer to the key or NULL if an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppPkcs12Load"></a><h3>xmlSecNssAppPkcs12Load ()</h3> <pre class="programlisting"><a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="returnvalue">xmlSecKeyPtr</span></a> xmlSecNssAppPkcs12Load (<em class="parameter"><code>const <font><span class="type">char</span></font> *filename</code></em>, <em class="parameter"><code>const <font><span class="type">char</span></font> *pwd</code></em>, <em class="parameter"><code><font><span class="type">void</span></font> *pwdCallback</code></em>, <em class="parameter"><code><font><span class="type">void</span></font> *pwdCallbackCtx</code></em>);</pre> <p>Reads key and all associated certificates from the PKCS12 file. For uniformity, call <em class="parameter"><code>xmlSecNssAppKeyLoadEx</code></em> instead of this function. Pass in format=xmlSecKeyDataFormatPkcs12.</p> <div class="refsect3"> <a name="xmlSecNssAppPkcs12Load.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>filename</p></td> <td class="parameter_description"><p>the PKCS12 key filename.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwd</p></td> <td class="parameter_description"><p>the PKCS12 file password.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwdCallback</p></td> <td class="parameter_description"><p>the password callback.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwdCallbackCtx</p></td> <td class="parameter_description"><p>the user context for password callback.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppPkcs12Load.returns"></a><h4>Returns</h4> <p> pointer to the key or NULL if an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppPkcs12LoadMemory"></a><h3>xmlSecNssAppPkcs12LoadMemory ()</h3> <pre class="programlisting"><a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="returnvalue">xmlSecKeyPtr</span></a> xmlSecNssAppPkcs12LoadMemory (<em class="parameter"><code>const <a class="link" href="xmlsec-xmlsec.html#xmlSecByte" title="xmlSecByte"><span class="type">xmlSecByte</span></a> *data</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-xmlsec.html#xmlSecSize" title="xmlSecSize"><span class="type">xmlSecSize</span></a> dataSize</code></em>, <em class="parameter"><code>const <font><span class="type">char</span></font> *pwd</code></em>, <em class="parameter"><code><font><span class="type">void</span></font> *pwdCallback</code></em>, <em class="parameter"><code><font><span class="type">void</span></font> *pwdCallbackCtx</code></em>);</pre> <p>Reads key and all associated certificates from the PKCS12 binary data. For uniformity, call <em class="parameter"><code>xmlSecNssAppKeyLoadEx</code></em> instead of this function. Pass in format=xmlSecKeyDataFormatPkcs12.</p> <div class="refsect3"> <a name="xmlSecNssAppPkcs12LoadMemory.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>data</p></td> <td class="parameter_description"><p>the key binary data.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>dataSize</p></td> <td class="parameter_description"><p>the key binary data size.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwd</p></td> <td class="parameter_description"><p>the PKCS12 password.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwdCallback</p></td> <td class="parameter_description"><p>the password callback.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwdCallbackCtx</p></td> <td class="parameter_description"><p>the user context for password callback.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppPkcs12LoadMemory.returns"></a><h4>Returns</h4> <p> pointer to the key or NULL if an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppPkcs12LoadSECItem"></a><h3>xmlSecNssAppPkcs12LoadSECItem ()</h3> <pre class="programlisting"><a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="returnvalue">xmlSecKeyPtr</span></a> xmlSecNssAppPkcs12LoadSECItem (<em class="parameter"><code><font><span class="type">SECItem</span></font> *secItem</code></em>, <em class="parameter"><code>const <font><span class="type">char</span></font> *pwd</code></em>, <em class="parameter"><code><font><span class="type">void</span></font> *pwdCallback</code></em>, <em class="parameter"><code><font><span class="type">void</span></font> *pwdCallbackCtx</code></em>);</pre> <p>Reads key and all associated certificates from the PKCS12 SECItem. For uniformity, call <em class="parameter"><code>xmlSecNssAppKeyLoadEx</code></em> instead of this function. Pass in format=xmlSecKeyDataFormatPkcs12.</p> <div class="refsect3"> <a name="xmlSecNssAppPkcs12LoadSECItem.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>secItem</p></td> <td class="parameter_description"><p>the <em class="parameter"><code>SECItem</code></em> object.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwd</p></td> <td class="parameter_description"><p>the PKCS12 file password.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwdCallback</p></td> <td class="parameter_description"><p>the password callback.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pwdCallbackCtx</p></td> <td class="parameter_description"><p>the user context for password callback.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppPkcs12LoadSECItem.returns"></a><h4>Returns</h4> <p> pointer to the key or NULL if an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppKeyCertLoad"></a><h3>xmlSecNssAppKeyCertLoad ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecNssAppKeyCertLoad (<em class="parameter"><code><a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="type">xmlSecKeyPtr</span></a> key</code></em>, <em class="parameter"><code>const <font><span class="type">char</span></font> *filename</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataFormat" title="enum xmlSecKeyDataFormat"><span class="type">xmlSecKeyDataFormat</span></a> format</code></em>);</pre> <p>Reads the certificate from $<em class="parameter"><code>filename</code></em> and adds it to key</p> <div class="refsect3"> <a name="xmlSecNssAppKeyCertLoad.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>key</p></td> <td class="parameter_description"><p>the pointer to key.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>filename</p></td> <td class="parameter_description"><p>the certificate filename.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>the certificate file format.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppKeyCertLoad.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppKeyCertLoadMemory"></a><h3>xmlSecNssAppKeyCertLoadMemory ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecNssAppKeyCertLoadMemory (<em class="parameter"><code><a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="type">xmlSecKeyPtr</span></a> key</code></em>, <em class="parameter"><code>const <a class="link" href="xmlsec-xmlsec.html#xmlSecByte" title="xmlSecByte"><span class="type">xmlSecByte</span></a> *data</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-xmlsec.html#xmlSecSize" title="xmlSecSize"><span class="type">xmlSecSize</span></a> dataSize</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataFormat" title="enum xmlSecKeyDataFormat"><span class="type">xmlSecKeyDataFormat</span></a> format</code></em>);</pre> <p>Reads the certificate from <em class="parameter"><code>data</code></em> and adds it to key</p> <div class="refsect3"> <a name="xmlSecNssAppKeyCertLoadMemory.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>key</p></td> <td class="parameter_description"><p>the pointer to key.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>data</p></td> <td class="parameter_description"><p>the key binary data.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>dataSize</p></td> <td class="parameter_description"><p>the key binary data size.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>the certificate format.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppKeyCertLoadMemory.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppKeyCertLoadSECItem"></a><h3>xmlSecNssAppKeyCertLoadSECItem ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecNssAppKeyCertLoadSECItem (<em class="parameter"><code><a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="type">xmlSecKeyPtr</span></a> key</code></em>, <em class="parameter"><code><font><span class="type">SECItem</span></font> *secItem</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataFormat" title="enum xmlSecKeyDataFormat"><span class="type">xmlSecKeyDataFormat</span></a> format</code></em>);</pre> <p>Reads the certificate from <em class="parameter"><code>secItem</code></em> and adds it to key</p> <div class="refsect3"> <a name="xmlSecNssAppKeyCertLoadSECItem.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>key</p></td> <td class="parameter_description"><p>the pointer to key.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>secItem</p></td> <td class="parameter_description"><p>the pointer to SECItem.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>the certificate format.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppKeyCertLoadSECItem.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppKeyFromCertLoadSECItem"></a><h3>xmlSecNssAppKeyFromCertLoadSECItem ()</h3> <pre class="programlisting"><a class="link" href="xmlsec-keys.html#xmlSecKey" title="struct xmlSecKey"><span class="returnvalue">xmlSecKeyPtr</span></a> xmlSecNssAppKeyFromCertLoadSECItem (<em class="parameter"><code><font><span class="type">SECItem</span></font> *secItem</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataFormat" title="enum xmlSecKeyDataFormat"><span class="type">xmlSecKeyDataFormat</span></a> format</code></em>);</pre> <p>Loads public key from cert.</p> <div class="refsect3"> <a name="xmlSecNssAppKeyFromCertLoadSECItem.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> <col> </colgroup> <tbody> <tr> <td class="parameter_name"><p>secItem</p></td> <td class="parameter_description"><p>the <em class="parameter"><code>SECItem</code></em> object.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>the cert format.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecNssAppKeyFromCertLoadSECItem.returns"></a><h4>Returns</h4> <p> pointer to key or NULL if an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecNssAppGetDefaultPwdCallback"></a><h3>xmlSecNssAppGetDefaultPwdCallback ()</h3> <pre class="programlisting"><font><span class="returnvalue">void</span></font> * xmlSecNssAppGetDefaultPwdCallback (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> <p>Gets default password callback.</p> <div class="refsect3"> <a name="xmlSecNssAppGetDefaultPwdCallback.returns"></a><h4>Returns</h4> <p> default password callback.</p> </div> </div> </div> </div> <div class="footer"> <hr>Generated by GTK-Doc V1.34.0</div> </body> </html>