diff options
Diffstat (limited to 'upstream/debian-unstable/man3/CMS_verify.3ssl')
-rw-r--r-- | upstream/debian-unstable/man3/CMS_verify.3ssl | 50 |
1 files changed, 37 insertions, 13 deletions
diff --git a/upstream/debian-unstable/man3/CMS_verify.3ssl b/upstream/debian-unstable/man3/CMS_verify.3ssl index e25ab6ce..422fe5fc 100644 --- a/upstream/debian-unstable/man3/CMS_verify.3ssl +++ b/upstream/debian-unstable/man3/CMS_verify.3ssl @@ -55,20 +55,26 @@ .\" ======================================================================== .\" .IX Title "CMS_VERIFY 3SSL" -.TH CMS_VERIFY 3SSL 2024-02-03 3.1.5 OpenSSL +.TH CMS_VERIFY 3SSL 2024-04-04 3.2.2-dev OpenSSL .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME -CMS_verify, CMS_get0_signers \- verify a CMS SignedData structure +CMS_verify, CMS_SignedData_verify, +CMS_get0_signers \- verify a CMS SignedData structure .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& #include <openssl/cms.h> \& \& int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs, X509_STORE *store, -\& BIO *indata, BIO *out, unsigned int flags); +\& BIO *detached_data, BIO *out, unsigned int flags); +\& BIO *CMS_SignedData_verify(CMS_SignedData *sd, BIO *detached_data, +\& STACK_OF(X509) *scerts, X509_STORE *store, +\& STACK_OF(X509) *extra, STACK_OF(X509_CRL) *crls, +\& unsigned int flags, +\& OSSL_LIB_CTX *libctx, const char *propq); \& \& STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms); .Ve @@ -83,20 +89,32 @@ in which to search for signing certificates. chain building as well as CRLs that may be used for certificate validation. \&\fIstore\fR may be NULL or point to the trusted certificate store to use for chain verification. -\&\fIindata\fR refers to the signed data if the content is detached from \fIcms\fR. -Otherwise \fIindata\fR should be NULL and the signed data must be in \fIcms\fR. +\&\fIdetached_data\fR refers to the signed data if the content is detached from \fIcms\fR. +Otherwise \fIdetached_data\fR should be NULL and the signed data must be in \fIcms\fR. The content is written to the BIO \fIout\fR unless it is NULL. \&\fIflags\fR is an optional set of flags, which can be used to modify the operation. .PP -\&\fBCMS_get0_signers()\fR retrieves the signing certificate(s) from \fIcms\fR, it may only -be called after a successful \fBCMS_verify()\fR operation. +\&\fBCMS_SignedData_verify()\fR is like \fBCMS_verify()\fR except that +it operates on \fBCMS SignedData\fR input in the \fIsd\fR argument, +it has some additional parameters described next, +and on success it returns the verified content as a memory BIO. +The optional \fIextra\fR parameter may be used to provide untrusted CA +certificates that may be helpful for chain building in certificate validation. +This list of certificates must not contain duplicates. +The optional \fIcrls\fR parameter may be used to provide extra CRLs. +Also the list of CRLs must not contain duplicates. +The optional parameters library context \fIlibctx\fR and property query \fIpropq\fR +are used when retrieving algorithms from providers. +.PP +\&\fBCMS_get0_signers()\fR retrieves the signing certificate(s) from \fIcms\fR; it may only +be called after a successful \fBCMS_verify()\fR or \fBCMS_SignedData_verify()\fR operation. .SH "VERIFY PROCESS" .IX Header "VERIFY PROCESS" Normally the verify process proceeds as follows. .PP Initially some sanity checks are performed on \fIcms\fR. The type of \fIcms\fR must be SignedData. There must be at least one signature on the data and if -the content is detached \fIindata\fR cannot be NULL. +the content is detached \fIdetached_data\fR cannot be NULL. .PP An attempt is made to locate all the signing certificate(s), first looking in the \fIcerts\fR parameter (if it is not NULL) and then looking in any @@ -125,10 +143,10 @@ searched when locating the signing certificate(s). This means that all the signing certificates must be in the \fIcerts\fR parameter. .PP If \fBCMS_NOCRL\fR is set and CRL checking is enabled in \fIstore\fR then any -CRLs in the message itself are ignored. +CRLs in the message itself and provided via the \fIcrls\fR parameter are ignored. .PP -If the \fBCMS_TEXT\fR flag is set MIME headers for type \fBtext/plain\fR are deleted -from the content. If the content is not of type \fBtext/plain\fR then an error is +If the \fBCMS_TEXT\fR flag is set MIME headers for type \f(CW\*(C`text/plain\*(C'\fR are deleted +from the content. If the content is not of type \f(CW\*(C`text/plain\*(C'\fR then an error is returned. .PP If \fBCMS_NO_SIGNER_CERT_VERIFY\fR is set the signing certificates are not @@ -170,9 +188,12 @@ timestamp). .IX Header "RETURN VALUES" \&\fBCMS_verify()\fR returns 1 for a successful verification and 0 if an error occurred. .PP +\&\fBCMS_SignedData_verify()\fR returns a memory BIO containing the verified content, +or NULL on error. +.PP \&\fBCMS_get0_signers()\fR returns all signers or NULL if an error occurred. .PP -The error can be obtained from \fBERR_get_error\fR\|(3) +The error can be obtained from \fBERR_get_error\fR\|(3). .SH BUGS .IX Header "BUGS" The trusted certificate store is not searched for the signing certificate. @@ -186,9 +207,12 @@ be held in memory if it is not detached. \&\fBPKCS7_verify\fR\|(3), \fBCMS_add1_cert\fR\|(3), \fBCMS_add1_crl\fR\|(3), \&\fBOSSL_ESS_check_signing_certs\fR\|(3), \&\fBERR_get_error\fR\|(3), \fBCMS_sign\fR\|(3) +.SH HISTORY +.IX Header "HISTORY" +\&\fBCMS_SignedData_verify()\fR was added in OpenSSL 3.2. .SH COPYRIGHT .IX Header "COPYRIGHT" -Copyright 2008\-2022 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2008\-2023 The OpenSSL Project Authors. All Rights Reserved. .PP 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 |