119 lines
4.7 KiB
HTML
119 lines
4.7 KiB
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>CMS_get0_SignerInfos</title>
|
||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||
|
<link rev="made" href="mailto:root@localhost" />
|
||
|
</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="#notes">NOTES</a></li>
|
||
|
<li><a href="#return_values">RETURN VALUES</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>CMS_SignerInfo_set1_signer_cert,
|
||
|
CMS_get0_SignerInfos, CMS_SignerInfo_get0_signer_id,
|
||
|
CMS_SignerInfo_get0_signature, CMS_SignerInfo_cert_cmp
|
||
|
- CMS signedData signer functions</p>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="synopsis">SYNOPSIS</a></h1>
|
||
|
<pre>
|
||
|
#include <openssl/cms.h></pre>
|
||
|
<pre>
|
||
|
STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);</pre>
|
||
|
<pre>
|
||
|
int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, ASN1_OCTET_STRING **keyid,
|
||
|
X509_NAME **issuer, ASN1_INTEGER **sno);
|
||
|
ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
|
||
|
int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
|
||
|
void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);</pre>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="description">DESCRIPTION</a></h1>
|
||
|
<p>The function CMS_get0_SignerInfos() returns all the CMS_SignerInfo structures
|
||
|
associated with a CMS signedData structure.</p>
|
||
|
<p>CMS_SignerInfo_get0_signer_id() retrieves the certificate signer identifier
|
||
|
associated with a specific CMS_SignerInfo structure <strong>si</strong>. Either the
|
||
|
keyidentifier will be set in <strong>keyid</strong> or <strong>both</strong> issuer name and serial number
|
||
|
in <strong>issuer</strong> and <strong>sno</strong>.</p>
|
||
|
<p>CMS_SignerInfo_get0_signature() retrieves the signature associated with
|
||
|
<strong>si</strong> in a pointer to an ASN1_OCTET_STRING structure. This pointer returned
|
||
|
corresponds to the internal signature value if <strong>si</strong> so it may be read or
|
||
|
modified.</p>
|
||
|
<p><code>CMS_SignerInfo_cert_cmp()</code> compares the certificate <strong>cert</strong> against the signer
|
||
|
identifier <strong>si</strong>. It returns zero if the comparison is successful and non zero
|
||
|
if not.</p>
|
||
|
<p>CMS_SignerInfo_set1_signer_cert() sets the signers certificate of <strong>si</strong> to
|
||
|
<strong>signer</strong>.</p>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="notes">NOTES</a></h1>
|
||
|
<p>The main purpose of these functions is to enable an application to lookup
|
||
|
signers certificates using any appropriate technique when the simpler method
|
||
|
of <code>CMS_verify()</code> is not appropriate.</p>
|
||
|
<p>In typical usage and application will retrieve all CMS_SignerInfo structures
|
||
|
using CMS_get0_SignerInfo() and retrieve the identifier information using
|
||
|
CMS. It will then obtain the signer certificate by some unspecified means
|
||
|
(or return and error if it cannot be found) and set it using
|
||
|
CMS_SignerInfo_set1_signer_cert().</p>
|
||
|
<p>Once all signer certificates have been set <code>CMS_verify()</code> can be used.</p>
|
||
|
<p>Although CMS_get0_SignerInfos() can return NULL if an error occurs <strong>or</strong> if
|
||
|
there are no signers this is not a problem in practice because the only
|
||
|
error which can occur is if the <strong>cms</strong> structure is not of type signedData
|
||
|
due to application error.</p>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="return_values">RETURN VALUES</a></h1>
|
||
|
<p>CMS_get0_SignerInfos() returns all CMS_SignerInfo structures, or NULL there
|
||
|
are no signers or an error occurs.</p>
|
||
|
<p>CMS_SignerInfo_get0_signer_id() returns 1 for success and 0 for failure.</p>
|
||
|
<p><code>CMS_SignerInfo_cert_cmp()</code> returns 0 for a successful comparison and non
|
||
|
zero otherwise.</p>
|
||
|
<p>CMS_SignerInfo_set1_signer_cert() does not return a value.</p>
|
||
|
<p>Any error can be obtained from <em>ERR_get_error(3)</em></p>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="see_also">SEE ALSO</a></h1>
|
||
|
<p><em>ERR_get_error(3)</em>, <em>CMS_verify(3)</em></p>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="copyright">COPYRIGHT</a></h1>
|
||
|
<p>Copyright 2008-2018 The OpenSSL Project Authors. All Rights Reserved.</p>
|
||
|
<p>Licensed under the Apache License 2.0 (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>
|