Asterisk - The Open Source Telephony Project GIT-master-a358458
Data Structures | Macros | Functions
stir_shaken.h File Reference
#include "asterisk/res_stir_shaken.h"
#include "common_config.h"
#include "crypto_utils.h"
#include "curl_utils.h"
#include "attestation.h"
#include "verification.h"
Include dependency graph for stir_shaken.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  trusted_cert_store
 

Macros

#define STIR_SHAKEN_ENCRYPTION_ALGORITHM   "ES256"
 
#define STIR_SHAKEN_PPT   "shaken"
 
#define STIR_SHAKEN_TYPE   "passport"
 

Functions

const char * as_response_code_to_str (enum ast_stir_shaken_as_response_code as_rc)
 Return string version of AS response code. More...
 
struct ast_sorceryget_sorcery (void)
 Retrieve the stir/shaken sorcery context. More...
 
int get_tn_auth_nid (void)
 Retrieves the OpenSSL NID for the TN Auth list extension. More...
 
struct trusted_cert_storeget_trusted_cert_store (void)
 Retrieves the OpenSSL trusted cert store. More...
 
const char * vs_response_code_to_str (enum ast_stir_shaken_vs_response_code vs_rc)
 Return string version of VS response code. More...
 

Macro Definition Documentation

◆ STIR_SHAKEN_ENCRYPTION_ALGORITHM

#define STIR_SHAKEN_ENCRYPTION_ALGORITHM   "ES256"

Definition at line 28 of file stir_shaken.h.

◆ STIR_SHAKEN_PPT

#define STIR_SHAKEN_PPT   "shaken"

Definition at line 29 of file stir_shaken.h.

◆ STIR_SHAKEN_TYPE

#define STIR_SHAKEN_TYPE   "passport"

Definition at line 30 of file stir_shaken.h.

Function Documentation

◆ as_response_code_to_str()

const char * as_response_code_to_str ( enum ast_stir_shaken_as_response_code  as_rc)

Return string version of AS response code.

Parameters
as_rc
Returns
Response string

Definition at line 47 of file attestation.c.

49{
50 return ARRAY_IN_BOUNDS(as_rc, as_rc_map) ?
51 as_rc_map[as_rc] : NULL;
52}
static const char * as_rc_map[]
Definition: attestation.c:31
#define NULL
Definition: resample.c:96
#define ARRAY_IN_BOUNDS(v, a)
Checks to see if value is within the bounds of the given array.
Definition: utils.h:687

References ARRAY_IN_BOUNDS, as_rc_map, and NULL.

◆ get_sorcery()

struct ast_sorcery * get_sorcery ( void  )

◆ get_tn_auth_nid()

int get_tn_auth_nid ( void  )

Retrieves the OpenSSL NID for the TN Auth list extension.

Return values
TheNID

Definition at line 41 of file res_stir_shaken.c.

42{
43 return tn_auth_list_nid;
44}
static int tn_auth_list_nid

References tn_auth_list_nid.

Referenced by check_tn_auth_list().

◆ get_trusted_cert_store()

struct trusted_cert_store * get_trusted_cert_store ( void  )

Retrieves the OpenSSL trusted cert store.

Return values
Thestore

◆ vs_response_code_to_str()

const char * vs_response_code_to_str ( enum ast_stir_shaken_vs_response_code  vs_rc)

Return string version of VS response code.

Parameters
vs_rc
Returns
Response string

Definition at line 90 of file verification.c.

92{
93 return ARRAY_IN_BOUNDS(vs_rc, vs_rc_map) ?
94 vs_rc_map[vs_rc] : NULL;
95}
static const char * vs_rc_map[]
Definition: verification.c:54

References ARRAY_IN_BOUNDS, NULL, and vs_rc_map.

Referenced by ast_stir_shaken_vs_verify(), and func_read().