Asterisk - The Open Source Telephony Project  21.4.1
verification.h
1 /*
2  * Asterisk -- An open source telephony toolkit.
3  *
4  * Copyright (C) 2023, Sangoma Technologies Corporation
5  *
6  * George Joseph <gjoseph@sangoma.com>
7  *
8  * See http://www.asterisk.org for more information about
9  * the Asterisk project. Please do not directly contact
10  * any of the maintainers of this project for assistance;
11  * the project provides a web site, mailing lists and IRC
12  * channels for your use.
13  *
14  * This program is free software, distributed under the terms of
15  * the GNU General Public License Version 2. See the LICENSE file
16  * at the top of the source tree.
17  */
18 
19 #ifndef VERIFICATION_H_
20 #define VERIFICATION_H_
21 
22 #include "common_config.h"
23 
26  AST_STRING_FIELD(tag);
27  AST_STRING_FIELD(caller_id);
28  AST_STRING_FIELD(orig_tn);
29  AST_STRING_FIELD(identity_hdr);
30  AST_STRING_FIELD(date_hdr);
31  AST_STRING_FIELD(filename);
32  AST_STRING_FIELD(public_url);
33  AST_STRING_FIELD(hash);
34  AST_STRING_FIELD(hash_family);
35  AST_STRING_FIELD(url_family);
36  AST_STRING_FIELD(attestation);
37  AST_STRING_FIELD(cert_spc);
38  AST_STRING_FIELD(cert_cn);
39  );
40  struct profile_cfg *eprofile;
41  struct ast_channel *chan;
42  time_t date_hdr_time;
43  time_t validity_check_time;
44  long raw_key_len;
45  unsigned char *raw_key;
46  char expiration[32];
47  X509 *xcert;
48  enum ast_stir_shaken_vs_response_code failure_reason;
49 };
50 
51 /*!
52  * \brief Load the stir/shaken verification service
53  *
54  * \retval 0 on success
55  * \retval -1 on error
56  */
57 int vs_load(void);
58 
59 /*!
60  * \brief Reload the stir/shaken verification service
61  *
62  * \retval 0 on success
63  * \retval -1 on error
64  */
65 int vs_reload(void);
66 
67 /*!
68  * \brief Unload the stir/shaken verification service
69  *
70  * \retval 0 on success
71  * \retval -1 on error
72  */
73 int vs_unload(void);
74 
75 #endif /* VERIFICATION_H_ */
Main Channel structure associated with a channel.
#define AST_DECLARE_STRING_FIELDS(field_list)
Declare the fields needed in a structure.
Definition: stringfields.h:341
#define AST_STRING_FIELD(name)
Declare a string field.
Definition: stringfields.h:303
Profile configuration for stir/shaken.