Macros | Functions | Variables
x509_trs.c File Reference
#include <openssl/err.h>
#include <openssl/mem.h>
#include <openssl/obj.h>
#include <openssl/x509v3.h>
#include "../x509v3/internal.h"
#include "internal.h"
Include dependency graph for x509_trs.c:

Go to the source code of this file.

Macros

#define X509_TRUST_COUNT   (sizeof(trstandard)/sizeof(X509_TRUST))
 

Functions

static int obj_trust (int id, X509 *x, int flags)
 
static STACK_OF (X509_TRUST)
 
static int tr_cmp (const X509_TRUST **a, const X509_TRUST **b)
 
static void trtable_free (X509_TRUST *p)
 
static int trust_1oid (X509_TRUST *trust, X509 *x, int flags)
 
static int trust_1oidany (X509_TRUST *trust, X509 *x, int flags)
 
static int trust_compat (X509_TRUST *trust, X509 *x, int flags)
 
int X509_check_trust (X509 *x, int id, int flags)
 
int X509_TRUST_add (int id, int flags, int(*ck)(X509_TRUST *, X509 *, int), char *name, int arg1, void *arg2)
 
void X509_TRUST_cleanup (void)
 
X509_TRUSTX509_TRUST_get0 (int idx)
 
char * X509_TRUST_get0_name (const X509_TRUST *xp)
 
int X509_TRUST_get_by_id (int id)
 
int X509_TRUST_get_count (void)
 
int X509_TRUST_get_flags (const X509_TRUST *xp)
 
int X509_TRUST_get_trust (const X509_TRUST *xp)
 
int X509_TRUST_set (int *t, int trust)
 

Variables

static int(* default_trust )(int id, X509 *x, int flags) = obj_trust
 
static X509_TRUST trstandard []
 
