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

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

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

<synopsis>
#define             <link linkend="xmlSecNssKeyDataX509Id">xmlSecNssKeyDataX509Id</link>
<link linkend="xmlSecKeyDataId">xmlSecKeyDataId</link>     <link linkend="xmlSecNssKeyDataX509GetKlass">xmlSecNssKeyDataX509GetKlass</link>        (void);
<link linkend="CERTCertificate">CERTCertificate</link>*    <link linkend="xmlSecNssKeyDataX509GetKeyCert">xmlSecNssKeyDataX509GetKeyCert</link>      (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data);
<link linkend="int">int</link>                 <link linkend="xmlSecNssKeyDataX509AdoptKeyCert">xmlSecNssKeyDataX509AdoptKeyCert</link>    (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="CERTCertificate">CERTCertificate</link> *cert);
<link linkend="int">int</link>                 <link linkend="xmlSecNssKeyDataX509AdoptCert">xmlSecNssKeyDataX509AdoptCert</link>       (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="CERTCertificate">CERTCertificate</link> *cert);
<link linkend="CERTCertificate">CERTCertificate</link>*    <link linkend="xmlSecNssKeyDataX509GetCert">xmlSecNssKeyDataX509GetCert</link>         (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="xmlSecSize">xmlSecSize</link> pos);
<link linkend="xmlSecSize">xmlSecSize</link>          <link linkend="xmlSecNssKeyDataX509GetCertsSize">xmlSecNssKeyDataX509GetCertsSize</link>    (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data);
<link linkend="int">int</link>                 <link linkend="xmlSecNssKeyDataX509AdoptCrl">xmlSecNssKeyDataX509AdoptCrl</link>        (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="CERTSignedCrl">CERTSignedCrl</link> *crl);
<link linkend="CERTSignedCrl">CERTSignedCrl</link>*      <link linkend="xmlSecNssKeyDataX509GetCrl">xmlSecNssKeyDataX509GetCrl</link>          (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="xmlSecSize">xmlSecSize</link> pos);
<link linkend="xmlSecSize">xmlSecSize</link>          <link linkend="xmlSecNssKeyDataX509GetCrlsSize">xmlSecNssKeyDataX509GetCrlsSize</link>     (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data);
<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link>    <link linkend="xmlSecNssX509CertGetKey">xmlSecNssX509CertGetKey</link>             (<link linkend="CERTCertificate">CERTCertificate</link> *cert);
#define             <link linkend="xmlSecNssKeyDataRawX509CertId">xmlSecNssKeyDataRawX509CertId</link>
<link linkend="xmlSecKeyDataId">xmlSecKeyDataId</link>     <link linkend="xmlSecNssKeyDataRawX509CertGetKlass">xmlSecNssKeyDataRawX509CertGetKlass</link> (void);
#define             <link linkend="xmlSecNssX509StoreId">xmlSecNssX509StoreId</link>
<link linkend="xmlSecKeyDataStoreId">xmlSecKeyDataStoreId</link>  <link linkend="xmlSecNssX509StoreGetKlass">xmlSecNssX509StoreGetKlass</link>        (void);
<link linkend="CERTCertificate">CERTCertificate</link>*    <link linkend="xmlSecNssX509StoreFindCert">xmlSecNssX509StoreFindCert</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="CERTCertificate">CERTCertificate</link>*    <link linkend="xmlSecNssX509StoreVerify">xmlSecNssX509StoreVerify</link>            (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         <link linkend="CERTCertList">CERTCertList</link> *certs,
                                                         <link linkend="xmlSecKeyInfoCtx">xmlSecKeyInfoCtx</link> *keyInfoCtx);
<link linkend="int">int</link>                 <link linkend="xmlSecNssX509StoreAdoptCert">xmlSecNssX509StoreAdoptCert</link>         (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         <link linkend="CERTCertificate">CERTCertificate</link> *cert,
                                                         <link linkend="xmlSecKeyDataType">xmlSecKeyDataType</link> type);
</synopsis>
</refsynopsisdiv>









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

