Current Path : /usr/opt/openssl11/share/doc/openssl/html/man3/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/opt/openssl11/share/doc/openssl/html/man3/OCSP_id_get0_info.html |
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>OCSP_cert_to_id</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:root@hsxx.drive.ne.jp" /> </head> <body style="background-color: white"> <!-- INDEX BEGIN --> <div name="index"> <p><a name="__index__"></a></p> <ul> <li><a href="#name">NAME</a></li> <li><a href="#synopsis">SYNOPSIS</a></li> <li><a href="#description">DESCRIPTION</a></li> <li><a href="#return_values">RETURN VALUES</a></li> <li><a href="#notes">NOTES</a></li> <li><a href="#see_also">SEE ALSO</a></li> <li><a href="#copyright">COPYRIGHT</a></li> </ul> <hr name="index" /> </div> <!-- INDEX END --> <p> </p> <hr /> <h1><a name="name">NAME</a></h1> <p>OCSP_cert_to_id, OCSP_cert_id_new, OCSP_CERTID_free, OCSP_id_issuer_cmp, OCSP_id_cmp, OCSP_id_get0_info - OCSP certificate ID utility functions</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <pre> #include <openssl/ocsp.h></pre> <pre> OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer);</pre> <pre> OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst, X509_NAME *issuerName, ASN1_BIT_STRING *issuerKey, ASN1_INTEGER *serialNumber);</pre> <pre> void OCSP_CERTID_free(OCSP_CERTID *id);</pre> <pre> int OCSP_id_issuer_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b); int OCSP_id_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b);</pre> <pre> int OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, ASN1_OCTET_STRING **pikeyHash, ASN1_INTEGER **pserial, OCSP_CERTID *cid);</pre> <p> </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> <p><code>OCSP_cert_to_id()</code> creates and returns a new <strong>OCSP_CERTID</strong> structure using message digest <strong>dgst</strong> for certificate <strong>subject</strong> with issuer <strong>issuer</strong>. If <strong>dgst</strong> is <strong>NULL</strong> then SHA1 is used.</p> <p><code>OCSP_cert_id_new()</code> creates and returns a new <strong>OCSP_CERTID</strong> using <strong>dgst</strong> and issuer name <strong>issuerName</strong>, issuer key hash <strong>issuerKey</strong> and serial number <strong>serialNumber</strong>.</p> <p><code>OCSP_CERTID_free()</code> frees up <strong>id</strong>.</p> <p><code>OCSP_id_cmp()</code> compares <strong>OCSP_CERTID</strong> <strong>a</strong> and <strong>b</strong>.</p> <p><code>OCSP_id_issuer_cmp()</code> compares only the issuer name of <strong>OCSP_CERTID</strong> <strong>a</strong> and <strong>b</strong>.</p> <p>OCSP_id_get0_info() returns the issuer name hash, hash OID, issuer key hash and serial number contained in <strong>cid</strong>. If any of the values are not required the corresponding parameter can be set to <strong>NULL</strong>.</p> <p> </p> <hr /> <h1><a name="return_values">RETURN VALUES</a></h1> <p><code>OCSP_cert_to_id()</code> and <code>OCSP_cert_id_new()</code> return either a pointer to a valid <strong>OCSP_CERTID</strong> structure or <strong>NULL</strong> if an error occurred.</p> <p><code>OCSP_id_cmp()</code> and <code>OCSP_id_issuer_cmp()</code> returns zero for a match and nonzero otherwise.</p> <p><code>OCSP_CERTID_free()</code> does not return a value.</p> <p>OCSP_id_get0_info() returns 1 for success and 0 for failure.</p> <p> </p> <hr /> <h1><a name="notes">NOTES</a></h1> <p>OCSP clients will typically only use <code>OCSP_cert_to_id()</code> or OCSP_cert_id_new(): the other functions are used by responder applications.</p> <p>The values returned by OCSP_id_get0_info() are internal pointers and <strong>MUST NOT</strong> be freed up by an application: they will be freed when the corresponding <strong>OCSP_CERTID</strong> structure is freed.</p> <p> </p> <hr /> <h1><a name="see_also">SEE ALSO</a></h1> <p><em>crypto(7)</em>, <em>OCSP_request_add1_nonce(3)</em>, <em>OCSP_REQUEST_new(3)</em>, <em>OCSP_resp_find_status(3)</em>, <em>OCSP_response_status(3)</em>, <em>OCSP_sendreq_new(3)</em></p> <p> </p> <hr /> <h1><a name="copyright">COPYRIGHT</a></h1> <p>Copyright 2015-2020 The OpenSSL Project Authors. All Rights Reserved.</p> <p>Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p> </body> </html>