summaryrefslogtreecommitdiffstats
path: root/security/nss/doc/rst/legacy/cert_findcertbyissuerandsn
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /security/nss/doc/rst/legacy/cert_findcertbyissuerandsn
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'security/nss/doc/rst/legacy/cert_findcertbyissuerandsn')
-rw-r--r--security/nss/doc/rst/legacy/cert_findcertbyissuerandsn/index.rst82
1 files changed, 82 insertions, 0 deletions
diff --git a/security/nss/doc/rst/legacy/cert_findcertbyissuerandsn/index.rst b/security/nss/doc/rst/legacy/cert_findcertbyissuerandsn/index.rst
new file mode 100644
index 0000000000..933fff206c
--- /dev/null
+++ b/security/nss/doc/rst/legacy/cert_findcertbyissuerandsn/index.rst
@@ -0,0 +1,82 @@
+.. _mozilla_projects_nss_cert_findcertbyissuerandsn:
+
+CERT_FindCertByIssuerAndSN
+==========================
+
+.. container::
+
+ Find a certificate in the database with the given issuer and serial number.
+
+`Syntax <#syntax>`__
+~~~~~~~~~~~~~~~~~~~~
+
+.. container::
+
+ .. code::
+
+ #include <cert.h>
+ CERTCertificate *CERT_FindCertByIssuerAndSN (
+
+ CERTCertDBHandle *handle,
+ CERTIssuerAndSN *issuerAndSN );
+
+`Parameters <#parameters>`__
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. container::
+
+ +-----------------+-------------------------------------------------------------------------------+
+ | ``handle`` | *in* pointer to a `CERTCertDBHandle </en-US/NSS/CERTCertDBHandle>`__ |
+ | | representing the certificate database to look in |
+ +-----------------+-------------------------------------------------------------------------------+
+ | ``issuerAndSN`` | *in* pointer to a `CERTIssuerAndSN </en-US/NSS/CERTIssuerAndSN>`__ that must |
+ | | be properly formed to contain the issuer name and the serial number (see |
+ | | [Example]) |
+ +-----------------+-------------------------------------------------------------------------------+
+
+`Description <#description>`__
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. container::
+
+ This function creates a certificate key using the ``issuerAndSN`` and it then uses the key to
+ find the matching certificate in the database.
+
+`Returns <#returns>`__
+~~~~~~~~~~~~~~~~~~~~~~
+
+.. container::
+
+ A pointer to a `CERTCertificate </en-US/NSS/CERTCertificate>`__ representing the certificate in
+ the database that matched the issuer and serial number, or ``NULL`` if none was found. The
+ certificate is a shallow copy, use
+ `CERT_DestroyCertificate </en-US/NSS/CERT_DestroyCertificate>`__ to decrement the reference count
+ on the certificate instance.
+
+`Example <#example>`__
+~~~~~~~~~~~~~~~~~~~~~~
+
+.. container::
+
+ .. code::
+
+ CERTIssuerAndSN issuerSN;
+ issuerSN.derIssuer.data = caName->data;
+ issuerSN.derIssuer.len = caName->len;
+ issuerSN.serialNumber.data = authorityKeyID->authCertSerialNumber.data;
+ issuerSN.serialNumber.len = authorityKeyID->authCertSerialNumber.len;
+ issuerCert = CERT_FindCertByIssuerAndSN(cert->dbhandle, &issuerSN);
+ if ( issuerCert == NULL ) {
+ PORT_SetError (SEC_ERROR_UNKNOWN_ISSUER);
+ }
+
+.. _see_also:
+
+`See Also <#see_also>`__
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. container::
+
+ Occurrences of
+ ```CERT_FindCertByIssuerAndSN`` <http://lxr.mozilla.org/security/ident?i=CERT_FindCertByIssuerAndSN>`__
+ in the current NSS source code (generated by `LXR <http://lxr.mozilla.org/security/>`__). \ No newline at end of file