<refsect1 id="xmlsec-nss-x509.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="xmlSecNssKeyDataX509Id" role="macro">
<title>xmlSecNssKeyDataX509Id</title>
<indexterm zone="xmlSecNssKeyDataX509Id"><primary sortas="xmlSecNssKeyDataX509Id">xmlSecNssKeyDataX509Id</primary></indexterm><programlisting>#define             xmlSecNssKeyDataX509Id</programlisting>
<para>
The NSS X509 data klass.</para>
<para>
</para></refsect2>
<refsect2 id="xmlSecNssKeyDataX509GetKlass" role="function">
<title>xmlSecNssKeyDataX509GetKlass ()</title>
<indexterm zone="xmlSecNssKeyDataX509GetKlass"><primary sortas="xmlSecNssKeyDataX509GetKlass">xmlSecNssKeyDataX509GetKlass</primary></indexterm><programlisting><link linkend="xmlSecKeyDataId">xmlSecKeyDataId</link>     xmlSecNssKeyDataX509GetKlass        (void);</programlisting>
<para>
The NSS 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="xmlSecNssKeyDataX509GetKeyCert" role="function">
<title>xmlSecNssKeyDataX509GetKeyCert ()</title>
<indexterm zone="xmlSecNssKeyDataX509GetKeyCert"><primary sortas="xmlSecNssKeyDataX509GetKeyCert">xmlSecNssKeyDataX509GetKeyCert</primary></indexterm><programlisting><link linkend="CERTCertificate">CERTCertificate</link>*    xmlSecNssKeyDataX509GetKeyCert      (<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="xmlSecNssKeyDataX509AdoptKeyCert" role="function">
<title>xmlSecNssKeyDataX509AdoptKeyCert ()</title>
<indexterm zone="xmlSecNssKeyDataX509AdoptKeyCert"><primary sortas="xmlSecNssKeyDataX509AdoptKeyCert">xmlSecNssKeyDataX509AdoptKeyCert</primary></indexterm><programlisting><link linkend="int">int</link>                 xmlSecNssKeyDataX509AdoptKeyCert    (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="CERTCertificate">CERTCertificate</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 NSS 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="xmlSecNssKeyDataX509AdoptCert" role="function">
<title>xmlSecNssKeyDataX509AdoptCert ()</title>
<indexterm zone="xmlSecNssKeyDataX509AdoptCert"><primary sortas="xmlSecNssKeyDataX509AdoptCert">xmlSecNssKeyDataX509AdoptCert</primary></indexterm><programlisting><link linkend="int">int</link>                 xmlSecNssKeyDataX509AdoptCert       (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="CERTCertificate">CERTCertificate</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 NSS 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="xmlSecNssKeyDataX509GetCert" role="function">
<title>xmlSecNssKeyDataX509GetCert ()</title>
<indexterm zone="xmlSecNssKeyDataX509GetCert"><primary sortas="xmlSecNssKeyDataX509GetCert">xmlSecNssKeyDataX509GetCert</primary></indexterm><programlisting><link linkend="CERTCertificate">CERTCertificate</link>*    xmlSecNssKeyDataX509GetCert         (<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="xmlSecNssKeyDataX509GetCertsSize" role="function">
<title>xmlSecNssKeyDataX509GetCertsSize ()</title>
<indexterm zone="xmlSecNssKeyDataX509GetCertsSize"><primary sortas="xmlSecNssKeyDataX509GetCertsSize">xmlSecNssKeyDataX509GetCertsSize</primary></indexterm><programlisting><link linkend="xmlSecSize">xmlSecSize</link>          xmlSecNssKeyDataX509GetCertsSize    (<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="xmlSecNssKeyDataX509AdoptCrl" role="function">
<title>xmlSecNssKeyDataX509AdoptCrl ()</title>
<indexterm zone="xmlSecNssKeyDataX509AdoptCrl"><primary sortas="xmlSecNssKeyDataX509AdoptCrl">xmlSecNssKeyDataX509AdoptCrl</primary></indexterm><programlisting><link linkend="int">int</link>                 xmlSecNssKeyDataX509AdoptCrl        (<link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link> data,
                                                         <link linkend="CERTSignedCrl">CERTSignedCrl</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 NSS 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="xmlSecNssKeyDataX509GetCrl" role="function">
<title>xmlSecNssKeyDataX509GetCrl ()</title>
<indexterm zone="xmlSecNssKeyDataX509GetCrl"><primary sortas="xmlSecNssKeyDataX509GetCrl">xmlSecNssKeyDataX509GetCrl</primary></indexterm><programlisting><link linkend="CERTSignedCrl">CERTSignedCrl</link>*      xmlSecNssKeyDataX509GetCrl          (<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="xmlSecNssKeyDataX509GetCrlsSize" role="function">
<title>xmlSecNssKeyDataX509GetCrlsSize ()</title>
<indexterm zone="xmlSecNssKeyDataX509GetCrlsSize"><primary sortas="xmlSecNssKeyDataX509GetCrlsSize">xmlSecNssKeyDataX509GetCrlsSize</primary></indexterm><programlisting><link linkend="xmlSecSize">xmlSecSize</link>          xmlSecNssKeyDataX509GetCrlsSize     (<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="xmlSecNssX509CertGetKey" role="function">
<title>xmlSecNssX509CertGetKey ()</title>
<indexterm zone="xmlSecNssX509CertGetKey"><primary sortas="xmlSecNssX509CertGetKey">xmlSecNssX509CertGetKey</primary></indexterm><programlisting><link linkend="xmlSecKeyData">xmlSecKeyDataPtr</link>    xmlSecNssX509CertGetKey             (<link linkend="CERTCertificate">CERTCertificate</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="xmlSecNssKeyDataRawX509CertId" role="macro">
<title>xmlSecNssKeyDataRawX509CertId</title>
<indexterm zone="xmlSecNssKeyDataRawX509CertId"><primary sortas="xmlSecNssKeyDataRawX509CertId">xmlSecNssKeyDataRawX509CertId</primary></indexterm><programlisting>#define             xmlSecNssKeyDataRawX509CertId</programlisting>
<para>
The NSS raw X509 certificate klass.</para>
<para>
</para></refsect2>
<refsect2 id="xmlSecNssKeyDataRawX509CertGetKlass" role="function">
<title>xmlSecNssKeyDataRawX509CertGetKlass ()</title>
<indexterm zone="xmlSecNssKeyDataRawX509CertGetKlass"><primary sortas="xmlSecNssKeyDataRawX509CertGetKlass">xmlSecNssKeyDataRawX509CertGetKlass</primary></indexterm><programlisting><link linkend="xmlSecKeyDataId">xmlSecKeyDataId</link>     xmlSecNssKeyDataRawX509CertGetKlass (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="xmlSecNssX509StoreId" role="macro">
<title>xmlSecNssX509StoreId</title>
<indexterm zone="xmlSecNssX509StoreId"><primary sortas="xmlSecNssX509StoreId">xmlSecNssX509StoreId</primary></indexterm><programlisting>#define             xmlSecNssX509StoreId</programlisting>
<para>
The NSS X509 store klass.</para>
<para>
</para></refsect2>
<refsect2 id="xmlSecNssX509StoreGetKlass" role="function">
<title>xmlSecNssX509StoreGetKlass ()</title>
<indexterm zone="xmlSecNssX509StoreGetKlass"><primary sortas="xmlSecNssX509StoreGetKlass">xmlSecNssX509StoreGetKlass</primary></indexterm><programlisting><link linkend="xmlSecKeyDataStoreId">xmlSecKeyDataStoreId</link>  xmlSecNssX509StoreGetKlass        (void);</programlisting>
<para>
The NSS X509 certificates key data store klass.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> pointer to NSS X509 certificates key data store klass.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecNssX509StoreFindCert" role="function">
<title>xmlSecNssX509StoreFindCert ()</title>
<indexterm zone="xmlSecNssX509StoreFindCert"><primary sortas="xmlSecNssX509StoreFindCert">xmlSecNssX509StoreFindCert</primary></indexterm><programlisting><link linkend="CERTCertificate">CERTCertificate</link>*    xmlSecNssX509StoreFindCert          (<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="xmlSecNssX509StoreVerify" role="function">
<title>xmlSecNssX509StoreVerify ()</title>
<indexterm zone="xmlSecNssX509StoreVerify"><primary sortas="xmlSecNssX509StoreVerify">xmlSecNssX509StoreVerify</primary></indexterm><programlisting><link linkend="CERTCertificate">CERTCertificate</link>*    xmlSecNssX509StoreVerify            (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         <link linkend="CERTCertList">CERTCertList</link> *certs,
                                                         <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>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="xmlSecNssX509StoreAdoptCert" role="function">
<title>xmlSecNssX509StoreAdoptCert ()</title>
<indexterm zone="xmlSecNssX509StoreAdoptCert"><primary sortas="xmlSecNssX509StoreAdoptCert">xmlSecNssX509StoreAdoptCert</primary></indexterm><programlisting><link linkend="int">int</link>                 xmlSecNssX509StoreAdoptCert         (<link linkend="xmlSecKeyDataStore">xmlSecKeyDataStorePtr</link> store,
                                                         <link linkend="CERTCertificate">CERTCertificate</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 NSS 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>

</refsect1>




</refentry>
