xref: /openbsd-src/lib/libcrypto/man/CMS_final.3 (revision 569a59c8635a26efce16814257adc7cd2bc8e48d)
1*569a59c8Sschwarze.\" $OpenBSD: CMS_final.3,v 1.6 2019/11/02 15:39:46 schwarze Exp $
254c85986Sschwarze.\" full merge up to: OpenSSL 25ccb589 Jul 1 02:02:06 2019 +0800
354c85986Sschwarze.\"
454c85986Sschwarze.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
554c85986Sschwarze.\" Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
654c85986Sschwarze.\"
754c85986Sschwarze.\" Redistribution and use in source and binary forms, with or without
854c85986Sschwarze.\" modification, are permitted provided that the following conditions
954c85986Sschwarze.\" are met:
1054c85986Sschwarze.\"
1154c85986Sschwarze.\" 1. Redistributions of source code must retain the above copyright
1254c85986Sschwarze.\"    notice, this list of conditions and the following disclaimer.
1354c85986Sschwarze.\"
1454c85986Sschwarze.\" 2. Redistributions in binary form must reproduce the above copyright
1554c85986Sschwarze.\"    notice, this list of conditions and the following disclaimer in
1654c85986Sschwarze.\"    the documentation and/or other materials provided with the
1754c85986Sschwarze.\"    distribution.
1854c85986Sschwarze.\"
1954c85986Sschwarze.\" 3. All advertising materials mentioning features or use of this
2054c85986Sschwarze.\"    software must display the following acknowledgment:
2154c85986Sschwarze.\"    "This product includes software developed by the OpenSSL Project
2254c85986Sschwarze.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
2354c85986Sschwarze.\"
2454c85986Sschwarze.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
2554c85986Sschwarze.\"    endorse or promote products derived from this software without
2654c85986Sschwarze.\"    prior written permission. For written permission, please contact
2754c85986Sschwarze.\"    openssl-core@openssl.org.
2854c85986Sschwarze.\"
2954c85986Sschwarze.\" 5. Products derived from this software may not be called "OpenSSL"
3054c85986Sschwarze.\"    nor may "OpenSSL" appear in their names without prior written
3154c85986Sschwarze.\"    permission of the OpenSSL Project.
3254c85986Sschwarze.\"
3354c85986Sschwarze.\" 6. Redistributions of any form whatsoever must retain the following
3454c85986Sschwarze.\"    acknowledgment:
3554c85986Sschwarze.\"    "This product includes software developed by the OpenSSL Project
3654c85986Sschwarze.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
3754c85986Sschwarze.\"
3854c85986Sschwarze.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
3954c85986Sschwarze.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4054c85986Sschwarze.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
4154c85986Sschwarze.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
4254c85986Sschwarze.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4354c85986Sschwarze.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
4454c85986Sschwarze.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4554c85986Sschwarze.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4654c85986Sschwarze.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
4754c85986Sschwarze.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
4854c85986Sschwarze.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
4954c85986Sschwarze.\" OF THE POSSIBILITY OF SUCH DAMAGE.
5054c85986Sschwarze.\"
51*569a59c8Sschwarze.Dd $Mdocdate: November 2 2019 $
5254c85986Sschwarze.Dt CMS_FINAL 3
5354c85986Sschwarze.Os
5454c85986Sschwarze.Sh NAME
5554c85986Sschwarze.Nm CMS_final
5654c85986Sschwarze.Nd finalise a CMS_ContentInfo structure
5754c85986Sschwarze.Sh SYNOPSIS
5854c85986Sschwarze.In openssl/cms.h
5954c85986Sschwarze.Ft int
6054c85986Sschwarze.Fo CMS_final
6154c85986Sschwarze.Fa "CMS_ContentInfo *cms"
6254c85986Sschwarze.Fa "BIO *data"
6354c85986Sschwarze.Fa "BIO *dcont"
6454c85986Sschwarze.Fa "unsigned int flags"
6554c85986Sschwarze.Fc
6654c85986Sschwarze.Sh DESCRIPTION
6754c85986Sschwarze.Fn CMS_final
6854c85986Sschwarzefinalises the structure
6954c85986Sschwarze.Fa cms .
7054c85986SschwarzeIts purpose is to perform any operations necessary on
7154c85986Sschwarze.Fa cms
7254c85986Sschwarze(digest computation for example) and set the appropriate fields.
7354c85986SschwarzeThe parameter
7454c85986Sschwarze.Fa data
7554c85986Sschwarzecontains the content to be processed.
7654c85986SschwarzeThe
7754c85986Sschwarze.Fa dcont
7854c85986Sschwarzeparameter contains a
7954c85986Sschwarze.Vt BIO
8054c85986Sschwarzeto write content to after processing: this is
8154c85986Sschwarzeonly used with detached data and will usually be set to
8254c85986Sschwarze.Dv NULL .
8354c85986Sschwarze.Pp
8454c85986SschwarzeThis function will normally be called when the
8554c85986Sschwarze.Dv CMS_PARTIAL
8654c85986Sschwarzeflag is used.
8754c85986SschwarzeIt should only be used when streaming is not performed because the
8854c85986Sschwarzestreaming I/O functions perform finalisation operations internally.
8954c85986Sschwarze.Sh RETURN VALUES
9054c85986Sschwarze.Fn CMS_final
9154c85986Sschwarzereturns 1 for success or 0 for failure.
9254c85986Sschwarze.Sh SEE ALSO
9385bbda65Sschwarze.Xr CMS_ContentInfo_new 3 ,
9454c85986Sschwarze.Xr CMS_encrypt 3 ,
9554c85986Sschwarze.Xr CMS_sign 3 ,
9654c85986Sschwarze.Xr ERR_get_error 3
9754c85986Sschwarze.Sh HISTORY
9854c85986Sschwarze.Fn CMS_final
9966a3cb98Sschwarzefirst appeared in OpenSSL 0.9.8h
10066a3cb98Sschwarzeand has been available since
101*569a59c8Sschwarze.Ox 6.7 .
102