X.509 extension parsing. More...
Go to the source code of this file.
Functions | |
error_t | x509ParseCertExtensions (const uint8_t *data, size_t length, size_t *totalLength, X509Extensions *extensions, bool_t ignoreUnknown) |
Parse X.509 certificate extensions. More... | |
error_t | x509ParseExtension (const uint8_t *data, size_t length, size_t *totalLength, X509Extension *extension) |
Parse X.509 certificate extension. More... | |
error_t | x509ParseBasicConstraints (bool_t critical, const uint8_t *data, size_t length, X509BasicConstraints *basicConstraints) |
Parse BasicConstraints extension. More... | |
error_t | x509ParseNameConstraints (bool_t critical, const uint8_t *data, size_t length, X509NameConstraints *nameConstraints) |
Parse NameConstraints extension. More... | |
error_t | x509ParsePolicyConstraints (bool_t critical, const uint8_t *data, size_t length) |
Parse PolicyConstraints extension. More... | |
error_t | x509ParsePolicyMappings (bool_t critical, const uint8_t *data, size_t length) |
Parse PolicyMappings extension. More... | |
error_t | x509ParseInhibitAnyPolicy (bool_t critical, const uint8_t *data, size_t length) |
Parse InhibitAnyPolicy extension. More... | |
error_t | x509ParseKeyUsage (bool_t critical, const uint8_t *data, size_t length, X509KeyUsage *keyUsage) |
Parse KeyUsage extension. More... | |
error_t | x509ParseExtendedKeyUsage (bool_t critical, const uint8_t *data, size_t length, X509ExtendedKeyUsage *extKeyUsage) |
Parse ExtendedKeyUsage extension. More... | |
error_t | x509ParseSubjectAltName (bool_t critical, const uint8_t *data, size_t length, X509SubjectAltName *subjectAltName) |
Parse SubjectAltName extension. More... | |
error_t | x509ParseSubjectKeyId (bool_t critical, const uint8_t *data, size_t length, X509SubjectKeyId *subjectKeyId) |
Parse SubjectKeyIdentifier extension. More... | |
error_t | x509ParseAuthKeyId (bool_t critical, const uint8_t *data, size_t length, X509AuthKeyId *authKeyId) |
Parse AuthorityKeyIdentifier extension. More... | |
error_t | x509ParseCrlDistrPoints (bool_t critical, const uint8_t *data, size_t length, X509CrlDistrPoints *crlDistrPoints) |
Parse CRLDistributionPoints extension. More... | |
error_t | x509ParseDistrPoint (const uint8_t *data, size_t length, size_t *totalLength, X509DistrPoint *distrPoint) |
Parse DistributionPoint field. More... | |
error_t | x509ParseDistrPointName (const uint8_t *data, size_t length, X509DistrPointName *distrPointName) |
Parse DistributionPointName field. More... | |
error_t | x509ParseRelativeName (const uint8_t *data, size_t length, X509NameAttribute *relativeName) |
Parse nameRelativeToCRLIssuer field. More... | |
error_t | x509ParseReasonFlags (const uint8_t *data, size_t length, uint16_t *reasonFlags) |
Parse ReasonFlags field. More... | |
error_t | x509ParseAuthInfoAccess (bool_t critical, const uint8_t *data, size_t length, X509AuthInfoAccess *authInfoAccess) |
Parse AuthorityInformationAccess extension. More... | |
error_t | x509ParseAccessDescription (const uint8_t *data, size_t length, size_t *totalLength, X509AccessDescription *accessDescription) |
Parse AccessDescription field. More... | |
error_t | x509ParsePkixOcspNoCheck (bool_t critical, const uint8_t *data, size_t length, X509PkixOcspNoCheck *pkixOcspNoCheck) |
Parse PkixOcspNoCheck extension. More... | |
error_t | x509ParseNsCertType (bool_t critical, const uint8_t *data, size_t length, X509NsCertType *nsCertType) |
Parse NetscapeCertType extension. More... | |
error_t | x509ParseUnknownCertExtension (const uint8_t *oid, size_t oidLen, bool_t critical, const uint8_t *data, size_t dataLen, X509Extensions *extensions) |
Parse unknown X.509 certificate extension. More... | |
error_t | x509CheckDuplicateExtension (const uint8_t *oid, size_t oidLen, const uint8_t *data, size_t length) |
Check whether the specified extension is a duplicate. More... | |
Detailed Description
X.509 extension parsing.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneCRYPTO Open.
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.
- Version
- 2.4.4
Definition in file x509_cert_ext_parse.h.
Function Documentation
◆ x509CheckDuplicateExtension()
error_t x509CheckDuplicateExtension | ( | const uint8_t * | oid, |
size_t | oidLen, | ||
const uint8_t * | data, | ||
size_t | length | ||
) |
Check whether the specified extension is a duplicate.
- Parameters
-
[in] oid Extension identifier [in] oidLen Length of the extension identifier [in] data Pointer to the extension list [in] length Length of the extension list
- Returns
- Error code
Definition at line 1555 of file x509_cert_ext_parse.c.
◆ x509ParseAccessDescription()
error_t x509ParseAccessDescription | ( | const uint8_t * | data, |
size_t | length, | ||
size_t * | totalLength, | ||
X509AccessDescription * | accessDescription | ||
) |
Parse AccessDescription field.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] accessDescription Information resulting from the parsing process
- Returns
- Error code
Definition at line 1373 of file x509_cert_ext_parse.c.
◆ x509ParseAuthInfoAccess()
error_t x509ParseAuthInfoAccess | ( | bool_t | critical, |
const uint8_t * | data, | ||
size_t | length, | ||
X509AuthInfoAccess * | authInfoAccess | ||
) |
Parse AuthorityInformationAccess extension.
- Parameters
-
[in] critical Critical extension flag [in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] authInfoAccess Information resulting from the parsing process
- Returns
- Error code
Definition at line 1302 of file x509_cert_ext_parse.c.
◆ x509ParseAuthKeyId()
error_t x509ParseAuthKeyId | ( | bool_t | critical, |
const uint8_t * | data, | ||
size_t | length, | ||
X509AuthKeyId * | authKeyId | ||
) |
Parse AuthorityKeyIdentifier extension.
- Parameters
-
[in] critical Critical extension flag [in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] authKeyId Information resulting from the parsing process
- Returns
- Error code
Definition at line 939 of file x509_cert_ext_parse.c.
◆ x509ParseBasicConstraints()
error_t x509ParseBasicConstraints | ( | bool_t | critical, |
const uint8_t * | data, | ||
size_t | length, | ||
X509BasicConstraints * | basicConstraints | ||
) |
Parse BasicConstraints extension.
- Parameters
-
[in] critical Critical extension flag [in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] basicConstraints Information resulting from the parsing process
- Returns
- Error code
Definition at line 354 of file x509_cert_ext_parse.c.
◆ x509ParseCertExtensions()
error_t x509ParseCertExtensions | ( | const uint8_t * | data, |
size_t | length, | ||
size_t * | totalLength, | ||
X509Extensions * | extensions, | ||
bool_t | ignoreUnknown | ||
) |
Parse X.509 certificate extensions.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] extensions Information resulting from the parsing process [in] ignoreUnknown Ignore unknown extensions
- Returns
- Error code
Definition at line 56 of file x509_cert_ext_parse.c.
◆ x509ParseCrlDistrPoints()
error_t x509ParseCrlDistrPoints | ( | bool_t | critical, |
const uint8_t * | data, | ||
size_t | length, | ||
X509CrlDistrPoints * | crlDistrPoints | ||
) |
Parse CRLDistributionPoints extension.
- Parameters
-
[in] critical Critical extension flag [in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] crlDistrPoints Information resulting from the parsing process
- Returns
- Error code
Definition at line 1001 of file x509_cert_ext_parse.c.
◆ x509ParseDistrPoint()
error_t x509ParseDistrPoint | ( | const uint8_t * | data, |
size_t | length, | ||
size_t * | totalLength, | ||
X509DistrPoint * | distrPoint | ||
) |
Parse DistributionPoint field.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] distrPoint Information resulting from the parsing process
- Returns
- Error code
Definition at line 1072 of file x509_cert_ext_parse.c.
◆ x509ParseDistrPointName()
error_t x509ParseDistrPointName | ( | const uint8_t * | data, |
size_t | length, | ||
X509DistrPointName * | distrPointName | ||
) |
Parse DistributionPointName field.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] distrPointName Information resulting from the parsing process
- Returns
- Error code
Definition at line 1155 of file x509_cert_ext_parse.c.
◆ x509ParseExtendedKeyUsage()
error_t x509ParseExtendedKeyUsage | ( | bool_t | critical, |
const uint8_t * | data, | ||
size_t | length, | ||
X509ExtendedKeyUsage * | extKeyUsage | ||
) |
Parse ExtendedKeyUsage extension.
- Parameters
-
[in] critical Critical extension flag [in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] extKeyUsage Information resulting from the parsing process
- Returns
- Error code
Definition at line 699 of file x509_cert_ext_parse.c.
◆ x509ParseExtension()
error_t x509ParseExtension | ( | const uint8_t * | data, |
size_t | length, | ||
size_t * | totalLength, | ||
X509Extension * | extension | ||
) |
Parse X.509 certificate extension.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] extension Information resulting from the parsing process
- Returns
- Error code
Definition at line 267 of file x509_cert_ext_parse.c.
◆ x509ParseInhibitAnyPolicy()
Parse InhibitAnyPolicy extension.
- Parameters
-
[in] critical Critical extension flag [in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure
- Returns
- Error code
Definition at line 610 of file x509_cert_ext_parse.c.
◆ x509ParseKeyUsage()
error_t x509ParseKeyUsage | ( | bool_t | critical, |
const uint8_t * | data, | ||
size_t | length, | ||
X509KeyUsage * | keyUsage | ||
) |
Parse KeyUsage extension.
- Parameters
-
[in] critical Critical extension flag [in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] keyUsage Information resulting from the parsing process
- Returns
- Error code
Definition at line 630 of file x509_cert_ext_parse.c.
◆ x509ParseNameConstraints()
error_t x509ParseNameConstraints | ( | bool_t | critical, |
const uint8_t * | data, | ||
size_t | length, | ||
X509NameConstraints * | nameConstraints | ||
) |
Parse NameConstraints extension.
- Parameters
-
[in] critical Critical extension flag [in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] nameConstraints Information resulting from the parsing process
- Returns
- Error code
Definition at line 445 of file x509_cert_ext_parse.c.
◆ x509ParseNsCertType()
error_t x509ParseNsCertType | ( | bool_t | critical, |
const uint8_t * | data, | ||
size_t | length, | ||
X509NsCertType * | nsCertType | ||
) |
Parse NetscapeCertType extension.
- Parameters
-
[in] critical Critical extension flag [in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] nsCertType Information resulting from the parsing process
- Returns
- Error code
Definition at line 1478 of file x509_cert_ext_parse.c.
◆ x509ParsePkixOcspNoCheck()
error_t x509ParsePkixOcspNoCheck | ( | bool_t | critical, |
const uint8_t * | data, | ||
size_t | length, | ||
X509PkixOcspNoCheck * | pkixOcspNoCheck | ||
) |
Parse PkixOcspNoCheck extension.
- Parameters
-
[in] critical Critical extension flag [in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] pkixOcspNoCheck Information resulting from the parsing process
- Returns
- Error code
Definition at line 1436 of file x509_cert_ext_parse.c.
◆ x509ParsePolicyConstraints()
Parse PolicyConstraints extension.
- Parameters
-
[in] critical Critical extension flag [in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure
- Returns
- Error code
Definition at line 545 of file x509_cert_ext_parse.c.
◆ x509ParsePolicyMappings()
Parse PolicyMappings extension.
- Parameters
-
[in] critical Critical extension flag [in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure
- Returns
- Error code
Definition at line 578 of file x509_cert_ext_parse.c.
◆ x509ParseReasonFlags()
error_t x509ParseReasonFlags | ( | const uint8_t * | data, |
size_t | length, | ||
uint16_t * | reasonFlags | ||
) |
Parse ReasonFlags field.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] reasonFlags Information resulting from the parsing process
- Returns
- Error code
Definition at line 1261 of file x509_cert_ext_parse.c.
◆ x509ParseRelativeName()
error_t x509ParseRelativeName | ( | const uint8_t * | data, |
size_t | length, | ||
X509NameAttribute * | relativeName | ||
) |
Parse nameRelativeToCRLIssuer field.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] relativeName Information resulting from the parsing process
- Returns
- Error code
Definition at line 1205 of file x509_cert_ext_parse.c.
◆ x509ParseSubjectAltName()
error_t x509ParseSubjectAltName | ( | bool_t | critical, |
const uint8_t * | data, | ||
size_t | length, | ||
X509SubjectAltName * | subjectAltName | ||
) |
Parse SubjectAltName extension.
- Parameters
-
[in] critical Critical extension flag [in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] subjectAltName Information resulting from the parsing process
- Returns
- Error code
Definition at line 862 of file x509_cert_ext_parse.c.
◆ x509ParseSubjectKeyId()
error_t x509ParseSubjectKeyId | ( | bool_t | critical, |
const uint8_t * | data, | ||
size_t | length, | ||
X509SubjectKeyId * | subjectKeyId | ||
) |
Parse SubjectKeyIdentifier extension.
- Parameters
-
[in] critical Critical extension flag [in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] subjectKeyId Information resulting from the parsing process
- Returns
- Error code
Definition at line 902 of file x509_cert_ext_parse.c.
◆ x509ParseUnknownCertExtension()
error_t x509ParseUnknownCertExtension | ( | const uint8_t * | oid, |
size_t | oidLen, | ||
bool_t | critical, | ||
const uint8_t * | data, | ||
size_t | dataLen, | ||
X509Extensions * | extensions | ||
) |
Parse unknown X.509 certificate extension.
- Parameters
-
[in] oid Extension identifier [in] oidLen Length of the extension identifier [in] critical Critical extension flag [in] data Extension value [in] dataLen Length of the extension value [out] extensions Information resulting from the parsing process
- Returns
- Error code
Definition at line 1537 of file x509_cert_ext_parse.c.