Constify OSSL_PROVIDER getter input parameters
[openssl.git] / include / openssl / ess.h
1 /*
2  * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License 2.0 (the "License").  You may not use
5  * this file except in compliance with the License.  You can obtain a copy
6  * in the file LICENSE in the source distribution or at
7  * https://www.openssl.org/source/license.html
8  */
9
10 #ifndef HEADER_ESS_H
11 # define HEADER_ESS_H
12
13 # include <openssl/opensslconf.h>
14
15 # ifdef  __cplusplus
16 extern "C" {
17 # endif
18 # include <openssl/safestack.h>
19 # include <openssl/x509.h>
20 # include <openssl/esserr.h>
21
22 typedef struct ESS_issuer_serial ESS_ISSUER_SERIAL;
23 typedef struct ESS_cert_id ESS_CERT_ID;
24 typedef struct ESS_signing_cert ESS_SIGNING_CERT;
25
26 DEFINE_STACK_OF(ESS_CERT_ID)
27
28 typedef struct ESS_signing_cert_v2_st ESS_SIGNING_CERT_V2;
29 typedef struct ESS_cert_id_v2_st ESS_CERT_ID_V2;
30
31 DEFINE_STACK_OF(ESS_CERT_ID_V2)
32
33 DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_ISSUER_SERIAL)
34 DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_ISSUER_SERIAL, ESS_ISSUER_SERIAL)
35 DECLARE_ASN1_DUP_FUNCTION(ESS_ISSUER_SERIAL)
36
37 DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_CERT_ID)
38 DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_CERT_ID, ESS_CERT_ID)
39 DECLARE_ASN1_DUP_FUNCTION(ESS_CERT_ID)
40
41 DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_SIGNING_CERT)
42 DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_SIGNING_CERT, ESS_SIGNING_CERT)
43 DECLARE_ASN1_DUP_FUNCTION(ESS_SIGNING_CERT)
44 ESS_SIGNING_CERT *ESS_SIGNING_CERT_new_init(X509 *signcert,
45                                             STACK_OF(X509) *certs,
46                                             int issuer_needed);
47
48 DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_CERT_ID_V2)
49 DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_CERT_ID_V2, ESS_CERT_ID_V2)
50 DECLARE_ASN1_DUP_FUNCTION(ESS_CERT_ID_V2)
51
52 DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_SIGNING_CERT_V2)
53 DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_SIGNING_CERT_V2, ESS_SIGNING_CERT_V2)
54 DECLARE_ASN1_DUP_FUNCTION(ESS_SIGNING_CERT_V2)
55 ESS_SIGNING_CERT_V2 *ESS_SIGNING_CERT_V2_new_init(const EVP_MD *hash_alg,
56                                                   X509 *signcert,
57                                                   STACK_OF(X509) *certs,
58                                                   int issuer_needed);
59
60 # ifdef  __cplusplus
61 }
62 # endif
63 #endif