| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 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 |
#define STIR_SHAKEN_VERIFICATION_DS "STIR/SHAKEN/VERIFICATION" |
| 33 |
struct stir_shaken_verification_ds { |
| 34 |
|
| 35 |
char *identity; |
| 36 |
|
| 37 |
char *attestation; |
| 38 |
|
| 39 |
enum ast_stir_shaken_vs_response_code verify_result; |
| 40 |
}; |
| 41 |
|
| 42 |
#define STIR_SHAKEN_ATTESTATION_DS "STIR/SHAKEN/ATTESTATION" |
| 43 |
struct stir_shaken_attestation_ds { |
| 44 |
|
| 45 |
int suppress; |
| 46 |
}; |
| 47 |
|
| 48 |
struct stir_shaken_attestation_ds *ast_stir_shaken_get_attestation_datastore( |
| 49 |
struct ast_channel *chan); |
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
struct ast_sorcery *get_sorcery(void); |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
const char *vs_response_code_to_str( |
| 66 |
enum ast_stir_shaken_vs_response_code vs_rc); |
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
const char *as_response_code_to_str( |
| 75 |
enum ast_stir_shaken_as_response_code as_rc); |
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
int get_tn_auth_nid(void); |
| 82 |
|
| 83 |
struct trusted_cert_store { |
| 84 |
X509_STORE *store; |
| 85 |
ast_rwlock_t store_lock; |
| 86 |
}; |
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
struct trusted_cert_store *get_trusted_cert_store(void); |
| 93 |
|
| 94 |
|
| 95 |
#endif |