/
githubmirror
/
xmlsec
Обзор
Документация
Войти
/
githubmirror
/
xmlsec
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
1.3.8
docs/api/xmlsec-openssl-x509.html
844 строки
37 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>x509: 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-openssl-ref.html" title="XML Security Library for OpenSLL API Reference."> <link rel="prev" href="xmlsec-openssl-evp.html" title="evp"> <link rel="next" href="xmlsec-gnutls-ref.html" title="XML Security Library for GnuTLS API Reference."> <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-openssl-x509.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-openssl-ref.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> <td><a accesskey="p" href="xmlsec-openssl-evp.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> <td><a accesskey="n" href="xmlsec-gnutls-ref.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> </tr></table> <div class="refentry"> <a name="xmlsec-openssl-x509"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2><span class="refentrytitle"><a name="xmlsec-openssl-x509.top_of_page"></a>x509</span></h2> <p>x509 — X509 certificates implementation for OpenSSL.</p> </td> <td class="gallery_image" valign="top" align="right"></td> </tr></table></div> <div class="refsect1"> <a name="xmlsec-openssl-x509.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-openssl-x509.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">xmlSecKeyDataId</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-openssl-x509.html#xmlSecOpenSSLKeyDataX509GetKlass" title="xmlSecOpenSSLKeyDataX509GetKlass ()">xmlSecOpenSSLKeyDataX509GetKlass</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">X509</span></font> * </td> <td class="function_name"> <a class="link" href="xmlsec-openssl-x509.html#xmlSecOpenSSLKeyDataX509GetKeyCert" title="xmlSecOpenSSLKeyDataX509GetKeyCert ()">xmlSecOpenSSLKeyDataX509GetKeyCert</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-openssl-x509.html#xmlSecOpenSSLKeyDataX509AdoptKeyCert" title="xmlSecOpenSSLKeyDataX509AdoptKeyCert ()">xmlSecOpenSSLKeyDataX509AdoptKeyCert</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-openssl-x509.html#xmlSecOpenSSLKeyDataX509AdoptCert" title="xmlSecOpenSSLKeyDataX509AdoptCert ()">xmlSecOpenSSLKeyDataX509AdoptCert</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">X509</span></font> * </td> <td class="function_name"> <a class="link" href="xmlsec-openssl-x509.html#xmlSecOpenSSLKeyDataX509GetCert" title="xmlSecOpenSSLKeyDataX509GetCert ()">xmlSecOpenSSLKeyDataX509GetCert</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="xmlsec-xmlsec.html#xmlSecSize" title="xmlSecSize"><span class="returnvalue">xmlSecSize</span></a> </td> <td class="function_name"> <a class="link" href="xmlsec-openssl-x509.html#xmlSecOpenSSLKeyDataX509GetCertsSize" title="xmlSecOpenSSLKeyDataX509GetCertsSize ()">xmlSecOpenSSLKeyDataX509GetCertsSize</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-openssl-x509.html#xmlSecOpenSSLKeyDataX509AdoptCrl" title="xmlSecOpenSSLKeyDataX509AdoptCrl ()">xmlSecOpenSSLKeyDataX509AdoptCrl</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">X509_CRL</span></font> * </td> <td class="function_name"> <a class="link" href="xmlsec-openssl-x509.html#xmlSecOpenSSLKeyDataX509GetCrl" title="xmlSecOpenSSLKeyDataX509GetCrl ()">xmlSecOpenSSLKeyDataX509GetCrl</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="xmlsec-xmlsec.html#xmlSecSize" title="xmlSecSize"><span class="returnvalue">xmlSecSize</span></a> </td> <td class="function_name"> <a class="link" href="xmlsec-openssl-x509.html#xmlSecOpenSSLKeyDataX509GetCrlsSize" title="xmlSecOpenSSLKeyDataX509GetCrlsSize ()">xmlSecOpenSSLKeyDataX509GetCrlsSize</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="xmlsec-keysdata.html#xmlSecKeyData" title="struct xmlSecKeyData"><span class="returnvalue">xmlSecKeyDataPtr</span></a> </td> <td class="function_name"> <a class="link" href="xmlsec-openssl-x509.html#xmlSecOpenSSLX509CertGetKey" title="xmlSecOpenSSLX509CertGetKey ()">xmlSecOpenSSLX509CertGetKey</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">xmlSecKeyDataId</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-openssl-x509.html#xmlSecOpenSSLKeyDataRawX509CertGetKlass" title="xmlSecOpenSSLKeyDataRawX509CertGetKlass ()">xmlSecOpenSSLKeyDataRawX509CertGetKlass</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">xmlSecKeyDataStoreId</span></font> </td> <td class="function_name"> <a class="link" href="xmlsec-openssl-x509.html#xmlSecOpenSSLX509StoreGetKlass" title="xmlSecOpenSSLX509StoreGetKlass ()">xmlSecOpenSSLX509StoreGetKlass</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <font><span class="returnvalue">X509</span></font> * </td> <td class="function_name"> <a class="link" href="xmlsec-openssl-x509.html#xmlSecOpenSSLX509StoreVerify" title="xmlSecOpenSSLX509StoreVerify ()">xmlSecOpenSSLX509StoreVerify</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-openssl-x509.html#xmlSecOpenSSLX509StoreVerifyKey" title="xmlSecOpenSSLX509StoreVerifyKey ()">xmlSecOpenSSLX509StoreVerifyKey</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-openssl-x509.html#xmlSecOpenSSLX509StoreAdoptCert" title="xmlSecOpenSSLX509StoreAdoptCert ()">xmlSecOpenSSLX509StoreAdoptCert</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-openssl-x509.html#xmlSecOpenSSLX509StoreAdoptCrl" title="xmlSecOpenSSLX509StoreAdoptCrl ()">xmlSecOpenSSLX509StoreAdoptCrl</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-openssl-x509.html#xmlSecOpenSSLX509StoreAddCertsPath" title="xmlSecOpenSSLX509StoreAddCertsPath ()">xmlSecOpenSSLX509StoreAddCertsPath</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-openssl-x509.html#xmlSecOpenSSLX509StoreAddCertsFile" title="xmlSecOpenSSLX509StoreAddCertsFile ()">xmlSecOpenSSLX509StoreAddCertsFile</a> <span class="c_punctuation">()</span> </td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="xmlsec-openssl-x509.other"></a><h2>Types and Values</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col> <col> </colgroup> <tbody> <tr> <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="xmlsec-openssl-x509.html#XMLSEC-STACK-OF-X509:CAPS" title="XMLSEC_STACK_OF_X509">XMLSEC_STACK_OF_X509</a></td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="xmlsec-openssl-x509.html#XMLSEC-STACK-OF-X509-CRL:CAPS" title="XMLSEC_STACK_OF_X509_CRL">XMLSEC_STACK_OF_X509_CRL</a></td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="xmlsec-openssl-x509.html#xmlSecOpenSSLKeyDataX509Id" title="xmlSecOpenSSLKeyDataX509Id">xmlSecOpenSSLKeyDataX509Id</a></td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="xmlsec-openssl-x509.html#xmlSecOpenSSLKeyDataRawX509CertId" title="xmlSecOpenSSLKeyDataRawX509CertId">xmlSecOpenSSLKeyDataRawX509CertId</a></td> </tr> <tr> <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="xmlsec-openssl-x509.html#xmlSecOpenSSLX509StoreId" title="xmlSecOpenSSLX509StoreId">xmlSecOpenSSLX509StoreId</a></td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="xmlsec-openssl-x509.description"></a><h2>Description</h2> <p></p> </div> <div class="refsect1"> <a name="xmlsec-openssl-x509.functions_details"></a><h2>Functions</h2> <div class="refsect2"> <a name="xmlSecOpenSSLKeyDataX509GetKlass"></a><h3>xmlSecOpenSSLKeyDataX509GetKlass ()</h3> <pre class="programlisting"><font><span class="returnvalue">xmlSecKeyDataId</span></font> xmlSecOpenSSLKeyDataX509GetKlass (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> <p>The OpenSSL X509 key data klass (http://www.w3.org/TR/xmldsig-core/<font><span class="type">sec-X509Data</span></font>).</p> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509GetKlass.returns"></a><h4>Returns</h4> <p> the X509 data klass.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLKeyDataX509GetKeyCert"></a><h3>xmlSecOpenSSLKeyDataX509GetKeyCert ()</h3> <pre class="programlisting"><font><span class="returnvalue">X509</span></font> * xmlSecOpenSSLKeyDataX509GetKeyCert (<em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyData" title="struct xmlSecKeyData"><span class="type">xmlSecKeyDataPtr</span></a> data</code></em>);</pre> <p>Gets the certificate from which the key was extracted.</p> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509GetKeyCert.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 pointer to X509 key data.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509GetKeyCert.returns"></a><h4>Returns</h4> <p> the key's certificate or NULL if key data was not used for key extraction or an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLKeyDataX509AdoptKeyCert"></a><h3>xmlSecOpenSSLKeyDataX509AdoptKeyCert ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecOpenSSLKeyDataX509AdoptKeyCert (<em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyData" title="struct xmlSecKeyData"><span class="type">xmlSecKeyDataPtr</span></a> data</code></em>, <em class="parameter"><code><font><span class="type">X509</span></font> *cert</code></em>);</pre> <p>Adds certificate to the X509 key data and sets the it as the key's certificate in <em class="parameter"><code>data</code></em> . On success, the <em class="parameter"><code>data</code></em> owns the cert. This function DOES NOT check if the key matches the key cert (use <em class="parameter"><code>xmlSecOpenSSLAppKeyCertLoadBIO</code></em> that performs this check).</p> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509AdoptKeyCert.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 pointer to X509 key data.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>cert</p></td> <td class="parameter_description"><p>the pointer to OpenSSL X509 certificate.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509AdoptKeyCert.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value if an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLKeyDataX509AdoptCert"></a><h3>xmlSecOpenSSLKeyDataX509AdoptCert ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecOpenSSLKeyDataX509AdoptCert (<em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyData" title="struct xmlSecKeyData"><span class="type">xmlSecKeyDataPtr</span></a> data</code></em>, <em class="parameter"><code><font><span class="type">X509</span></font> *cert</code></em>);</pre> <p>Adds certificate to the X509 key data. On success, the <em class="parameter"><code>data</code></em> owns the cert.</p> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509AdoptCert.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 pointer to X509 key data.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>cert</p></td> <td class="parameter_description"><p>the pointer to OpenSSL X509 certificate.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509AdoptCert.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value if an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLKeyDataX509GetCert"></a><h3>xmlSecOpenSSLKeyDataX509GetCert ()</h3> <pre class="programlisting"><font><span class="returnvalue">X509</span></font> * xmlSecOpenSSLKeyDataX509GetCert (<em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyData" title="struct xmlSecKeyData"><span class="type">xmlSecKeyDataPtr</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> pos</code></em>);</pre> <p>Gets a certificate from X509 key data.</p> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509GetCert.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 pointer to X509 key data.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pos</p></td> <td class="parameter_description"><p>the desired certificate position.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509GetCert.returns"></a><h4>Returns</h4> <p> the pointer to certificate or NULL if <em class="parameter"><code>pos</code></em> is larger than the number of certificates in <em class="parameter"><code>data</code></em> or an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLKeyDataX509GetCertsSize"></a><h3>xmlSecOpenSSLKeyDataX509GetCertsSize ()</h3> <pre class="programlisting"><a class="link" href="xmlsec-xmlsec.html#xmlSecSize" title="xmlSecSize"><span class="returnvalue">xmlSecSize</span></a> xmlSecOpenSSLKeyDataX509GetCertsSize (<em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyData" title="struct xmlSecKeyData"><span class="type">xmlSecKeyDataPtr</span></a> data</code></em>);</pre> <p>Gets the number of certificates in <em class="parameter"><code>data</code></em> .</p> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509GetCertsSize.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 pointer to X509 key data.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509GetCertsSize.returns"></a><h4>Returns</h4> <p> te number of certificates in <em class="parameter"><code>data</code></em> .</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLKeyDataX509AdoptCrl"></a><h3>xmlSecOpenSSLKeyDataX509AdoptCrl ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecOpenSSLKeyDataX509AdoptCrl (<em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyData" title="struct xmlSecKeyData"><span class="type">xmlSecKeyDataPtr</span></a> data</code></em>, <em class="parameter"><code><font><span class="type">X509_CRL</span></font> *crl</code></em>);</pre> <p>Adds CRL to the X509 key data.</p> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509AdoptCrl.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 pointer to X509 key data.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>crl</p></td> <td class="parameter_description"><p>the pointer to OpenSSL X509 CRL.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509AdoptCrl.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value if an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLKeyDataX509GetCrl"></a><h3>xmlSecOpenSSLKeyDataX509GetCrl ()</h3> <pre class="programlisting"><font><span class="returnvalue">X509_CRL</span></font> * xmlSecOpenSSLKeyDataX509GetCrl (<em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyData" title="struct xmlSecKeyData"><span class="type">xmlSecKeyDataPtr</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> pos</code></em>);</pre> <p>Gets a CRL from X509 key data.</p> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509GetCrl.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 pointer to X509 key data.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>pos</p></td> <td class="parameter_description"><p>the desired CRL position.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509GetCrl.returns"></a><h4>Returns</h4> <p> the pointer to CRL or NULL if <em class="parameter"><code>pos</code></em> is larger than the number of CRLs in <em class="parameter"><code>data</code></em> or an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLKeyDataX509GetCrlsSize"></a><h3>xmlSecOpenSSLKeyDataX509GetCrlsSize ()</h3> <pre class="programlisting"><a class="link" href="xmlsec-xmlsec.html#xmlSecSize" title="xmlSecSize"><span class="returnvalue">xmlSecSize</span></a> xmlSecOpenSSLKeyDataX509GetCrlsSize (<em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyData" title="struct xmlSecKeyData"><span class="type">xmlSecKeyDataPtr</span></a> data</code></em>);</pre> <p>Gets the number of CRLs in <em class="parameter"><code>data</code></em> .</p> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509GetCrlsSize.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 pointer to X509 key data.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataX509GetCrlsSize.returns"></a><h4>Returns</h4> <p> te number of CRLs in <em class="parameter"><code>data</code></em> .</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLX509CertGetKey"></a><h3>xmlSecOpenSSLX509CertGetKey ()</h3> <pre class="programlisting"><a class="link" href="xmlsec-keysdata.html#xmlSecKeyData" title="struct xmlSecKeyData"><span class="returnvalue">xmlSecKeyDataPtr</span></a> xmlSecOpenSSLX509CertGetKey (<em class="parameter"><code><font><span class="type">X509</span></font> *cert</code></em>);</pre> <p>Extracts public key from the <em class="parameter"><code>cert</code></em> .</p> <div class="refsect3"> <a name="xmlSecOpenSSLX509CertGetKey.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>cert</p></td> <td class="parameter_description"><p>the certificate.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecOpenSSLX509CertGetKey.returns"></a><h4>Returns</h4> <p> public key value or NULL if an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLKeyDataRawX509CertGetKlass"></a><h3>xmlSecOpenSSLKeyDataRawX509CertGetKlass ()</h3> <pre class="programlisting"><font><span class="returnvalue">xmlSecKeyDataId</span></font> xmlSecOpenSSLKeyDataRawX509CertGetKlass (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> <p>The raw X509 certificates key data klass.</p> <div class="refsect3"> <a name="xmlSecOpenSSLKeyDataRawX509CertGetKlass.returns"></a><h4>Returns</h4> <p> raw X509 certificates key data klass.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLX509StoreGetKlass"></a><h3>xmlSecOpenSSLX509StoreGetKlass ()</h3> <pre class="programlisting"><font><span class="returnvalue">xmlSecKeyDataStoreId</span></font> xmlSecOpenSSLX509StoreGetKlass (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> <p>The OpenSSL X509 certificates key data store klass.</p> <div class="refsect3"> <a name="xmlSecOpenSSLX509StoreGetKlass.returns"></a><h4>Returns</h4> <p> pointer to OpenSSL X509 certificates key data store klass.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLX509StoreVerify"></a><h3>xmlSecOpenSSLX509StoreVerify ()</h3> <pre class="programlisting"><font><span class="returnvalue">X509</span></font> * xmlSecOpenSSLX509StoreVerify (<em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataStore" title="struct xmlSecKeyDataStore"><span class="type">xmlSecKeyDataStorePtr</span></a> store</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-openssl-x509.html#XMLSEC-STACK-OF-X509:CAPS" title="XMLSEC_STACK_OF_X509"><span class="type">XMLSEC_STACK_OF_X509</span></a> *certs</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-openssl-x509.html#XMLSEC-STACK-OF-X509-CRL:CAPS" title="XMLSEC_STACK_OF_X509_CRL"><span class="type">XMLSEC_STACK_OF_X509_CRL</span></a> *crls</code></em>, <em class="parameter"><code><a class="link" href="xmlsec-keyinfo.html#xmlSecKeyInfoCtx" title="struct xmlSecKeyInfoCtx"><span class="type">xmlSecKeyInfoCtx</span></a> *keyInfoCtx</code></em>);</pre> <div class="warning"><p><code class="literal">xmlSecOpenSSLX509StoreVerify</code> is deprecated and should not be used in newly-written code.</p></div> <p>Verifies <em class="parameter"><code>certs</code></em> list.</p> <div class="refsect3"> <a name="xmlSecOpenSSLX509StoreVerify.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>store</p></td> <td class="parameter_description"><p>the pointer to X509 key data store klass.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>certs</p></td> <td class="parameter_description"><p>the untrusted certificates stack.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>crls</p></td> <td class="parameter_description"><p>the crls stack.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>keyInfoCtx</p></td> <td class="parameter_description"><p>the pointer to <a class="ulink" href="" target="_top"><dsig:KeyInfo/></a> element processing context.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecOpenSSLX509StoreVerify.returns"></a><h4>Returns</h4> <p> pointer to the first verified certificate from <em class="parameter"><code>certs</code></em> .</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLX509StoreVerifyKey"></a><h3>xmlSecOpenSSLX509StoreVerifyKey ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecOpenSSLX509StoreVerifyKey (<em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataStore" title="struct xmlSecKeyDataStore"><span class="type">xmlSecKeyDataStorePtr</span></a> store</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="xmlSecOpenSSLX509StoreVerifyKey.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>store</p></td> <td class="parameter_description"><p>the pointer to X509 key data store klass.</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="xmlSecOpenSSLX509StoreVerifyKey.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="xmlSecOpenSSLX509StoreAdoptCert"></a><h3>xmlSecOpenSSLX509StoreAdoptCert ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecOpenSSLX509StoreAdoptCert (<em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataStore" title="struct xmlSecKeyDataStore"><span class="type">xmlSecKeyDataStorePtr</span></a> store</code></em>, <em class="parameter"><code><font><span class="type">X509</span></font> *cert</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>Adds trusted (root) or untrusted certificate to the store.</p> <div class="refsect3"> <a name="xmlSecOpenSSLX509StoreAdoptCert.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>store</p></td> <td class="parameter_description"><p>the pointer to X509 key data store klass.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>cert</p></td> <td class="parameter_description"><p>the pointer to OpenSSL X509 certificate.</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="xmlSecOpenSSLX509StoreAdoptCert.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value if an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLX509StoreAdoptCrl"></a><h3>xmlSecOpenSSLX509StoreAdoptCrl ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecOpenSSLX509StoreAdoptCrl (<em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataStore" title="struct xmlSecKeyDataStore"><span class="type">xmlSecKeyDataStorePtr</span></a> store</code></em>, <em class="parameter"><code><font><span class="type">X509_CRL</span></font> *crl</code></em>);</pre> <p>Adds X509 CRL to the store.</p> <div class="refsect3"> <a name="xmlSecOpenSSLX509StoreAdoptCrl.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>store</p></td> <td class="parameter_description"><p>the pointer to X509 key data store klass.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>crl</p></td> <td class="parameter_description"><p>the pointer to OpenSSL X509_CRL.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecOpenSSLX509StoreAdoptCrl.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value if an error occurs.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLX509StoreAddCertsPath"></a><h3>xmlSecOpenSSLX509StoreAddCertsPath ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecOpenSSLX509StoreAddCertsPath (<em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataStore" title="struct xmlSecKeyDataStore"><span class="type">xmlSecKeyDataStorePtr</span></a> store</code></em>, <em class="parameter"><code>const <font><span class="type">char</span></font> *path</code></em>);</pre> <p>Adds all certs in the <em class="parameter"><code>path</code></em> to the list of trusted certs in <em class="parameter"><code>store</code></em> .</p> <div class="refsect3"> <a name="xmlSecOpenSSLX509StoreAddCertsPath.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>store</p></td> <td class="parameter_description"><p>the pointer to OpenSSL x509 store.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>path</p></td> <td class="parameter_description"><p>the path to the certs dir.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecOpenSSLX509StoreAddCertsPath.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLX509StoreAddCertsFile"></a><h3>xmlSecOpenSSLX509StoreAddCertsFile ()</h3> <pre class="programlisting"><font><span class="returnvalue">int</span></font> xmlSecOpenSSLX509StoreAddCertsFile (<em class="parameter"><code><a class="link" href="xmlsec-keysdata.html#xmlSecKeyDataStore" title="struct xmlSecKeyDataStore"><span class="type">xmlSecKeyDataStorePtr</span></a> store</code></em>, <em class="parameter"><code>const <font><span class="type">char</span></font> *filename</code></em>);</pre> <p>Adds all certs in <em class="parameter"><code>file</code></em> to the list of trusted certs in <em class="parameter"><code>store</code></em> . It is possible for <em class="parameter"><code>file</code></em> to contain multiple certs.</p> <div class="refsect3"> <a name="xmlSecOpenSSLX509StoreAddCertsFile.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>store</p></td> <td class="parameter_description"><p>the pointer to OpenSSL x509 store.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>filename</p></td> <td class="parameter_description"><p>the certs file.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="xmlSecOpenSSLX509StoreAddCertsFile.returns"></a><h4>Returns</h4> <p> 0 on success or a negative value otherwise.</p> </div> </div> </div> <div class="refsect1"> <a name="xmlsec-openssl-x509.other_details"></a><h2>Types and Values</h2> <div class="refsect2"> <a name="XMLSEC-STACK-OF-X509:CAPS"></a><h3>XMLSEC_STACK_OF_X509</h3> <pre class="programlisting">#define XMLSEC_STACK_OF_X509 STACK_OF(X509) </pre> <p>Macro. To make docbook happy.</p> </div> <hr> <div class="refsect2"> <a name="XMLSEC-STACK-OF-X509-CRL:CAPS"></a><h3>XMLSEC_STACK_OF_X509_CRL</h3> <pre class="programlisting">#define XMLSEC_STACK_OF_X509_CRL STACK_OF(X509_CRL) </pre> <p>Macro. To make docbook happy.</p> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLKeyDataX509Id"></a><h3>xmlSecOpenSSLKeyDataX509Id</h3> <pre class="programlisting">#define xmlSecOpenSSLKeyDataX509Id</pre> <p>The OpenSSL X509 data klass.</p> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLKeyDataRawX509CertId"></a><h3>xmlSecOpenSSLKeyDataRawX509CertId</h3> <pre class="programlisting">#define xmlSecOpenSSLKeyDataRawX509CertId</pre> <p>The OpenSSL raw X509 certificate klass.</p> </div> <hr> <div class="refsect2"> <a name="xmlSecOpenSSLX509StoreId"></a><h3>xmlSecOpenSSLX509StoreId</h3> <pre class="programlisting">#define xmlSecOpenSSLX509StoreId</pre> <p>The OpenSSL X509 store klass.</p> </div> </div> </div> <div class="footer"> <hr>Generated by GTK-Doc V1.34.0</div> </body> </html>