<refentry id="xmlsec-openssl-x509">
<refmeta>
<refentrytitle role="top_of_page" id="xmlsec-openssl-x509.top_of_page">x509</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>XMLSEC-OPENSSL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>x509</refname>
<refpurpose>X509 certificates support implementation for OpenSSL.</refpurpose>
</refnamediv>

<refsynopsisdiv id="xmlsec-openssl-x509.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
#define             <link linkend="XMLSEC-STACK-OF-X509--CAPS">XMLSEC_STACK_OF_X509</link>
#define             <link linkend="XMLSEC-STACK-OF-X509-CRL--CAPS">XMLSEC_STACK_OF_X509_CRL</link>
#define             <link linkend="xmlSecOpenSSLKeyDataX509Id">xmlSecOpenSSLKeyDataX509Id</link>
<link linkend="xmlSecKeyDataId">xmlSecKeyDataId</link>     <link linkend="xmlSecOpenSSLKeyDataX509GetKlass">xmlSecOpenSSLKeyDataX509GetKlass</link>    (void);
<link linkend="X509--CAPS">X509</link>*               <link linkend="xmlSecOpenSSLKeyDataX509GetKeyCert">xmlSecOpenSSLKeyDataX509GetKeyCert</link>  (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data);
<link linkend="int">int</link>                 <link linkend="xmlSecOpenSSLKeyDataX509AdoptKeyCert">xmlSecOpenSSLKeyDataX509AdoptKeyCert</link>
                                                        (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="X509--CAPS">X509</link> *cert);
<link linkend="int">int</link>                 <link linkend="xmlSecOpenSSLKeyDataX509AdoptCert">xmlSecOpenSSLKeyDataX509AdoptCert</link>   (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="X509--CAPS">X509</link> *cert);
<link linkend="X509--CAPS">X509</link>*               <link linkend="xmlSecOpenSSLKeyDataX509GetCert">xmlSecOpenSSLKeyDataX509GetCert</link>     (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="xmlSecSize">xmlSecSize</link> pos);
<link linkend="xmlSecSize">xmlSecSize</link>          <link linkend="xmlSecOpenSSLKeyDataX509GetCertsSize">xmlSecOpenSSLKeyDataX509GetCertsSize</link>
                                                        (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data);
<link linkend="int">int</link>                 <link linkend="xmlSecOpenSSLKeyDataX509AdoptCrl">xmlSecOpenSSLKeyDataX509AdoptCrl</link>    (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="X509-CRL--CAPS">X509_CRL</link> *crl);
<link linkend="X509-CRL--CAPS">X509_CRL</link>*           <link linkend="xmlSecOpenSSLKeyDataX509GetCrl">xmlSecOpenSSLKeyDataX509GetCrl</link>      (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="xmlSecSize">xmlSecSize</link> pos);
<link linkend="xmlSecSize">xmlSecSize</link>          <link linkend="xmlSecOpenSSLKeyDataX509GetCrlsSize">xmlSecOpenSSLKeyDataX509GetCrlsSize</link> (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data);
<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link>    <link linkend="xmlSecOpenSSLX509CertGetKey">xmlSecOpenSSLX509CertGetKey</link>         (<link linkend="X509--CAPS">X509</link> *cert);
#define             <link linkend="xmlSecOpenSSLKeyDataRawX509CertId">xmlSecOpenSSLKeyDataRawX509CertId</link>
<link linkend="xmlSecKeyDataId">xmlSecKeyDataId</link>     <link linkend="xmlSecOpenSSLKeyDataRawX509CertGetKlass">xmlSecOpenSSLKeyDataRawX509CertGetKlass</link>
                                                        (void);
#define             <link linkend="xmlSecOpenSSLX509StoreId">xmlSecOpenSSLX509StoreId</link>
<link linkend="xmlSecKeyDataStoreId">xmlSecKeyDataStoreId</link>  <link linkend="xmlSecOpenSSLX509StoreGetKlass">xmlSecOpenSSLX509StoreGetKlass</link>    (void);
<link linkend="X509--CAPS">X509</link>*               <link linkend="xmlSecOpenSSLX509StoreFindCert">xmlSecOpenSSLX509StoreFindCert</link>      (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         <link linkend="xmlChar">xmlChar</link> *subjectName,
                                                         <link linkend="xmlChar">xmlChar</link> *issuerName,
                                                         <link linkend="xmlChar">xmlChar</link> *issuerSerial,
                                                         <link linkend="xmlChar">xmlChar</link> *ski,
                                                         <link linkend="xmlSecKeyInfoCtx">xmlSecKeyInfoCtx</link> *keyInfoCtx);
