SharkSSL™ Embedded SSL/TLS Stack
Peer's certificate information

Certificate information returned by SharkSslCon_getCertInfo. More...

Data Structures

struct  SharkSslCertDN
 Certificate KeyUsage and ExtendedKeyUsage flags and relative pseudofunctions. More...
 
struct  SharkSslCertInfo
 The peer's certificate information returned by SharkSslCon_getCertInfo. More...
 

Typedefs

typedef struct SharkSslCertDN SharkSslCertDN
 Certificate KeyUsage and ExtendedKeyUsage flags and relative pseudofunctions. More...
 
typedef struct SharkSslCertInfo SharkSslCertInfo
 The peer's certificate information returned by SharkSslCon_getCertInfo. More...
 

Detailed Description

Certificate information returned by SharkSslCon_getCertInfo.

Typedef Documentation

◆ SharkSslCertDN

Certificate KeyUsage and ExtendedKeyUsage flags and relative pseudofunctions.

Certificate Distinguished Name

Example from certcheck.c:

xprintf(("-------- Begin Cert Info -----------\n"));
while (ci)
{
SharkSslCertDN *dn = &(ci->subject);
xprintf(("certificate content:\r\n"));
xprintf(("Subject:\n"));
printCertField(dn->countryName, dn->countryNameLen);
printCertField(dn->province, dn->provinceLen);
printCertField(dn->locality, dn->localityLen);
printCertField(dn->organization, dn->organizationLen);
printCertField(dn->commonName, dn->commonNameLen);
if (ci->subjectAltNamesLen)
{
SubjectAltNameEnumerator_constructor(
&se, ci->subjectAltNamesPtr, ci->subjectAltNamesLen);
xprintf((" subject's alternate DNS names/IP addresses:\n"));
for (SubjectAltNameEnumerator_getElement(&se, &s);
SubjectAltName_isValid(&s);
SubjectAltNameEnumerator_nextElement(&se, &s))
{
U16 l = SubjectAltName_getLen(&s);
U8 *tp = SubjectAltName_getPtr(&s);
if (SUBJECTALTNAME_IPADDRESS == SubjectAltName_getTag(&s))
{
xprintf((" IP address: "));
while (l--)
{
xprintf(("%d", *tp++));
if (l)
{
xprintf(("."));
}
}
xprintf(("\n"));
}
else if (SUBJECTALTNAME_DNSNAME == SubjectAltName_getTag(&s))
{
xprintf((" DNS name: "));
while (l--)
{
xprintf(("%c", *tp++));
}
xprintf(("\n"));
}
}
xprintf(("\n"));
}
dn = &(ci->issuer);
xprintf(("Issuer:\n"));
printCertField(dn->countryName, dn->countryNameLen);
printCertField(dn->province, dn->provinceLen);
printCertField(dn->locality, dn->localityLen);
printCertField(dn->organization, dn->organizationLen);
printCertField(dn->commonName, dn->commonNameLen);
if (ci->parent)
{
xprintf(("\nparent's "));
ci = ci->parent;
}
else
break;
}
xprintf(("--------- End Cert Info ------------\n"));
See also
SharkSslCertInfo

◆ SharkSslCertInfo

The peer's certificate information returned by SharkSslCon_getCertInfo.

See also
SharkSslCertDN
SharkSslCertDN::commonNameLen
U8 commonNameLen
length in bytes of the field "unit"
Definition: SharkSSL.h:942
SharkSslCertDN
Certificate KeyUsage and ExtendedKeyUsage flags and relative pseudofunctions.
Definition: SharkSSL.h:925
SubjectAltName
SubjectAltName.
Definition: SharkSslEx.h:58
SharkSslCertDN::organization
const U8 * organization
Organization Name (company or department)
Definition: SharkSSL.h:929
SharkSslCertDN::provinceLen
U8 provinceLen
length in bytes of the field "country"
Definition: SharkSSL.h:938
SharkSslCertDN::countryName
const U8 * countryName
ISO3166 country code.
Definition: SharkSSL.h:926
SharkSslCertDN::province
const U8 * province
State or Province.
Definition: SharkSSL.h:927
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
SharkSslCertDN::organizationLen
U8 organizationLen
length in bytes of the field "locality"
Definition: SharkSSL.h:940
SharkSslCertDN::locality
const U8 * locality
The city or town name.
Definition: SharkSSL.h:928
SubjectAltNameEnumerator
SubjectAltName Iterator.
Definition: SharkSslEx.h:49
SharkSslCertDN::localityLen
U8 localityLen
length in bytes of the field "province"
Definition: SharkSSL.h:939
SharkSslCertDN::commonName
const U8 * commonName
Common Name is the Host + Domain Name (example: www.mycompany.com, where www is host and mycompany....
Definition: SharkSSL.h:934