SharkSSL™ Embedded SSL/TLS Stack

The peer's certificate information returned by SharkSslCon_getCertInfo. More...

#include <SharkSSL.h>

Data Fields

U16 snLen
 Length of 'sn' (serial number)
 
U8 version
 Certificate version is offset at 0 so add +1 for actual version number.
 
U8 CAflag
 The Certificate Authority flag (CA) is set to one if the certificate is a CA i.e. More...
 
U8 * sn
 Binary serial number. More...
 
U8 * timeFrom
 Certificate is valid from date (in UTCTime format: YYMMDDHHMMSSZ)
 
U8 * timeTo
 Certificate expiration date (in UTCTime format: YYMMDDHHMMSSZ)
 
SharkSslCertDN issuer
 The entity who has signed and issued the certificate (RFC2459 4.1.2.4)
 
SharkSslCertDN subject
 The entity associated with the public key (RFC2459 4.1.2.6).
 
U8 * subjectAltNamesPtr
 Subject Alternative Names subjectAltNamesPtr is a pointer to an ASN1 sequence, whose length is subjectAltNamesLen. More...
 
struct SharkSslCertInfoparent
 Pointer to parent node when the SharkSslCertInfo object is part of a certificate chain. More...
 

Detailed Description

The peer's certificate information returned by SharkSslCon_getCertInfo.

See also
SharkSslCertDN

Field Documentation

◆ CAflag

U8 SharkSslCertInfo::CAflag

The Certificate Authority flag (CA) is set to one if the certificate is a CA i.e.

a root certificate.

◆ parent

struct SharkSslCertInfo* SharkSslCertInfo::parent

Pointer to parent node when the SharkSslCertInfo object is part of a certificate chain.

You walk up the chain until you reach the root.

◆ sn

U8* SharkSslCertInfo::sn

Binary serial number.

The length is provided in 'snLen'

◆ subjectAltNamesPtr

U8* SharkSslCertInfo::subjectAltNamesPtr

Subject Alternative Names subjectAltNamesPtr is a pointer to an ASN1 sequence, whose length is subjectAltNamesLen.

Use the SubjectAltNameEnumerator/SubjectAltName struct as in the SharkSslCon_trusted function in SharkSslEx.c The following example is from certcheck.c:

U8 *tp = SubjectAltName_getPtr(&s);
if (SUBJECTALTNAME_IPADDRESS == SubjectAltName_getTag(&s))
{
xprintf((" IP address: "));
while (l--)
{
xprintf(("%d", *tp++));
if (l)
{
xprintf(("."));
}
}
xprintf(("\n"));
xprintf
#define xprintf(data)
The macro xprintf expands to function _xprintf if the code is compiled with XPRINTF set to 1.
Definition: selib.h:256