]> git.ipfire.org Git - thirdparty/strongswan.git/blame - src/libstrongswan/plugins/pkcs7/pkcs7_data.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libstrongswan / plugins / pkcs7 / pkcs7_data.h
CommitLineData
83ed1464
MW
1/*
2 * Copyright (C) 2012 Martin Willi
19ef2aec
TB
3 *
4 * Copyright (C) secunet Security Networks AG
83ed1464
MW
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 */
16
17/**
18 * @defgroup pkcs7_data pkcs7_data
e96d945d 19 * @{ @ingroup pkcs7p
83ed1464
MW
20 */
21
22#ifndef PKCS7_DATA_H_
23#define PKCS7_DATA_H_
24
25#include <credentials/builder.h>
26#include <credentials/containers/pkcs7.h>
27
28/**
29 * Parse a PKCS#7 "data" container.
30 *
31 * @param encoding full contentInfo encoding
32 * @param content DER encoded content from contentInfo
33 * @return CONTAINER_PKCS7_DATA container, NULL on failure
34 */
35pkcs7_t *pkcs7_data_load(chunk_t encoding, chunk_t content);
36
3c2986bf
MW
37/**
38 * Generate a PKCS#7 data container.
39 *
40 * The only accepted builder argument is BUILDER_BLOB.
41 *
42 * @param type container type, must be CONTAINER_PKCS7_DATA
43 * @param args builder_t arguments to use.
44 */
45pkcs7_t *pkcs7_data_gen(container_type_t type, va_list args);
46
83ed1464 47#endif /** PKCS7_DATA_H_ @}*/