<link linkend="X509--CAPS">X509</link>*               <link linkend="xmlSecOpenSSLX509StoreVerify">xmlSecOpenSSLX509StoreVerify</link>        (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         <link linkend="XMLSEC-STACK-OF-X509--CAPS">XMLSEC_STACK_OF_X509</link> *certs,
                                                         <link linkend="XMLSEC-STACK-OF-X509-CRL--CAPS">XMLSEC_STACK_OF_X509_CRL</link> *crls,
                                                         <link linkend="xmlSecKeyInfoCtx">xmlSecKeyInfoCtx</link> *keyInfoCtx);
<link linkend="int">int</link>                 <link linkend="xmlSecOpenSSLX509StoreAdoptCert">xmlSecOpenSSLX509StoreAdoptCert</link>     (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         <link linkend="X509--CAPS">X509</link> *cert,
                                                         <link linkend="xmlSecKeyDataType">xmlSecKeyDataType</link> type);
<link linkend="int">int</link>                 <link linkend="xmlSecOpenSSLX509StoreAdoptCrl">xmlSecOpenSSLX509StoreAdoptCrl</link>      (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         <link linkend="X509-CRL--CAPS">X509_CRL</link> *crl);
<link linkend="int">int</link>                 <link linkend="xmlSecOpenSSLX509StoreAddCertsPath">xmlSecOpenSSLX509StoreAddCertsPath</link>  (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         const <link linkend="char">char</link> *path);
<link linkend="int">int</link>                 <link linkend="xmlSecOpenSSLX509StoreAddCertsFile">xmlSecOpenSSLX509StoreAddCertsFile</link>  (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         const <link linkend="char">char</link> *file);
</synopsis>
</refsynopsisdiv>









<refsect1 id="xmlsec-openssl-x509.description" role="desc">
<title role="desc.title">Description</title>
<para>
X509 certificates support implementation for OpenSSL.
</para>
</refsect1>

