|
SharkSSL™ Embedded SSL/TLS Stack
|
The peer's certificate information returned by SharkSslCon_getCertInfo.
#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 Time format: [YY]YYMMDDHHMMSSZ) UTCTime: 2-digit year; GeneralizedTime: 4-digit year (years > 2050) | |
| 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. | |
| SharkSslCertDN | issuer |
| The entity who has signed and issued the certificate (RFC 2459 4.1.2.4) | |
| SharkSslCertDN | subject |
| The entity associated with the public key (RFC 2459 4.1.2.6). | |
| U8 * | subjectAltNamesPtr |
| Subject Alternative Names subjectAltNamesPtr is a pointer to an ASN1 sequence, whose length is subjectAltNamesLen. More... | |
| U8 | timeFromLen |
| Length of 'timeFrom'. | |
| U8 | timeToLen |
| Length of 'timeTo'. | |
| struct SharkSslCertInfo * | parent |
| Pointer to parent node when the SharkSslCertInfo object is part of a certificate chain. More... | |
| U8 SharkSslCertInfo::CAflag |
The Certificate Authority flag (CA) is set to one if the certificate is a CA i.e.
a root certificate.
| 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.
| U8* SharkSslCertInfo::sn |
Binary serial number.
The length is provided in 'snLen'
| 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: