]> git.ipfire.org Git - thirdparty/openssl.git/blob - include/openssl/ess.h.in
ESS: Export three core functions, clean up TS and CMS CAdES-BES usage
[thirdparty/openssl.git] / include / openssl / ess.h.in
1 /*
2 * {- join("\n * ", @autowarntext) -}
3 *
4 * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
5 *
6 * Licensed under the Apache License 2.0 (the "License"). You may not use
7 * this file except in compliance with the License. You can obtain a copy
8 * in the file LICENSE in the source distribution or at
9 * https://www.openssl.org/source/license.html
10 */
11
12 {-
13 use OpenSSL::stackhash qw(generate_stack_macros);
14 -}
15
16 #ifndef OPENSSL_ESS_H
17 # define OPENSSL_ESS_H
18 # pragma once
19
20 # include <openssl/opensslconf.h>
21
22 # include <openssl/safestack.h>
23 # include <openssl/x509.h>
24 # include <openssl/esserr.h>
25
26 # ifdef __cplusplus
27 extern "C" {
28 # endif
29
30
31 typedef struct ESS_issuer_serial ESS_ISSUER_SERIAL;
32 typedef struct ESS_cert_id ESS_CERT_ID;
33 typedef struct ESS_signing_cert ESS_SIGNING_CERT;
34
35 {-
36 generate_stack_macros("ESS_CERT_ID");
37 -}
38
39
40 typedef struct ESS_signing_cert_v2_st ESS_SIGNING_CERT_V2;
41 typedef struct ESS_cert_id_v2_st ESS_CERT_ID_V2;
42
43 {-
44 generate_stack_macros("ESS_CERT_ID_V2");
45 -}
46
47 DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_ISSUER_SERIAL)
48 DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_ISSUER_SERIAL, ESS_ISSUER_SERIAL)
49 DECLARE_ASN1_DUP_FUNCTION(ESS_ISSUER_SERIAL)
50
51 DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_CERT_ID)
52 DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_CERT_ID, ESS_CERT_ID)
53 DECLARE_ASN1_DUP_FUNCTION(ESS_CERT_ID)
54
55 DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_SIGNING_CERT)
56 DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_SIGNING_CERT, ESS_SIGNING_CERT)
57 DECLARE_ASN1_DUP_FUNCTION(ESS_SIGNING_CERT)
58
59 DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_CERT_ID_V2)
60 DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_CERT_ID_V2, ESS_CERT_ID_V2)
61 DECLARE_ASN1_DUP_FUNCTION(ESS_CERT_ID_V2)
62
63 DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_SIGNING_CERT_V2)
64 DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_SIGNING_CERT_V2, ESS_SIGNING_CERT_V2)
65 DECLARE_ASN1_DUP_FUNCTION(ESS_SIGNING_CERT_V2)
66
67 ESS_SIGNING_CERT *OSSL_ESS_signing_cert_new_init(const X509 *signcert,
68 const STACK_OF(X509) *certs,
69 int set_issuer_serial);
70 ESS_SIGNING_CERT_V2 *OSSL_ESS_signing_cert_v2_new_init(const EVP_MD *hash_alg,
71 const X509 *signcert,
72 const
73 STACK_OF(X509) *certs,
74 int set_issuer_serial);
75 int OSSL_ESS_check_signing_certs(const ESS_SIGNING_CERT *ss,
76 const ESS_SIGNING_CERT_V2 *ssv2,
77 const STACK_OF(X509) *chain,
78 int require_signing_cert);
79
80 # ifdef __cplusplus
81 }
82 # endif
83 #endif