<refsect1 id="xmlsec-openssl-x509.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="XMLSEC-STACK-OF-X509--CAPS" role="macro">
<title>XMLSEC_STACK_OF_X509</title>
<indexterm zone="XMLSEC-STACK-OF-X509--CAPS"><primary sortas="XMLSEC_STACK_OF_X509">XMLSEC_STACK_OF_X509</primary></indexterm><programlisting>#define XMLSEC_STACK_OF_X509            STACK_OF(X509)
</programlisting>
<para>
Macro. To make docbook happy.</para>
<para>
</para></refsect2>
<refsect2 id="XMLSEC-STACK-OF-X509-CRL--CAPS" role="macro">
<title>XMLSEC_STACK_OF_X509_CRL</title>
<indexterm zone="XMLSEC-STACK-OF-X509-CRL--CAPS"><primary sortas="XMLSEC_STACK_OF_X509_CRL">XMLSEC_STACK_OF_X509_CRL</primary></indexterm><programlisting>#define XMLSEC_STACK_OF_X509_CRL        STACK_OF(X509_CRL)
</programlisting>
<para>
Macro. To make docbook happy.</para>
<para>
</para></refsect2>
<refsect2 id="xmlSecOpenSSLKeyDataX509Id" role="macro">
<title>xmlSecOpenSSLKeyDataX509Id</title>
<indexterm zone="xmlSecOpenSSLKeyDataX509Id"><primary sortas="xmlSecOpenSSLKeyDataX509Id">xmlSecOpenSSLKeyDataX509Id</primary></indexterm><programlisting>#define             xmlSecOpenSSLKeyDataX509Id</programlisting>
<para>
The OpenSSL X509 data klass.</para>
<para>
</para></refsect2>
<refsect2 id="xmlSecOpenSSLKeyDataX509GetKlass" role="function">
<title>xmlSecOpenSSLKeyDataX509GetKlass ()</title>
<indexterm zone="xmlSecOpenSSLKeyDataX509GetKlass"><primary sortas="xmlSecOpenSSLKeyDataX509GetKlass">xmlSecOpenSSLKeyDataX509GetKlass</primary></indexterm><programlisting><link linkend="xmlSecKeyDataId">xmlSecKeyDataId</link>     xmlSecOpenSSLKeyDataX509GetKlass    (void);</programlisting>
<para>
The OpenSSL X509 key data klass (http://www.w3.org/TR/xmldsig-core/<link linkend="sec-X509Data"><type>sec-X509Data</type></link>).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the X509 data klass.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLKeyDataX509GetKeyCert" role="function">
<title>xmlSecOpenSSLKeyDataX509GetKeyCert ()</title>
<indexterm zone="xmlSecOpenSSLKeyDataX509GetKeyCert"><primary sortas="xmlSecOpenSSLKeyDataX509GetKeyCert">xmlSecOpenSSLKeyDataX509GetKeyCert</primary></indexterm><programlisting><link linkend="X509--CAPS">X509</link>*               xmlSecOpenSSLKeyDataX509GetKeyCert  (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data);</programlisting>
<para>
Gets the certificate from which the key was extracted.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara>               the pointer to X509 key data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the key's certificate or NULL if key data was not used for key
extraction or an error occurs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLKeyDataX509AdoptKeyCert" role="function">
<title>xmlSecOpenSSLKeyDataX509AdoptKeyCert ()</title>
<indexterm zone="xmlSecOpenSSLKeyDataX509AdoptKeyCert"><primary sortas="xmlSecOpenSSLKeyDataX509AdoptKeyCert">xmlSecOpenSSLKeyDataX509AdoptKeyCert</primary></indexterm><programlisting><link linkend="int">int</link>                 xmlSecOpenSSLKeyDataX509AdoptKeyCert
                                                        (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="X509--CAPS">X509</link> *cert);</programlisting>
<para>
Sets the key's certificate in <parameter>data</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara>               the pointer to X509 key data.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cert</parameter>&#160;:</term>
<listitem><simpara>               the pointer to OpenSSL X509 certificate.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> 0 on success or a negative value if an error occurs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLKeyDataX509AdoptCert" role="function">
<title>xmlSecOpenSSLKeyDataX509AdoptCert ()</title>
<indexterm zone="xmlSecOpenSSLKeyDataX509AdoptCert"><primary sortas="xmlSecOpenSSLKeyDataX509AdoptCert">xmlSecOpenSSLKeyDataX509AdoptCert</primary></indexterm><programlisting><link linkend="int">int</link>                 xmlSecOpenSSLKeyDataX509AdoptCert   (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="X509--CAPS">X509</link> *cert);</programlisting>
<para>
Adds certificate to the X509 key data.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara>               the pointer to X509 key data.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cert</parameter>&#160;:</term>
<listitem><simpara>               the pointer to OpenSSL X509 certificate.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> 0 on success or a negative value if an error occurs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLKeyDataX509GetCert" role="function">
<title>xmlSecOpenSSLKeyDataX509GetCert ()</title>
<indexterm zone="xmlSecOpenSSLKeyDataX509GetCert"><primary sortas="xmlSecOpenSSLKeyDataX509GetCert">xmlSecOpenSSLKeyDataX509GetCert</primary></indexterm><programlisting><link linkend="X509--CAPS">X509</link>*               xmlSecOpenSSLKeyDataX509GetCert     (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="xmlSecSize">xmlSecSize</link> pos);</programlisting>
<para>
Gets a certificate from X509 key data.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara>               the pointer to X509 key data.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pos</parameter>&#160;:</term>
<listitem><simpara>                the desired certificate position.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the pointer to certificate or NULL if <parameter>pos</parameter> is larger than the
number of certificates in <parameter>data</parameter> or an error occurs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLKeyDataX509GetCertsSize" role="function">
<title>xmlSecOpenSSLKeyDataX509GetCertsSize ()</title>
<indexterm zone="xmlSecOpenSSLKeyDataX509GetCertsSize"><primary sortas="xmlSecOpenSSLKeyDataX509GetCertsSize">xmlSecOpenSSLKeyDataX509GetCertsSize</primary></indexterm><programlisting><link linkend="xmlSecSize">xmlSecSize</link>          xmlSecOpenSSLKeyDataX509GetCertsSize
                                                        (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data);</programlisting>
<para>
Gets the number of certificates in <parameter>data</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara>               the pointer to X509 key data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> te number of certificates in <parameter>data</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLKeyDataX509AdoptCrl" role="function">
<title>xmlSecOpenSSLKeyDataX509AdoptCrl ()</title>
<indexterm zone="xmlSecOpenSSLKeyDataX509AdoptCrl"><primary sortas="xmlSecOpenSSLKeyDataX509AdoptCrl">xmlSecOpenSSLKeyDataX509AdoptCrl</primary></indexterm><programlisting><link linkend="int">int</link>                 xmlSecOpenSSLKeyDataX509AdoptCrl    (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="X509-CRL--CAPS">X509_CRL</link> *crl);</programlisting>
<para>
Adds CRL to the X509 key data.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara>               the pointer to X509 key data.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>crl</parameter>&#160;:</term>
<listitem><simpara>                the pointer to OpenSSL X509 CRL.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> 0 on success or a negative value if an error occurs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLKeyDataX509GetCrl" role="function">
<title>xmlSecOpenSSLKeyDataX509GetCrl ()</title>
<indexterm zone="xmlSecOpenSSLKeyDataX509GetCrl"><primary sortas="xmlSecOpenSSLKeyDataX509GetCrl">xmlSecOpenSSLKeyDataX509GetCrl</primary></indexterm><programlisting><link linkend="X509-CRL--CAPS">X509_CRL</link>*           xmlSecOpenSSLKeyDataX509GetCrl      (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="xmlSecSize">xmlSecSize</link> pos);</programlisting>
<para>
Gets a CRL from X509 key data.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara>               the pointer to X509 key data.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pos</parameter>&#160;:</term>
<listitem><simpara>                the desired CRL position.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the pointer to CRL or NULL if <parameter>pos</parameter> is larger than the
number of CRLs in <parameter>data</parameter> or an error occurs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLKeyDataX509GetCrlsSize" role="function">
<title>xmlSecOpenSSLKeyDataX509GetCrlsSize ()</title>
<indexterm zone="xmlSecOpenSSLKeyDataX509GetCrlsSize"><primary sortas="xmlSecOpenSSLKeyDataX509GetCrlsSize">xmlSecOpenSSLKeyDataX509GetCrlsSize</primary></indexterm><programlisting><link linkend="xmlSecSize">xmlSecSize</link>          xmlSecOpenSSLKeyDataX509GetCrlsSize (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data);</programlisting>
<para>
Gets the number of CRLs in <parameter>data</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara>               the pointer to X509 key data.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> te number of CRLs in <parameter>data</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLX509CertGetKey" role="function">
<title>xmlSecOpenSSLX509CertGetKey ()</title>
<indexterm zone="xmlSecOpenSSLX509CertGetKey"><primary sortas="xmlSecOpenSSLX509CertGetKey">xmlSecOpenSSLX509CertGetKey</primary></indexterm><programlisting><link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link>    xmlSecOpenSSLX509CertGetKey         (<link linkend="X509--CAPS">X509</link> *cert);</programlisting>
<para>
Extracts public key from the <parameter>cert</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>cert</parameter>&#160;:</term>
<listitem><simpara>               the certificate.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> public key value or NULL if an error occurs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLKeyDataRawX509CertId" role="macro">
<title>xmlSecOpenSSLKeyDataRawX509CertId</title>
<indexterm zone="xmlSecOpenSSLKeyDataRawX509CertId"><primary sortas="xmlSecOpenSSLKeyDataRawX509CertId">xmlSecOpenSSLKeyDataRawX509CertId</primary></indexterm><programlisting>#define             xmlSecOpenSSLKeyDataRawX509CertId</programlisting>
<para>
The OpenSSL raw X509 certificate klass.</para>
<para>
</para></refsect2>
<refsect2 id="xmlSecOpenSSLKeyDataRawX509CertGetKlass" role="function">
<title>xmlSecOpenSSLKeyDataRawX509CertGetKlass ()</title>
<indexterm zone="xmlSecOpenSSLKeyDataRawX509CertGetKlass"><primary sortas="xmlSecOpenSSLKeyDataRawX509CertGetKlass">xmlSecOpenSSLKeyDataRawX509CertGetKlass</primary></indexterm><programlisting><link linkend="xmlSecKeyDataId">xmlSecKeyDataId</link>     xmlSecOpenSSLKeyDataRawX509CertGetKlass
                                                        (void);</programlisting>
<para>
The raw X509 certificates key data klass.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> raw X509 certificates key data klass.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLX509StoreId" role="macro">
<title>xmlSecOpenSSLX509StoreId</title>
<indexterm zone="xmlSecOpenSSLX509StoreId"><primary sortas="xmlSecOpenSSLX509StoreId">xmlSecOpenSSLX509StoreId</primary></indexterm><programlisting>#define             xmlSecOpenSSLX509StoreId</programlisting>
<para>
The OpenSSL X509 store klass.</para>
<para>
</para></refsect2>
<refsect2 id="xmlSecOpenSSLX509StoreGetKlass" role="function">
<title>xmlSecOpenSSLX509StoreGetKlass ()</title>
<indexterm zone="xmlSecOpenSSLX509StoreGetKlass"><primary sortas="xmlSecOpenSSLX509StoreGetKlass">xmlSecOpenSSLX509StoreGetKlass</primary></indexterm><programlisting><link linkend="xmlSecKeyDataStoreId">xmlSecKeyDataStoreId</link>  xmlSecOpenSSLX509StoreGetKlass    (void);</programlisting>
<para>
The OpenSSL X509 certificates key data store klass.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> pointer to OpenSSL X509 certificates key data store klass.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLX509StoreFindCert" role="function">
<title>xmlSecOpenSSLX509StoreFindCert ()</title>
<indexterm zone="xmlSecOpenSSLX509StoreFindCert"><primary sortas="xmlSecOpenSSLX509StoreFindCert">xmlSecOpenSSLX509StoreFindCert</primary></indexterm><programlisting><link linkend="X509--CAPS">X509</link>*               xmlSecOpenSSLX509StoreFindCert      (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         <link linkend="xmlChar">xmlChar</link> *subjectName,
                                                         <link linkend="xmlChar">xmlChar</link> *issuerName,
                                                         <link linkend="xmlChar">xmlChar</link> *issuerSerial,
                                                         <link linkend="xmlChar">xmlChar</link> *ski,
                                                         <link linkend="xmlSecKeyInfoCtx">xmlSecKeyInfoCtx</link> *keyInfoCtx);</programlisting>
<para>
Searches <parameter>store</parameter> for a certificate that matches given criteria.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>store</parameter>&#160;:</term>
<listitem><simpara>              the pointer to X509 key data store klass.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>subjectName</parameter>&#160;:</term>
<listitem><simpara>        the desired certificate name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>issuerName</parameter>&#160;:</term>
<listitem><simpara>         the desired certificate issuer name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>issuerSerial</parameter>&#160;:</term>
<listitem><simpara>       the desired certificate issuer serial number.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ski</parameter>&#160;:</term>
<listitem><simpara>                the desired certificate SKI.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>keyInfoCtx</parameter>&#160;:</term>
<listitem><simpara>         the pointer to <ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyInfo">&lt;dsig:KeyInfo/&gt;</ulink> element processing context.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> pointer to found certificate or NULL if certificate is not found
or an error occurs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLX509StoreVerify" role="function">
<title>xmlSecOpenSSLX509StoreVerify ()</title>
<indexterm zone="xmlSecOpenSSLX509StoreVerify"><primary sortas="xmlSecOpenSSLX509StoreVerify">xmlSecOpenSSLX509StoreVerify</primary></indexterm><programlisting><link linkend="X509--CAPS">X509</link>*               xmlSecOpenSSLX509StoreVerify        (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         <link linkend="XMLSEC-STACK-OF-X509--CAPS">XMLSEC_STACK_OF_X509</link> *certs,
                                                         <link linkend="XMLSEC-STACK-OF-X509-CRL--CAPS">XMLSEC_STACK_OF_X509_CRL</link> *crls,
                                                         <link linkend="xmlSecKeyInfoCtx">xmlSecKeyInfoCtx</link> *keyInfoCtx);</programlisting>
<para>
Verifies <parameter>certs</parameter> list.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>store</parameter>&#160;:</term>
<listitem><simpara>              the pointer to X509 key data store klass.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>certs</parameter>&#160;:</term>
<listitem><simpara>              the untrusted certificates stack.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>crls</parameter>&#160;:</term>
<listitem><simpara>               the crls stack.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>keyInfoCtx</parameter>&#160;:</term>
<listitem><simpara>         the pointer to <ulink URL="http://www.w3.org/TR/xmldsig-core/#sec-KeyInfo">&lt;dsig:KeyInfo/&gt;</ulink> element processing context.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> pointer to the first verified certificate from <parameter>certs</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLX509StoreAdoptCert" role="function">
<title>xmlSecOpenSSLX509StoreAdoptCert ()</title>
<indexterm zone="xmlSecOpenSSLX509StoreAdoptCert"><primary sortas="xmlSecOpenSSLX509StoreAdoptCert">xmlSecOpenSSLX509StoreAdoptCert</primary></indexterm><programlisting><link linkend="int">int</link>                 xmlSecOpenSSLX509StoreAdoptCert     (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         <link linkend="X509--CAPS">X509</link> *cert,
                                                         <link linkend="xmlSecKeyDataType">xmlSecKeyDataType</link> type);</programlisting>
<para>
Adds trusted (root) or untrusted certificate to the store.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>store</parameter>&#160;:</term>
<listitem><simpara>              the pointer to X509 key data store klass.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cert</parameter>&#160;:</term>
<listitem><simpara>               the pointer to OpenSSL X509 certificate.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&#160;:</term>
<listitem><simpara>               the certificate type (trusted/untrusted).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> 0 on success or a negative value if an error occurs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLX509StoreAdoptCrl" role="function">
<title>xmlSecOpenSSLX509StoreAdoptCrl ()</title>
<indexterm zone="xmlSecOpenSSLX509StoreAdoptCrl"><primary sortas="xmlSecOpenSSLX509StoreAdoptCrl">xmlSecOpenSSLX509StoreAdoptCrl</primary></indexterm><programlisting><link linkend="int">int</link>                 xmlSecOpenSSLX509StoreAdoptCrl      (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         <link linkend="X509-CRL--CAPS">X509_CRL</link> *crl);</programlisting>
<para>
Adds X509 CRL to the store.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>store</parameter>&#160;:</term>
<listitem><simpara>              the pointer to X509 key data store klass.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>crl</parameter>&#160;:</term>
<listitem><simpara>                the pointer to OpenSSL X509_CRL.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> 0 on success or a negative value if an error occurs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLX509StoreAddCertsPath" role="function">
<title>xmlSecOpenSSLX509StoreAddCertsPath ()</title>
<indexterm zone="xmlSecOpenSSLX509StoreAddCertsPath"><primary sortas="xmlSecOpenSSLX509StoreAddCertsPath">xmlSecOpenSSLX509StoreAddCertsPath</primary></indexterm><programlisting><link linkend="int">int</link>                 xmlSecOpenSSLX509StoreAddCertsPath  (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         const <link linkend="char">char</link> *path);</programlisting>
<para>
Adds all certs in the <parameter>path</parameter> to the list of trusted certs
in <parameter>store</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>store</parameter>&#160;:</term>
<listitem><simpara> the pointer to OpenSSL x509 store.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>path</parameter>&#160;:</term>
<listitem><simpara> the path to the certs dir.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> 0 on success or a negative value otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLX509StoreAddCertsFile" role="function">
<title>xmlSecOpenSSLX509StoreAddCertsFile ()</title>
<indexterm zone="xmlSecOpenSSLX509StoreAddCertsFile"><primary sortas="xmlSecOpenSSLX509StoreAddCertsFile">xmlSecOpenSSLX509StoreAddCertsFile</primary></indexterm><programlisting><link linkend="int">int</link>                 xmlSecOpenSSLX509StoreAddCertsFile  (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         const <link linkend="char">char</link> *file);</programlisting>
<para>
Adds all certs in <parameter>file</parameter> to the list of trusted certs
in <parameter>store</parameter>. It is possible for <parameter>file</parameter> to contain multiple certs.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>store</parameter>&#160;:</term>
<listitem><simpara> the pointer to OpenSSL x509 store.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara> the certs file.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> 0 on success or a negative value otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
