suricata
util-decode-der-get.c File Reference
Include dependency graph for util-decode-der-get.c:

Go to the source code of this file.

Functions

const Asn1GenericAsn1DerGet (const Asn1Generic *top, const uint8_t *seq_index, const uint32_t seqsz, uint32_t *errcode)
 Iterate through an ASN.1 structure, following the index sequence. Context specific elements are skipped. More...
 
int Asn1DerGetValidity (const Asn1Generic *cert, time_t *not_before, time_t *not_after, uint32_t *errcode)
 
int Asn1DerGetSerial (const Asn1Generic *cert, char *buffer, uint32_t length, uint32_t *errcode)
 
int Asn1DerGetIssuerDN (const Asn1Generic *cert, char *buffer, uint32_t length, uint32_t *errcode)
 
int Asn1DerGetSubjectDN (const Asn1Generic *cert, char *buffer, uint32_t length, uint32_t *errcode)
 

Detailed Description

Function Documentation

const Asn1Generic* Asn1DerGet ( const Asn1Generic top,
const uint8_t *  seq_index,
const uint32_t  seqsz,
uint32_t *  errcode 
)

Iterate through an ASN.1 structure, following the index sequence. Context specific elements are skipped.

Return values
Thematching node, or NULL

Definition at line 143 of file util-decode-der-get.c.

References ASN1_CLASS_CONTEXTSPEC, Asn1Generic_::data, ERR_DER_MISSING_ELEMENT, Asn1Generic_::header, Asn1Generic_::next, and offset.

Referenced by Asn1DerGetIssuerDN(), Asn1DerGetSerial(), Asn1DerGetSubjectDN(), and Asn1DerGetValidity().

Here is the caller graph for this function:

int Asn1DerGetIssuerDN ( const Asn1Generic cert,
char *  buffer,
uint32_t  length,
uint32_t *  errcode 
)
int Asn1DerGetSerial ( const Asn1Generic cert,
char *  buffer,
uint32_t  length,
uint32_t *  errcode 
)

Definition at line 245 of file util-decode-der-get.c.

References ASN1_INTEGER, Asn1DerGet(), ERR_DER_MISSING_ELEMENT, Asn1Generic_::str, strlcat(), and Asn1Generic_::type.

Referenced by SSLVersionToString().

Here is the call graph for this function:

Here is the caller graph for this function:

int Asn1DerGetSubjectDN ( const Asn1Generic cert,
char *  buffer,
uint32_t  length,
uint32_t *  errcode 
)
int Asn1DerGetValidity ( const Asn1Generic cert,
time_t *  not_before,
time_t *  not_after,
uint32_t *  errcode 
)

Definition at line 194 of file util-decode-der-get.c.

References ASN1_GENERALIZEDTIME, ASN1_SEQUENCE, ASN1_UTCTIME, Asn1DerGet(), Asn1Generic_::data, ERR_DER_MISSING_ELEMENT, Asn1Generic_::next, Asn1Generic_::str, and Asn1Generic_::type.

Referenced by SSLVersionToString().

Here is the call graph for this function:

Here is the caller graph for this function: