Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
x509.h File Reference
X.509 generic defines and structures. More...
Go to the source code of this file.
Data Structures | |
| struct | _x509_time |
| Container for date and time (precision in seconds). More... | |
Typedefs | |
Structures for parsing X.509 certificates, CRLs and CSRs | |
| typedef asn1_buf | x509_buf |
| Type-length-value structure that allows for ASN1 using DER. | |
| typedef asn1_bitstring | x509_bitstring |
| Container for ASN1 bit strings. | |
| typedef asn1_named_data | x509_name |
| Container for ASN1 named information objects. | |
| typedef asn1_sequence | x509_sequence |
| Container for a sequence of ASN.1 items. | |
| typedef struct _x509_time | x509_time |
| Container for date and time (precision in seconds). | |
Functions | |
| int | x509_dn_gets (char *buf, size_t size, const x509_name *dn) |
| Store the certificate DN in printable form into buf; no more than size characters will be written. | |
| int | x509_serial_gets (char *buf, size_t size, const x509_buf *serial) |
| Store the certificate serial in printable form into buf; no more than size characters will be written. | |
| const char * | x509_oid_get_description (x509_buf *oid) |
| Give an known OID, return its descriptive string. | |
| int | x509_oid_get_numeric_string (char *buf, size_t size, x509_buf *oid) |
| Give an OID, return a string version of its OID number. | |
| int | x509_time_expired (const x509_time *time) |
| Check a given x509_time against the system time and check if it is not expired. | |
| int | x509_time_future (const x509_time *time) |
| Check a given x509_time against the system time and check if it is not from the future. | |
| int | x509_self_test (int verbose) |
| Checkup routine. | |
Detailed Description
X.509 generic defines and structures.
Copyright (C) 2006-2014, Brainspark B.V.
This file is part of PolarSSL (http://www.polarssl.org) Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Definition in file x509.h.
Function Documentation
| int x509_dn_gets | ( | char * | buf, |
| size_t | size, | ||
| const 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 amount of data written to the buffer, or -1 in case of an error.
| const char* x509_oid_get_description | ( | x509_buf * | oid ) |
Give an known OID, return its descriptive string.
(Deprecated. Use oid_get_extended_key_usage() instead.) Warning: only works for extended_key_usage OIDs!
- Parameters:
-
oid buffer containing the oid
- Returns:
- Return a string if the OID is known, or NULL otherwise.
| int x509_oid_get_numeric_string | ( | char * | buf, |
| size_t | size, | ||
| x509_buf * | oid | ||
| ) |
Give an OID, return a string version of its OID number.
(Deprecated. Use oid_get_numeric_string() instead)
- Parameters:
-
buf Buffer to write to size Maximum size of buffer oid Buffer containing the OID
- Returns:
- Length of the string written (excluding final NULL) or POLARSSL_ERR_OID_BUF_TO_SMALL in case of error
| int x509_self_test | ( | int | verbose ) |
| int x509_serial_gets | ( | char * | buf, |
| size_t | size, | ||
| const 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 amount of data written to the buffer, or -1 in case of an error.
| int x509_time_expired | ( | const x509_time * | time ) |
Generated on Tue Jul 12 2022 19:40:22 by
1.7.2