int(*)(int, X509 *, intX509_TRUST_set_default (int(*trust)(int, X509 *, int))
 

Macro Definition Documentation

◆ X509_TRUST_COUNT

#define X509_TRUST_COUNT   (sizeof(trstandard)/sizeof(X509_TRUST))

Definition at line 100 of file x509_trs.c.

Function Documentation

◆ obj_trust()

static int obj_trust ( int  id,
X509 x,
int  flags 
)
static

Definition at line 308 of file x509_trs.c.

◆ STACK_OF()

static STACK_OF ( X509_TRUST  )
static

Definition at line 102 of file x509_trs.c.

◆ tr_cmp()

static int tr_cmp ( const X509_TRUST **  a,
const X509_TRUST **  b 
)
static

◆ trtable_free()

static void trtable_free ( X509_TRUST p)
static

Definition at line 245 of file x509_trs.c.

◆ trust_1oid()

static int trust_1oid ( X509_TRUST trust,
X509 x,
int  flags 
)
static

Definition at line 291 of file x509_trs.c.

◆ trust_1oidany()

static int trust_1oidany ( X509_TRUST trust,
X509 x,
int  flags 
)
static

Definition at line 280 of file x509_trs.c.

◆ trust_compat()

static int trust_compat ( X509_TRUST trust,
X509 x,
int  flags 
)
static

Definition at line 298 of file x509_trs.c.

◆ X509_check_trust()

int X509_check_trust ( X509 x,
int  id,
int  flags 
)

Definition at line 117 of file x509_trs.c.

◆ X509_TRUST_add()

int X509_TRUST_add ( int  id,
int  flags,
int(*)(X509_TRUST *, X509 *, int ck,
char *  name,
int  arg1,
void *  arg2 
)

Definition at line 181 of file x509_trs.c.

◆ X509_TRUST_cleanup()

void X509_TRUST_cleanup ( void  )

Definition at line 256 of file x509_trs.c.

◆ X509_TRUST_get0()

X509_TRUST* X509_TRUST_get0 ( int  idx)

Definition at line 145 of file x509_trs.c.

◆ X509_TRUST_get0_name()

char* X509_TRUST_get0_name ( const X509_TRUST xp)

Definition at line 270 of file x509_trs.c.

◆ X509_TRUST_get_by_id()

int X509_TRUST_get_by_id ( int  id)

Definition at line 154 of file x509_trs.c.

◆ X509_TRUST_get_count()

int X509_TRUST_get_count ( void  )

Definition at line 138 of file x509_trs.c.

◆ X509_TRUST_get_flags()

int X509_TRUST_get_flags ( const X509_TRUST xp)

Definition at line 265 of file x509_trs.c.

◆ X509_TRUST_get_trust()

int X509_TRUST_get_trust ( const X509_TRUST xp)

Definition at line 275 of file x509_trs.c.

◆ X509_TRUST_set()

int X509_TRUST_set ( int t,
int  trust 
)

Definition at line 171 of file x509_trs.c.

Variable Documentation

◆ default_trust

int(* default_trust) (int id, X509 *x, int flags) = obj_trust
static

Definition at line 74 of file x509_trs.c.

◆ trstandard

X509_TRUST trstandard[]
static
Initial value:
= {
{X509_TRUST_COMPAT, 0, trust_compat, (char *)"compatible", 0, NULL},
{X509_TRUST_SSL_CLIENT, 0, trust_1oidany, (char *)"SSL Client",
{X509_TRUST_SSL_SERVER, 0, trust_1oidany, (char *)"SSL Server",
{X509_TRUST_EMAIL, 0, trust_1oidany, (char *)"S/MIME email",
{X509_TRUST_OBJECT_SIGN, 0, trust_1oidany, (char *)"Object Signer",
NID_code_sign, NULL},
{X509_TRUST_OCSP_SIGN, 0, trust_1oid, (char *)"OCSP responder",
NID_OCSP_sign, NULL},
{X509_TRUST_OCSP_REQUEST, 0, trust_1oid, (char *)"OCSP request",
NID_ad_OCSP, NULL},
{X509_TRUST_TSA, 0, trust_1oidany, (char *)"TSA server", NID_time_stamp,
NULL}
}

Definition at line 82 of file x509_trs.c.

◆ X509_TRUST_set_default

int(*)(int, X509 *, int) X509_TRUST_set_default(int(*trust)(int, X509 *, int))

Definition at line 109 of file x509_trs.c.

NID_server_auth
#define NID_server_auth
Definition: nid.h:662
X509_TRUST_OBJECT_SIGN
#define X509_TRUST_OBJECT_SIGN
Definition: x509.h:165
X509_TRUST_SSL_SERVER
#define X509_TRUST_SSL_SERVER
Definition: x509.h:163
X509_TRUST_OCSP_SIGN
#define X509_TRUST_OCSP_SIGN
Definition: x509.h:166
X509_TRUST_TSA
#define X509_TRUST_TSA
Definition: x509.h:168
trust_1oid
static int trust_1oid(X509_TRUST *trust, X509 *x, int flags)
Definition: x509_trs.c:291
X509_TRUST_OCSP_REQUEST
#define X509_TRUST_OCSP_REQUEST
Definition: x509.h:167
NID_email_protect
#define NID_email_protect
Definition: nid.h:677
NID_code_sign
#define NID_code_sign
Definition: nid.h:672
trust_1oidany
static int trust_1oidany(X509_TRUST *trust, X509 *x, int flags)
Definition: x509_trs.c:280
NID_ad_OCSP
#define NID_ad_OCSP
Definition: nid.h:892
X509_TRUST_EMAIL
#define X509_TRUST_EMAIL
Definition: x509.h:164
NID_client_auth
#define NID_client_auth
Definition: nid.h:667
X509_TRUST_COMPAT
#define X509_TRUST_COMPAT
Definition: x509.h:161
X509_TRUST_SSL_CLIENT
#define X509_TRUST_SSL_CLIENT
Definition: x509.h:162
NID_OCSP_sign
#define NID_OCSP_sign
Definition: nid.h:902
NID_time_stamp
#define NID_time_stamp
Definition: nid.h:682
trust_compat
static int trust_compat(X509_TRUST *trust, X509 *x, int flags)
Definition: x509_trs.c:298


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:38