Asterisk - The Open Source Telephony Project GIT-master-7e7a603
stir_shaken.h
Go to the documentation of this file.
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
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 */
37struct 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 */
46const char *vs_response_code_to_str(
48
49/*!
50 * \brief Return string version of AS response code
51 *
52 * \param as_rc
53 * \return Response string
54 */
55const char *as_response_code_to_str(
57
58/*!
59 * \brief Retrieves the OpenSSL NID for the TN Auth list extension
60 * \retval The NID
61 */
62int get_tn_auth_nid(void);
63
65 X509_STORE *store;
67};
68
69/*!
70 * \brief Retrieves the OpenSSL trusted cert store
71 * \retval The store
72 */
74
75
76#endif /* _STIR_SHAKEN_H */
ast_stir_shaken_as_response_code
ast_stir_shaken_vs_response_code
const char * as_response_code_to_str(enum ast_stir_shaken_as_response_code as_rc)
Return string version of AS response code.
Definition: attestation.c:47
const char * vs_response_code_to_str(enum ast_stir_shaken_vs_response_code vs_rc)
Return string version of VS response code.
Definition: verification.c:90
struct trusted_cert_store * get_trusted_cert_store(void)
Retrieves the OpenSSL trusted cert store.
struct ast_sorcery * get_sorcery(void)
Retrieve the stir/shaken sorcery context.
Definition: common_config.c:34
int get_tn_auth_nid(void)
Retrieves the OpenSSL NID for the TN Auth list extension.
Structure for rwlock and tracking information.
Definition: lock.h:157
Full structure for sorcery.
Definition: sorcery.c:230
X509_STORE * store
Definition: stir_shaken.h:65
ast_rwlock_t store_lock
Definition: stir_shaken.h:66