Debian Codegraph @

res/res_stir_shaken/verification.h

raw symbols SCIP
1 /*
2 * Asterisk -- An open source telephony toolkit.
3 *
4 * Copyright (C) 2023, Sangoma Technologies Corporation
5 *
6 * George Joseph <[email protected]>
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
24 struct ast_stir_shaken_vs_ctx {
25 AST_DECLARE_STRING_FIELDS(
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 STACK_OF(X509) *cert_chain;
49 enum ast_stir_shaken_vs_response_code failure_reason;
50 };
51
52 /*!
53 * \brief Load the stir/shaken verification service
54 *
55 * \retval 0 on success
56 * \retval -1 on error
57 */
58 int vs_load(void);
59
60 /*!
61 * \brief Reload the stir/shaken verification service
62 *
63 * \retval 0 on success
64 * \retval -1 on error
65 */
66 int vs_reload(void);
67
68 /*!
69 * \brief Unload the stir/shaken verification service
70 *
71 * \retval 0 on success
72 * \retval -1 on error
73 */
74 int vs_unload(void);
75
76 #endif /* VERIFICATION_H_ */