X.509 common definitions. More...
#include "core/crypto.h"
#include "pkc/rsa.h"
#include "pkc/dsa.h"
#include "ecc/ecdsa.h"
#include "ecc/eddsa.h"
#include "date_time.h"
Go to the source code of this file.
Data Structures | |
struct | X509SerialNumber |
Serial number. More... | |
struct | X509Name |
Issuer or subject name. More... | |
struct | X509NameAttribute |
Name attribute. More... | |
struct | X509Validity |
Validity. More... | |
struct | X509AlgoId |
Algorithm identifier. More... | |
struct | X509RsaPublicKey |
RSA public key. More... | |
struct | X509DsaParameters |
DSA domain parameters. More... | |
struct | X509DsaPublicKey |
DSA public key. More... | |
struct | X509EcParameters |
EC parameters. More... | |
struct | X509EcPublicKey |
EC public key. More... | |
struct | X509SubjectPublicKeyInfo |
Subject public key information. More... | |
struct | X509BasicConstraints |
Basic constraints. More... | |
struct | X509NameConstraints |
Name constraints. More... | |
struct | X509KeyUsage |
Key usage. More... | |
struct | X509ExtendedKeyUsage |
Extended key usage. More... | |
struct | X509GeneralName |
General name. More... | |
struct | X509SubjectAltName |
Subject alternative name. More... | |
struct | X509SubjectKeyId |
Subject key identifier. More... | |
struct | X509AuthorityKeyId |
Authority key identifier. More... | |
struct | X509NsCertType |
Netscape certificate type. More... | |
struct | X509Extension |
X.509 certificate extension. More... | |
struct | X509Extensions |
X.509 certificate extensions. More... | |
struct | X509RsaPssParameters |
RSASSA-PSS parameters. More... | |
struct | X509SignatureAlgoId |
Signature algorithm identifier. More... | |
struct | X509SignatureValue |
Signature value. More... | |
struct | X509TbsCertificate |
TBSCertificate structure. More... | |
struct | X509CertificateInfo |
X.509 certificate. More... | |
struct | X509CrlReason |
CRL reason. More... | |
struct | X509InvalidityDate |
Invalidity date. More... | |
struct | X509CertificateIssuer |
Certificate issuer. More... | |
struct | X509CrlEntryExtensions |
CRL extensions. More... | |
struct | X509RevokedCertificate |
Revoked certificate. More... | |
struct | X509CrlNumber |
CRL number. More... | |
struct | X509DeltaCrlIndicator |
Delta CRL indicator. More... | |
struct | X509DistrPointName |
Distribution point name. More... | |
struct | X509IssuingDistrPoint |
Issuing distribution point. More... | |
struct | X509CrlExtensions |
CRL extensions. More... | |
struct | X509TbsCertList |
TBSCertList structure. More... | |
struct | X509CrlInfo |
CRL (Certificate Revocation List) More... | |
struct | X509ChallengePassword |
PKCS #9 ChallengePassword attribute. More... | |
struct | X509Attribute |
CSR attribute. More... | |
struct | X509Attributes |
CSR attributes. More... | |
struct | X509CertRequestInfo |
CertificationRequestInfo structure. More... | |
struct | X509CsrInfo |
CSR (Certificate Signing Request) More... | |
Functions | |
bool_t | x509IsSignAlgoSupported (X509SignatureAlgo signAlgo) |
Check whether a given signature algorithm is supported. More... | |
bool_t | x509IsHashAlgoSupported (X509HashAlgo hashAlgo) |
Check whether a given hash algorithm is supported. More... | |
error_t | x509GetSignHashAlgo (const X509SignatureAlgoId *signAlgoId, X509SignatureAlgo *signAlgo, const HashAlgo **hashAlgo) |
Get the signature and hash algorithms that match the specified identifier. More... | |
X509KeyType | x509GetPublicKeyType (const uint8_t *oid, size_t length) |
Get the public key type that matches the specified OID. More... | |
const EcCurveInfo * | x509GetCurveInfo (const uint8_t *oid, size_t length) |
Get the elliptic curve that matches the specified OID. More... | |
Detailed Description
X.509 common definitions.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2023 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.2.4
Definition in file x509_common.h.
Macro Definition Documentation
◆ X509_BRAINPOOLP160R1_SUPPORT
#define X509_BRAINPOOLP160R1_SUPPORT DISABLED |
Definition at line 254 of file x509_common.h.
◆ X509_BRAINPOOLP192R1_SUPPORT
#define X509_BRAINPOOLP192R1_SUPPORT DISABLED |
Definition at line 261 of file x509_common.h.
◆ X509_BRAINPOOLP224R1_SUPPORT
#define X509_BRAINPOOLP224R1_SUPPORT DISABLED |
Definition at line 268 of file x509_common.h.
◆ X509_BRAINPOOLP256R1_SUPPORT
#define X509_BRAINPOOLP256R1_SUPPORT DISABLED |
Definition at line 275 of file x509_common.h.
◆ X509_BRAINPOOLP320R1_SUPPORT
#define X509_BRAINPOOLP320R1_SUPPORT DISABLED |
Definition at line 282 of file x509_common.h.
◆ X509_BRAINPOOLP384R1_SUPPORT
#define X509_BRAINPOOLP384R1_SUPPORT DISABLED |
Definition at line 289 of file x509_common.h.
◆ X509_BRAINPOOLP512R1_SUPPORT
#define X509_BRAINPOOLP512R1_SUPPORT DISABLED |
Definition at line 296 of file x509_common.h.
◆ X509_DSA_SUPPORT
#define X509_DSA_SUPPORT DISABLED |
Definition at line 65 of file x509_common.h.
◆ X509_ECDSA_SUPPORT
#define X509_ECDSA_SUPPORT ENABLED |
Definition at line 72 of file x509_common.h.
◆ X509_ED25519_SUPPORT
#define X509_ED25519_SUPPORT DISABLED |
Definition at line 303 of file x509_common.h.
◆ X509_ED448_SUPPORT
#define X509_ED448_SUPPORT DISABLED |
Definition at line 310 of file x509_common.h.
◆ X509_MAX_CERT_ISSUER_NAMES
#define X509_MAX_CERT_ISSUER_NAMES 4 |
Definition at line 359 of file x509_common.h.
◆ X509_MAX_CUSTOM_EXTENSIONS
#define X509_MAX_CUSTOM_EXTENSIONS 2 |
Definition at line 366 of file x509_common.h.
◆ X509_MAX_DSA_MODULUS_SIZE
#define X509_MAX_DSA_MODULUS_SIZE 4096 |
Definition at line 338 of file x509_common.h.
◆ X509_MAX_RSA_MODULUS_SIZE
#define X509_MAX_RSA_MODULUS_SIZE 4096 |
Definition at line 324 of file x509_common.h.
◆ X509_MAX_SUBJECT_ALT_NAMES
#define X509_MAX_SUBJECT_ALT_NAMES 4 |
Definition at line 352 of file x509_common.h.
◆ X509_MD5_SUPPORT
#define X509_MD5_SUPPORT DISABLED |
Definition at line 79 of file x509_common.h.
◆ X509_MIN_DSA_MODULUS_SIZE
#define X509_MIN_DSA_MODULUS_SIZE 1024 |
Definition at line 331 of file x509_common.h.
◆ X509_MIN_RSA_MODULUS_SIZE
#define X509_MIN_RSA_MODULUS_SIZE 1024 |
Definition at line 317 of file x509_common.h.
◆ X509_PRIVATE_EXTENSIONS
#define X509_PRIVATE_EXTENSIONS |
Definition at line 373 of file x509_common.h.
◆ X509_RSA_PSS_SUPPORT
#define X509_RSA_PSS_SUPPORT DISABLED |
Definition at line 58 of file x509_common.h.
◆ X509_RSA_SUPPORT
#define X509_RSA_SUPPORT ENABLED |
Definition at line 51 of file x509_common.h.
◆ X509_SECP112R1_SUPPORT
#define X509_SECP112R1_SUPPORT DISABLED |
Definition at line 149 of file x509_common.h.
◆ X509_SECP112R2_SUPPORT
#define X509_SECP112R2_SUPPORT DISABLED |
Definition at line 156 of file x509_common.h.
◆ X509_SECP128R1_SUPPORT
#define X509_SECP128R1_SUPPORT DISABLED |
Definition at line 163 of file x509_common.h.
◆ X509_SECP128R2_SUPPORT
#define X509_SECP128R2_SUPPORT DISABLED |
Definition at line 170 of file x509_common.h.
◆ X509_SECP160K1_SUPPORT
#define X509_SECP160K1_SUPPORT DISABLED |
Definition at line 177 of file x509_common.h.
◆ X509_SECP160R1_SUPPORT
#define X509_SECP160R1_SUPPORT DISABLED |
Definition at line 184 of file x509_common.h.
◆ X509_SECP160R2_SUPPORT
#define X509_SECP160R2_SUPPORT DISABLED |
Definition at line 191 of file x509_common.h.
◆ X509_SECP192K1_SUPPORT
#define X509_SECP192K1_SUPPORT DISABLED |
Definition at line 198 of file x509_common.h.
◆ X509_SECP192R1_SUPPORT
#define X509_SECP192R1_SUPPORT DISABLED |
Definition at line 205 of file x509_common.h.
◆ X509_SECP224K1_SUPPORT
#define X509_SECP224K1_SUPPORT DISABLED |
Definition at line 212 of file x509_common.h.
◆ X509_SECP224R1_SUPPORT
#define X509_SECP224R1_SUPPORT DISABLED |
Definition at line 219 of file x509_common.h.
◆ X509_SECP256K1_SUPPORT
#define X509_SECP256K1_SUPPORT DISABLED |
Definition at line 226 of file x509_common.h.
◆ X509_SECP256R1_SUPPORT
#define X509_SECP256R1_SUPPORT ENABLED |
Definition at line 233 of file x509_common.h.
◆ X509_SECP384R1_SUPPORT
#define X509_SECP384R1_SUPPORT ENABLED |
Definition at line 240 of file x509_common.h.
◆ X509_SECP521R1_SUPPORT
#define X509_SECP521R1_SUPPORT ENABLED |
Definition at line 247 of file x509_common.h.
◆ X509_SERIAL_NUMBER_SIZE
#define X509_SERIAL_NUMBER_SIZE 20 |
Definition at line 345 of file x509_common.h.
◆ X509_SHA1_SUPPORT
#define X509_SHA1_SUPPORT DISABLED |
Definition at line 86 of file x509_common.h.
◆ X509_SHA224_SUPPORT
#define X509_SHA224_SUPPORT DISABLED |
Definition at line 93 of file x509_common.h.
◆ X509_SHA256_SUPPORT
#define X509_SHA256_SUPPORT ENABLED |
Definition at line 100 of file x509_common.h.
◆ X509_SHA384_SUPPORT
#define X509_SHA384_SUPPORT ENABLED |
Definition at line 107 of file x509_common.h.
◆ X509_SHA3_224_SUPPORT
#define X509_SHA3_224_SUPPORT DISABLED |
Definition at line 121 of file x509_common.h.
◆ X509_SHA3_256_SUPPORT
#define X509_SHA3_256_SUPPORT DISABLED |
Definition at line 128 of file x509_common.h.
◆ X509_SHA3_384_SUPPORT
#define X509_SHA3_384_SUPPORT DISABLED |
Definition at line 135 of file x509_common.h.
◆ X509_SHA3_512_SUPPORT
#define X509_SHA3_512_SUPPORT DISABLED |
Definition at line 142 of file x509_common.h.
◆ X509_SHA512_SUPPORT
#define X509_SHA512_SUPPORT ENABLED |
Definition at line 114 of file x509_common.h.
◆ X509_SIGN_CALLBACK_SUPPORT
#define X509_SIGN_CALLBACK_SUPPORT DISABLED |
Definition at line 44 of file x509_common.h.
Enumeration Type Documentation
◆ X509CrlReasons
enum X509CrlReasons |
CRL reasons.
Definition at line 487 of file x509_common.h.
◆ X509ExtKeyUsageBitmap
Extended key usage.
Definition at line 416 of file x509_common.h.
◆ X509GeneralNameType
enum X509GeneralNameType |
General name types.
Definition at line 439 of file x509_common.h.
◆ X509HashAlgo
enum X509HashAlgo |
Hash algorithms.
Definition at line 540 of file x509_common.h.
◆ X509KeyType
enum X509KeyType |
Public Key types.
Enumerator | |
---|---|
X509_KEY_TYPE_UNKNOWN | |
X509_KEY_TYPE_RSA | |
X509_KEY_TYPE_RSA_PSS | |
X509_KEY_TYPE_DSA | |
X509_KEY_TYPE_EC | |
X509_KEY_TYPE_X25519 | |
X509_KEY_TYPE_ED25519 | |
X509_KEY_TYPE_X448 | |
X509_KEY_TYPE_ED448 |
Definition at line 506 of file x509_common.h.
◆ X509KeyUsageBitmap
enum X509KeyUsageBitmap |
Key usage.
Definition at line 398 of file x509_common.h.
◆ X509NsCertTypeBitmap
enum X509NsCertTypeBitmap |
Netscape certificate types.
Enumerator | |
---|---|
X509_NS_CERT_TYPE_SSL_CLIENT | |
X509_NS_CERT_TYPE_SSL_SERVER | |
X509_NS_CERT_TYPE_SSL_CA |
Definition at line 457 of file x509_common.h.
◆ X509ReasonFlags
enum X509ReasonFlags |
Reason flags.
Definition at line 469 of file x509_common.h.
◆ X509SignatureAlgo
enum X509SignatureAlgo |
Signature algorithms.
Enumerator | |
---|---|
X509_SIGN_ALGO_NONE | |
X509_SIGN_ALGO_RSA | |
X509_SIGN_ALGO_RSA_PSS | |
X509_SIGN_ALGO_DSA | |
X509_SIGN_ALGO_ECDSA | |
X509_SIGN_ALGO_ED25519 | |
X509_SIGN_ALGO_ED448 |
Definition at line 524 of file x509_common.h.
◆ X509Version
enum X509Version |
X.509 versions.
Enumerator | |
---|---|
X509_VERSION_1 | |
X509_VERSION_2 | |
X509_VERSION_3 |
Definition at line 386 of file x509_common.h.
Function Documentation
◆ x509GetCurveInfo()
const EcCurveInfo* x509GetCurveInfo | ( | const uint8_t * | oid, |
size_t | length | ||
) |
Get the elliptic curve that matches the specified OID.
- Parameters
-
[in] oid Object identifier [in] length OID length
- Returns
- Elliptic curve domain parameters
Definition at line 853 of file x509_common.c.
◆ x509GetPublicKeyType()
X509KeyType x509GetPublicKeyType | ( | const uint8_t * | oid, |
size_t | length | ||
) |
Get the public key type that matches the specified OID.
- Parameters
-
[in] oid Object identifier [in] length OID length
- Returns
- Public key type
Definition at line 772 of file x509_common.c.
◆ x509GetSignHashAlgo()
error_t x509GetSignHashAlgo | ( | const X509SignatureAlgoId * | signAlgoId, |
X509SignatureAlgo * | signAlgo, | ||
const HashAlgo ** | hashAlgo | ||
) |
Get the signature and hash algorithms that match the specified identifier.
- Parameters
-
[in] signAlgoId Signature algorithm identifier [out] signAlgo Signature algorithm [out] hashAlgo Hash algorithm
- Returns
- Error code
Definition at line 330 of file x509_common.c.
◆ x509IsHashAlgoSupported()
bool_t x509IsHashAlgoSupported | ( | X509HashAlgo | hashAlgo | ) |
Check whether a given hash algorithm is supported.
- Parameters
-
[in] hashAlgo signature hash
- Returns
- TRUE is the signature hash is supported, else FALSE
Definition at line 231 of file x509_common.c.
◆ x509IsSignAlgoSupported()
bool_t x509IsSignAlgoSupported | ( | X509SignatureAlgo | signAlgo | ) |
Check whether a given signature algorithm is supported.
- Parameters
-
[in] signAlgo signature algorithm
- Returns
- TRUE is the signature algorithm is supported, else FALSE
Definition at line 163 of file x509_common.c.
Variable Documentation
◆ X509_ANY_EXT_KEY_USAGE_OID
|
extern |
Definition at line 123 of file x509_common.c.
◆ X509_AUTHORITY_KEY_ID_OID
|
extern |
Definition at line 109 of file x509_common.c.
◆ X509_BASIC_CONSTRAINTS_OID
|
extern |
Definition at line 87 of file x509_common.c.
◆ X509_CERTIFICATE_ISSUER_OID
|
extern |
Definition at line 99 of file x509_common.c.
◆ X509_CERTIFICATE_POLICIES_OID
|
extern |
Definition at line 105 of file x509_common.c.
◆ X509_CHALLENGE_PASSWORD_OID
|
extern |
Definition at line 152 of file x509_common.c.
◆ X509_COMMON_NAME_OID
|
extern |
Definition at line 46 of file x509_common.c.
◆ X509_COUNTRY_NAME_OID
|
extern |
Definition at line 52 of file x509_common.c.
◆ X509_CRL_DISTR_POINTS_OID
|
extern |
Definition at line 103 of file x509_common.c.
◆ X509_CRL_NUMBER_OID
|
extern |
Definition at line 89 of file x509_common.c.
◆ X509_DELTA_CRL_INDICATOR_OID
|
extern |
Definition at line 95 of file x509_common.c.
◆ X509_DN_QUALIFIER_OID
|
extern |
Definition at line 72 of file x509_common.c.
◆ X509_EXTENDED_KEY_USAGE_OID
|
extern |
Definition at line 113 of file x509_common.c.
◆ X509_EXTENSION_REQUEST_OID
|
extern |
Definition at line 154 of file x509_common.c.
◆ X509_FRESHEST_CRL_OID
|
extern |
Definition at line 115 of file x509_common.c.
◆ X509_GENERATION_QUALIFIER_OID
|
extern |
Definition at line 70 of file x509_common.c.
◆ X509_GIVEN_NAME_OID
|
extern |
Definition at line 66 of file x509_common.c.
◆ X509_INHIBIT_ANY_POLICY_OID
|
extern |
Definition at line 117 of file x509_common.c.
◆ X509_INITIALS_OID
|
extern |
Definition at line 68 of file x509_common.c.
◆ X509_INVALIDITY_DATE_OID
|
extern |
Definition at line 93 of file x509_common.c.
◆ X509_ISSUER_ALT_NAME_OID
|
extern |
Definition at line 85 of file x509_common.c.
◆ X509_ISSUING_DISTR_POINT_OID
|
extern |
Definition at line 97 of file x509_common.c.
◆ X509_KEY_USAGE_OID
|
extern |
Definition at line 81 of file x509_common.c.
◆ X509_KP_CLIENT_AUTH_OID
|
extern |
Definition at line 127 of file x509_common.c.
◆ X509_KP_CODE_SIGNING_OID
|
extern |
Definition at line 129 of file x509_common.c.
◆ X509_KP_DOC_SIGNING_OID
|
extern |
Definition at line 149 of file x509_common.c.
◆ X509_KP_EMAIL_PROTECTION_OID
|
extern |
Definition at line 131 of file x509_common.c.
◆ X509_KP_IPSEC_END_SYSTEM_OID
|
extern |
Definition at line 133 of file x509_common.c.
◆ X509_KP_IPSEC_IKE_OID
|
extern |
Definition at line 143 of file x509_common.c.
◆ X509_KP_IPSEC_TUNNEL_OID
|
extern |
Definition at line 135 of file x509_common.c.
◆ X509_KP_IPSEC_USER_OID
|
extern |
Definition at line 137 of file x509_common.c.
◆ X509_KP_OCSP_SIGNING_OID
|
extern |
Definition at line 141 of file x509_common.c.
◆ X509_KP_SERVER_AUTH_OID
|
extern |
Definition at line 125 of file x509_common.c.
◆ X509_KP_SSH_CLIENT_OID
|
extern |
Definition at line 145 of file x509_common.c.
◆ X509_KP_SSH_SERVER_OID
|
extern |
Definition at line 147 of file x509_common.c.
◆ X509_KP_TIME_STAMPING_OID
|
extern |
Definition at line 139 of file x509_common.c.
◆ X509_LOCALITY_NAME_OID
|
extern |
Definition at line 54 of file x509_common.c.
◆ X509_NAME_CONSTRAINTS_OID
|
extern |
Definition at line 101 of file x509_common.c.
◆ X509_NAME_OID
|
extern |
Definition at line 64 of file x509_common.c.
◆ X509_NS_CERT_TYPE_OID
|
extern |
Definition at line 120 of file x509_common.c.
◆ X509_ORGANIZATION_NAME_OID
|
extern |
Definition at line 58 of file x509_common.c.
◆ X509_ORGANIZATIONAL_UNIT_NAME_OID
|
extern |
Definition at line 60 of file x509_common.c.
◆ X509_POLICY_CONSTRAINTS_OID
|
extern |
Definition at line 111 of file x509_common.c.
◆ X509_POLICY_MAPPINGS_OID
|
extern |
Definition at line 107 of file x509_common.c.
◆ X509_PSEUDONYM_OID
|
extern |
Definition at line 74 of file x509_common.c.
◆ X509_REASON_CODE_OID
|
extern |
Definition at line 91 of file x509_common.c.
◆ X509_SERIAL_NUMBER_OID
|
extern |
Definition at line 50 of file x509_common.c.
◆ X509_STATE_OR_PROVINCE_NAME_OID
|
extern |
Definition at line 56 of file x509_common.c.
◆ X509_SUBJECT_ALT_NAME_OID
|
extern |
Definition at line 83 of file x509_common.c.
◆ X509_SUBJECT_DIR_ATTR_OID
|
extern |
Definition at line 77 of file x509_common.c.
◆ X509_SUBJECT_KEY_ID_OID
|
extern |
Definition at line 79 of file x509_common.c.
◆ X509_SURNAME_OID
|
extern |
Definition at line 48 of file x509_common.c.
◆ X509_TITLE_OID
|
extern |
Definition at line 62 of file x509_common.c.