Asterisk - The Open Source Telephony Project  21.4.1
stir_shaken.h
1 /*
2  * Asterisk -- An open source telephony toolkit.
3  *
4  * Copyright (C) 2020, Sangoma Technologies Corporation
5  *
6  * Kevin Harwell <kharwell@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 #ifndef _STIR_SHAKEN_H
19 #define _STIR_SHAKEN_H
20 
21 #include "asterisk/res_stir_shaken.h"
22 #include "common_config.h"
23 #include "crypto_utils.h"
24 #include "curl_utils.h"
25 #include "attestation.h"
26 #include "verification.h"
27 
28 #define STIR_SHAKEN_ENCRYPTION_ALGORITHM "ES256"
29 #define STIR_SHAKEN_PPT "shaken"
30 #define STIR_SHAKEN_TYPE "passport"
31 
32 /*!
33  * \brief Retrieve the stir/shaken sorcery context
34  *
35  * \retval The stir/shaken sorcery context
36  */
37 struct ast_sorcery *get_sorcery(void);
38 
39 
40 /*!
41  * \brief Return string version of VS response code
42  *
43  * \param vs_rc
44  * \return Response string
45  */
46 const char *vs_response_code_to_str(
47  enum ast_stir_shaken_vs_response_code vs_rc);
48 
49 /*!
50  * \brief Return string version of AS response code
51  *
52  * \param as_rc
53  * \return Response string
54  */
55 const char *as_response_code_to_str(
56  enum ast_stir_shaken_as_response_code as_rc);
57 
58 /*!
59  * \brief Retrieves the OpenSSL NID for the TN Auth list extension
60  * \retval The NID
61  */
62 int get_tn_auth_nid(void);
63 
65  X509_STORE *store;
66  ast_rwlock_t store_lock;
67 };
68 
69 /*!
70  * \brief Retrieves the OpenSSL trusted cert store
71  * \retval The store
72  */
73 struct trusted_cert_store *get_trusted_cert_store(void);
74 
75 
76 #endif /* _STIR_SHAKEN_H */
Full structure for sorcery.
Definition: sorcery.c:230
Structure for rwlock and tracking information.
Definition: lock.h:157