Tor  0.4.7.0-alpha-dev
Macros | Functions | Variables
authcert_parse.c File Reference

Authority certificate parsing. More...

#include "core/or/or.h"
#include "feature/dirparse/authcert_parse.h"
#include "feature/dirparse/parsecommon.h"
#include "feature/dirparse/sigcommon.h"
#include "feature/dirparse/unparseable.h"
#include "feature/nodelist/authcert.h"
#include "lib/memarea/memarea.h"
#include "feature/nodelist/authority_cert_st.h"
#include "feature/dirparse/authcert_members.h"

Go to the source code of this file.

Macros

#define MAX_CERT_SIZE   (128*1024)
 

Functions

authority_cert_tauthority_cert_parse_from_string (const char *s, size_t maxlen, const char **end_of_string)
 

Variables

static token_rule_t dir_key_certificate_table []
 

Detailed Description

Authority certificate parsing.

Definition in file authcert_parse.c.

Function Documentation

◆ authority_cert_parse_from_string()

authority_cert_t* authority_cert_parse_from_string ( const char *  s,
size_t  maxlen,
const char **  end_of_string 
)

Parse a key certificate from s; point end-of-string to the first character after the certificate.

Reject any certificate at least this big; it is probably an overflow, an attack, a bug, or some other nonsense.

Definition at line 35 of file authcert_parse.c.

Variable Documentation

◆ dir_key_certificate_table

token_rule_t dir_key_certificate_table[]
static
Initial value:
= {
AUTHCERT_MEMBERS,
T1("fingerprint", K_FINGERPRINT, CONCAT_ARGS, NO_OBJ ),
}
@ NO_OBJ
Definition: parsecommon.h:219
#define CONCAT_ARGS
Definition: parsecommon.h:266
#define T1(s, t, a, o)
Definition: parsecommon.h:249
#define END_OF_TABLE
Definition: parsecommon.h:243

List of tokens recognized in V3 authority certificates.

Definition at line 25 of file authcert_parse.c.