122 lines
5.2 KiB
HTML
Executable File
122 lines
5.2 KiB
HTML
Executable File
<?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>OSSL_CMP_validate_msg</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="#history">HISTORY</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>OSSL_CMP_validate_msg,
|
|
OSSL_CMP_validate_cert_path
|
|
- functions for verifying CMP message protection</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="synopsis">SYNOPSIS</a></h1>
|
|
<pre>
|
|
#include <openssl/cmp.h>
|
|
int OSSL_CMP_validate_msg(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg);
|
|
int OSSL_CMP_validate_cert_path(const OSSL_CMP_CTX *ctx,
|
|
X509_STORE *trusted_store, X509 *cert);</pre>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="description">DESCRIPTION</a></h1>
|
|
<p>This is the API for validating the protection of CMP messages,
|
|
which includes validating CMP message sender certificates and their paths
|
|
while optionally checking the revocation status of the certificates(s).</p>
|
|
<p><code>OSSL_CMP_validate_msg()</code> validates the protection of the given <code>msg</code>
|
|
using either password-based mac (PBM) or a signature algorithm.</p>
|
|
<p>In case of signature algorithm, the certificate to use for the signature check
|
|
is preferably the one provided by a call to <em>OSSL_CMP_CTX_set1_srvCert(3)</em>.
|
|
If no such sender cert has been pinned then candidate sender certificates are
|
|
taken from the list of certificates received in the <code>msg</code> extraCerts, then any
|
|
certificates provided before via <em>OSSL_CMP_CTX_set1_untrusted_certs(3)</em>, and
|
|
then all trusted certificates provided via <em>OSSL_CMP_CTX_set0_trustedStore(3)</em>,
|
|
where a candidate is acceptable only if has not expired, its subject DN matches
|
|
the <code>msg</code> sender DN (as far as present), and its subject key identifier
|
|
is present and matches the senderKID (as far as the latter present).
|
|
Each acceptable cert is tried in the given order to see if the message
|
|
signature check succeeds and the cert and its path can be verified
|
|
using any trust store set via <em>OSSL_CMP_CTX_set0_trustedStore(3)</em>.</p>
|
|
<p>If the option OSSL_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR was set by calling
|
|
<em>OSSL_CMP_CTX_set_option(3)</em>, for an Initialization Response (IP) message
|
|
any self-issued certificate from the <code>msg</code> extraCerts field may also be used
|
|
as trust anchor for the path verification of an acceptable cert if it can be
|
|
used also to validate the issued certificate returned in the IP message. This is
|
|
according to TS 33.310 [Network Domain Security (NDS); Authentication Framework
|
|
(AF)] document specified by the The 3rd Generation Partnership Project (3GPP).</p>
|
|
<p>Any cert that has been found as described above is cached and tried first when
|
|
validating the signatures of subsequent messages in the same transaction.</p>
|
|
<p>After successful validation of PBM-based protection of a certificate response
|
|
the certificates in the caPubs field (if any) are added to the trusted
|
|
certificates provided via <em>OSSL_CMP_CTX_set0_trustedStore(3)</em>, such that
|
|
they are available for validating subsequent messages in the same context.
|
|
Those could apply to any Polling Response (pollRep), error, or PKI Confirmation
|
|
(PKIConf) messages following in the same or future transactions.</p>
|
|
<p><code>OSSL_CMP_validate_cert_path()</code> attempts to validate the given certificate and its
|
|
path using the given store of trusted certs (possibly including CRLs and a cert
|
|
verification callback) and non-trusted intermediate certs from the <strong>ctx</strong>.</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="notes">NOTES</a></h1>
|
|
<p>CMP is defined in <a href="http://www.ietf.org/rfc/rfc4210.txt" class="rfc">RFC 4210</a> (and CRMF in <a href="http://www.ietf.org/rfc/rfc4211.txt" class="rfc">RFC 4211</a>).</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="return_values">RETURN VALUES</a></h1>
|
|
<p><code>OSSL_CMP_validate_msg()</code> and <code>OSSL_CMP_validate_cert_path()</code>
|
|
return 1 on success, 0 on error or validation failed.</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="see_also">SEE ALSO</a></h1>
|
|
<p><em>OSSL_CMP_CTX_new(3)</em>, <em>OSSL_CMP_exec_IR_ses(3)</em></p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="history">HISTORY</a></h1>
|
|
<p>The OpenSSL CMP support was added in OpenSSL 3.0.</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="copyright">COPYRIGHT</a></h1>
|
|
<p>Copyright 2007-2019 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>
|