tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

index.rst (2286B)


      1 .. _mozilla_projects_nss_cert_findcertbydercert:
      2 
      3 CERT_FindCertByDERCert
      4 ======================
      5 
      6 .. container::
      7 
      8   Find a certificate in the database that matches a DER-encoded certificate.
      9 
     10 `Syntax <#syntax>`__
     11 ~~~~~~~~~~~~~~~~~~~~
     12 
     13 .. container::
     14 
     15   .. code::
     16 
     17      #include <cert.h>
     18      CERTCertificate *CERT_FindCertByDERCert(
     19 
     20          CERTCertDBHandle *handle,
     21          SECItem          *derCert          );
     22 
     23 `Parameters <#parameters>`__
     24 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     25 
     26 .. container::
     27 
     28   +-------------+-----------------------------------------------------------------------------------+
     29   | ``handle``  | *in* pointer to a `CERTCertDBHandle </en-US/NSS/CERTCertDBHandle>`__ representing |
     30   |             | the certificate database to look in                                               |
     31   +-------------+-----------------------------------------------------------------------------------+
     32   | ``derCert`` | *in* pointer to an `SECItem </en-US/NSS/SECItem>`__ whose ``type`` must be        |
     33   |             | ``siDERCertBuffer`` and whose ``data`` contains a DER-encoded certificate         |
     34   +-------------+-----------------------------------------------------------------------------------+
     35 
     36 `Description <#description>`__
     37 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     38 
     39 .. container::
     40 
     41   This function looks in the ?NSSCryptoContext? and the ?NSSTrustDomain? to find the certificate
     42   that matches the DER-encoded certificate. A match is found when the issuer and serial number of
     43   the DER-encoded certificate are found on a certificate in the certificate database.
     44 
     45 `Returns <#returns>`__
     46 ~~~~~~~~~~~~~~~~~~~~~~
     47 
     48 .. container::
     49 
     50   A pointer to a `CERTCertificate </en-US/NSS/CERTCertificate>`__ representing the certificate in
     51   the database that matched the ``derCert``, or ``NULL`` if none was found. The certificate is a
     52   shallow copy, use `CERT_DestroyCertificate </en-US/NSS/CERT_DestroyCertificate>`__ to decrement
     53   the reference count on the certificate instance.
     54 
     55 .. _see_also:
     56 
     57 `See Also <#see_also>`__
     58 ~~~~~~~~~~~~~~~~~~~~~~~~
     59 
     60 .. container::
     61 
     62   Occurrences of
     63   ```CERT_FindCertByDERCert`` <http://lxr.mozilla.org/security/ident?i=CERT_FindCertByDERCert>`__
     64   in the current NSS source code (generated by `LXR <http://lxr.mozilla.org/security/>`__).