SharkSSL C/C++ Reference
TLS, cryptography, certificates, and PSA integration

#include <SharkSSL.h>

Data Fields

U16 snLen
 Length of 'sn' (serial number) More...
 
U8 version
 Certificate version is offset at 0 so add +1 for actual version number. More...
 
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 Time format: [YY]YYMMDDHHMMSSZ) UTCTime: 2-digit year; GeneralizedTime: 4-digit year (years > 2050) More...
 
U8 * timeTo
 Certificate expiration date (in Time format: [YY]YYMMDDHHMMSSZ) UTCTime: 2-digit year; GeneralizedTime: 4-digit year (years > 2050) GeneralizedTime: 4-digit year for years > 2050. More...
 
SharkSslCertDN issuer
 The entity who has signed and issued the certificate (RFC 2459 4.1.2.4) More...
 
SharkSslCertDN subject
 The entity associated with the public key (RFC 2459 4.1.2.6). More...
 
U8 * subjectAltNamesPtr
 Subject Alternative Names subjectAltNamesPtr is a pointer to an ASN1 sequence, whose length is subjectAltNamesLen. More...
 
SharkSslSANLen subjectAltNamesLen
 
U8 timeFromLen
 Length of 'timeFrom'. More...
 
U8 timeToLen
 Length of 'timeTo'. More...
 
struct SharkSslCertInfo * parent
 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.

◆ issuer

SharkSslCertDN SharkSslCertInfo::issuer

The entity who has signed and issued the certificate (RFC 2459 4.1.2.4)

◆ 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'

◆ snLen

U16 SharkSslCertInfo::snLen

Length of 'sn' (serial number)

◆ subject

SharkSslCertDN SharkSslCertInfo::subject

The entity associated with the public key (RFC 2459 4.1.2.6).

◆ subjectAltNamesLen

SharkSslSANLen SharkSslCertInfo::subjectAltNamesLen

◆ 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);
#define SubjectAltName_getPtr(o)
Definition: SharkSslEx.h:73
{
xprintf((" IP address: "));
while (l--)
{
xprintf(("%d", *tp++));
if (l)
{
xprintf(("."));
}
}
xprintf(("\n"));
#define SubjectAltName_getTag(o)
Definition: SharkSslEx.h:71
#define SUBJECTALTNAME_IPADDRESS
Definition: SharkSslEx.h:90
#define xprintf(data)
The macro xprintf expands to function _xprintf if the code is compiled with XPRINTF set to 1.
Definition: selib.h:299

◆ timeFrom

U8* SharkSslCertInfo::timeFrom

Certificate is valid from date (in Time format: [YY]YYMMDDHHMMSSZ) UTCTime: 2-digit year; GeneralizedTime: 4-digit year (years > 2050)

◆ timeFromLen

U8 SharkSslCertInfo::timeFromLen

Length of 'timeFrom'.

◆ timeTo

U8* SharkSslCertInfo::timeTo

Certificate expiration date (in Time format: [YY]YYMMDDHHMMSSZ) UTCTime: 2-digit year; GeneralizedTime: 4-digit year (years > 2050) GeneralizedTime: 4-digit year for years > 2050.

◆ timeToLen

U8 SharkSslCertInfo::timeToLen

Length of 'timeTo'.

◆ version

U8 SharkSslCertInfo::version

Certificate version is offset at 0 so add +1 for actual version number.