x509.h File Reference
X.509 generic defines and structures. More...
Go to the source code of this file.
Data Structures | |
struct | mbedtls_x509_time |
Container for date and time (precision in seconds). More... | |
Typedefs | |
Structures for parsing X.509 certificates, CRLs and CSRs | |
typedef mbedtls_asn1_buf | mbedtls_x509_buf |
Type-length-value structure that allows for ASN1 using DER. | |
typedef mbedtls_asn1_bitstring | mbedtls_x509_bitstring |
Container for ASN1 bit strings. | |
typedef mbedtls_asn1_named_data | mbedtls_x509_name |
Container for ASN1 named information objects. | |
typedef mbedtls_asn1_sequence | mbedtls_x509_sequence |
Container for a sequence of ASN.1 items. | |
typedef struct mbedtls_x509_time | mbedtls_x509_time |
Container for date and time (precision in seconds). | |
Functions | |
int | mbedtls_x509_dn_gets (char *buf, size_t size, const mbedtls_x509_name *dn) |
Store the certificate DN in printable form into buf; no more than size characters will be written. | |
int | mbedtls_x509_serial_gets (char *buf, size_t size, const mbedtls_x509_buf *serial) |
Store the certificate serial in printable form into buf; no more than size characters will be written. | |
int | mbedtls_x509_time_is_past (const mbedtls_x509_time *to) |
Check a given mbedtls_x509_time against the system time and tell if it's in the past. | |
int | mbedtls_x509_time_is_future (const mbedtls_x509_time *from) |
Check a given mbedtls_x509_time against the system time and tell if it's in the future. | |
int | mbedtls_x509_self_test (int verbose) |
Checkup routine. |
Detailed Description
X.509 generic defines and structures.
Definition in file x509.h.
Function Documentation
int mbedtls_x509_dn_gets | ( | char * | buf, |
size_t | size, | ||
const mbedtls_x509_name * | dn | ||
) |
Store the certificate DN in printable form into buf; no more than size characters will be written.
- Parameters:
-
buf Buffer to write to size Maximum size of buffer dn The X509 name to represent
- Returns:
- The length of the string written (not including the terminated nul byte), or a negative error code.
int mbedtls_x509_self_test | ( | int | verbose ) |
int mbedtls_x509_serial_gets | ( | char * | buf, |
size_t | size, | ||
const mbedtls_x509_buf * | serial | ||
) |
Store the certificate serial in printable form into buf; no more than size characters will be written.
- Parameters:
-
buf Buffer to write to size Maximum size of buffer serial The X509 serial to represent
- Returns:
- The length of the string written (not including the terminated nul byte), or a negative error code.
int mbedtls_x509_time_is_future | ( | const mbedtls_x509_time * | from ) |
Check a given mbedtls_x509_time against the system time and tell if it's in the future.
- Note:
- Intended usage is "if( is_future( valid_from ) ) ERROR". Hence the return value of 1 if on internal errors.
- Parameters:
-
from mbedtls_x509_time to check
- Returns:
- 1 if the given time is in the future or an error occured, 0 otherwise.
int mbedtls_x509_time_is_past | ( | const mbedtls_x509_time * | to ) |
Check a given mbedtls_x509_time against the system time and tell if it's in the past.
- Note:
- Intended usage is "if( is_past( valid_to ) ) ERROR". Hence the return value of 1 if on internal errors.
- Parameters:
-
to mbedtls_x509_time to check
- Returns:
- 1 if the given time is in the past or an error occured, 0 otherwise.
Generated on Tue Jul 12 2022 12:22:34 by
