QSC Post Quantum Cryptographic Library 1.3.0.0 (C1)
A post quantum secure library written in Ansi C
Loading...
Searching...
No Matches
x509types.h
1/* 2020-2026 Quantum Resistant Cryptographic Solutions Corporation
2 * All Rights Reserved.
3 *
4 * NOTICE:
5 * This software and all accompanying materials are the exclusive property of
6 * Quantum Resistant Cryptographic Solutions Corporation (QRCS). The intellectual
7 * and technical concepts contained herein are proprietary to QRCS and are
8 * protected under applicable Canadian, U.S., and international copyright,
9 * patent, and trade secret laws.
10 *
11 * CRYPTOGRAPHIC ALGORITHMS AND IMPLEMENTATIONS:
12 * - This software includes implementations of cryptographic primitives and
13 * algorithms that are standardized or in the public domain, such as AES
14 * and SHA-3, which are not proprietary to QRCS.
15 * - This software also includes cryptographic primitives, constructions, and
16 * algorithms designed by QRCS, including but not limited to RCS, SCB, CSX, QMAC, and
17 * related components, which are proprietary to QRCS.
18 * - All source code, implementations, protocol compositions, optimizations,
19 * parameter selections, and engineering work contained in this software are
20 * original works of QRCS and are protected under this license.
21 *
22 * LICENSE AND USE RESTRICTIONS:
23 * - This software is licensed under the Quantum Resistant Cryptographic Solutions
24 * Public Research and Evaluation License (QRCS-PREL), 2025-2026.
25 * - Permission is granted solely for non-commercial evaluation, academic research,
26 * cryptographic analysis, interoperability testing, and feasibility assessment.
27 * - Commercial use, production deployment, commercial redistribution, or
28 * integration into products or services is strictly prohibited without a
29 * separate written license agreement executed with QRCS.
30 * - Licensing and authorized distribution are solely at the discretion of QRCS.
31 *
32 * EXPERIMENTAL CRYPTOGRAPHY NOTICE:
33 * Portions of this software may include experimental, novel, or evolving
34 * cryptographic designs. Use of this software is entirely at the user's risk.
35 *
36 * DISCLAIMER:
37 * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
38 * IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS
39 * FOR A PARTICULAR PURPOSE, SECURITY, OR NON-INFRINGEMENT. QRCS DISCLAIMS ALL
40 * LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
41 * ARISING FROM THE USE OR MISUSE OF THIS SOFTWARE.
42 *
43 * FULL LICENSE:
44 * This software is subject to the Quantum Resistant Cryptographic Solutions
45 * Public Research and Evaluation License (QRCS-PREL), 2025-2026. The complete license terms
46 * are provided in the accompanying LICENSE file or at https://www.qrcscorp.ca.
47 *
48 * Written by: John G. Underhill
49 * Contact: contact@qrcscorp.ca
50 */
51
52#ifndef QSC_X509_TYPES_H
53#define QSC_X509_TYPES_H
54
55#include "qsccommon.h"
56#include "asn1.h"
57#include "oid.h"
58
59QSC_CPLUSPLUS_ENABLED_START
60
83
88#define QSC_X509_NAME_ATTRIBUTE_STRING_MAX 256U
89
94#define QSC_X509_NAME_ATTRIBUTES_MAX 32U
95
100#define QSC_X509_EXTENSIONS_MAX 32U
101
106#define QSC_X509_SAN_ENTRIES_MAX 16U
107
112#define QSC_X509_KEY_IDENTIFIER_MAX 32U
113
118#define QSC_X509_SERIAL_NUMBER_MAX 20U
119
124#define QSC_X509_ML_DSA_44_PUBLICKEY_SIZE 1312U
125
130#define QSC_X509_ML_DSA_65_PUBLICKEY_SIZE 1952U
131
136#define QSC_X509_ML_DSA_87_PUBLICKEY_SIZE 2592U
137
142#define QSC_X509_ML_DSA_44_SIGNATURE_SIZE 2420U
143
148#define QSC_X509_ML_DSA_65_SIGNATURE_SIZE 3309U
149
154#define QSC_X509_ML_DSA_87_SIGNATURE_SIZE 4627U
155
160#define QSC_X509_ML_KEM_512_PUBLICKEY_SIZE 800U
161
166#define QSC_X509_ML_KEM_768_PUBLICKEY_SIZE 1184U
167
172#define QSC_X509_ML_KEM_1024_PUBLICKEY_SIZE 1568U
173
178#define QSC_X509_SIGNATURE_MAX 4627U
179
184#define QSC_X509_SPKI_MAX 2624U
185
189typedef enum qsc_x509_public_key_algorithm_t
190{
191 QSC_X509_PUBLIC_KEY_ALGORITHM_NONE = 0,
192 QSC_X509_PUBLIC_KEY_ALGORITHM_RSA,
193 QSC_X509_PUBLIC_KEY_ALGORITHM_EC,
194 QSC_X509_PUBLIC_KEY_ALGORITHM_ED25519,
195 QSC_X509_PUBLIC_KEY_ALGORITHM_ML_DSA,
196 QSC_X509_PUBLIC_KEY_ALGORITHM_ML_KEM
197} qsc_x509_public_key_algorithm;
198
199
209typedef enum qsc_x509_pqc_algorithm_class_t
210{
211 QSC_X509_PQC_ALGORITHM_CLASS_NONE = 0,
212 QSC_X509_PQC_ALGORITHM_CLASS_SIGNATURE,
213 QSC_X509_PQC_ALGORITHM_CLASS_KEM
214} qsc_x509_pqc_algorithm_class;
215
219typedef enum qsc_x509_signature_algorithm_t
220{
221 QSC_X509_SIGNATURE_ALGORITHM_NONE = 0,
222 QSC_X509_SIGNATURE_ALGORITHM_RSA_MD5,
223 QSC_X509_SIGNATURE_ALGORITHM_RSA_SHA1,
224 QSC_X509_SIGNATURE_ALGORITHM_RSA_SHA256,
225 QSC_X509_SIGNATURE_ALGORITHM_RSA_SHA384,
226 QSC_X509_SIGNATURE_ALGORITHM_RSA_SHA512,
227 QSC_X509_SIGNATURE_ALGORITHM_ECDSA_SHA1,
228 QSC_X509_SIGNATURE_ALGORITHM_ECDSA_SHA256,
229 QSC_X509_SIGNATURE_ALGORITHM_ECDSA_SHA384,
230 QSC_X509_SIGNATURE_ALGORITHM_ECDSA_SHA512,
231 QSC_X509_SIGNATURE_ALGORITHM_ED25519,
232 QSC_X509_SIGNATURE_ALGORITHM_ML_DSA_44,
233 QSC_X509_SIGNATURE_ALGORITHM_ML_DSA_65,
234 QSC_X509_SIGNATURE_ALGORITHM_ML_DSA_87
235} qsc_x509_signature_algorithm;
236
240typedef enum qsc_x509_pqc_parameter_set_t
241{
242 QSC_X509_PQC_PARAMETER_SET_NONE = 0,
243 QSC_X509_PQC_PARAMETER_SET_ML_DSA_44,
244 QSC_X509_PQC_PARAMETER_SET_ML_DSA_65,
245 QSC_X509_PQC_PARAMETER_SET_ML_DSA_87,
246 QSC_X509_PQC_PARAMETER_SET_ML_KEM_512,
247 QSC_X509_PQC_PARAMETER_SET_ML_KEM_768,
248 QSC_X509_PQC_PARAMETER_SET_ML_KEM_1024,
249} qsc_x509_pqc_parameter_set;
250
254typedef enum qsc_x509_hash_algorithm_t
255{
256 QSC_X509_HASH_ALGORITHM_NONE = 0,
257 QSC_X509_HASH_ALGORITHM_MD5,
258 QSC_X509_HASH_ALGORITHM_SHA1,
259 QSC_X509_HASH_ALGORITHM_SHA224,
260 QSC_X509_HASH_ALGORITHM_SHA256,
261 QSC_X509_HASH_ALGORITHM_SHA384,
262 QSC_X509_HASH_ALGORITHM_SHA512
263} qsc_x509_hash_algorithm;
264
268typedef enum qsc_x509_named_curve_t
269{
270 QSC_X509_NAMED_CURVE_NONE = 0,
271 QSC_X509_NAMED_CURVE_PRIME256V1,
272 QSC_X509_NAMED_CURVE_SECP384R1,
273 QSC_X509_NAMED_CURVE_SECP521R1
274} qsc_x509_named_curve;
275
279typedef enum qsc_x509_name_attribute_type_t
280{
281 QSC_X509_NAME_ATTRIBUTE_NONE = 0,
282 QSC_X509_NAME_ATTRIBUTE_COMMON_NAME,
283 QSC_X509_NAME_ATTRIBUTE_SURNAME,
284 QSC_X509_NAME_ATTRIBUTE_SERIAL_NUMBER,
285 QSC_X509_NAME_ATTRIBUTE_COUNTRY_NAME,
286 QSC_X509_NAME_ATTRIBUTE_LOCALITY_NAME,
287 QSC_X509_NAME_ATTRIBUTE_STATE_OR_PROVINCE,
288 QSC_X509_NAME_ATTRIBUTE_STREET_ADDRESS,
289 QSC_X509_NAME_ATTRIBUTE_ORGANIZATION_NAME,
290 QSC_X509_NAME_ATTRIBUTE_ORGANIZATIONAL_UNIT,
291 QSC_X509_NAME_ATTRIBUTE_TITLE,
292 QSC_X509_NAME_ATTRIBUTE_DESCRIPTION,
293 QSC_X509_NAME_ATTRIBUTE_GIVEN_NAME,
294 QSC_X509_NAME_ATTRIBUTE_INITIALS,
295 QSC_X509_NAME_ATTRIBUTE_GENERATION_QUALIFIER,
296 QSC_X509_NAME_ATTRIBUTE_DN_QUALIFIER,
297 QSC_X509_NAME_ATTRIBUTE_PSEUDONYM,
298 QSC_X509_NAME_ATTRIBUTE_DOMAIN_COMPONENT,
299 QSC_X509_NAME_ATTRIBUTE_EMAIL_ADDRESS,
300 QSC_X509_NAME_ATTRIBUTE_UNKNOWN
301} qsc_x509_name_attribute_type;
302
306typedef enum qsc_x509_general_name_type_t
307{
308 QSC_X509_GENERAL_NAME_NONE = 0,
309 QSC_X509_GENERAL_NAME_OTHER_NAME,
310 QSC_X509_GENERAL_NAME_RFC822_NAME,
311 QSC_X509_GENERAL_NAME_DNS_NAME,
312 QSC_X509_GENERAL_NAME_X400_ADDRESS,
313 QSC_X509_GENERAL_NAME_DIRECTORY_NAME,
314 QSC_X509_GENERAL_NAME_EDI_PARTY_NAME,
315 QSC_X509_GENERAL_NAME_UNIFORM_RESOURCE_IDENTIFIER,
316 QSC_X509_GENERAL_NAME_IP_ADDRESS,
317 QSC_X509_GENERAL_NAME_REGISTERED_ID
318} qsc_x509_general_name_type;
319
326typedef enum qsc_x509_storage_class_t
327{
328 QSC_X509_STORAGE_CLASS_NONE = 0,
329 QSC_X509_STORAGE_CLASS_BORROWED,
330 QSC_X509_STORAGE_CLASS_OWNED
331} qsc_x509_storage_class;
332
337{
338 const uint8_t* data;
339 size_t length;
340 qsc_x509_storage_class storage;
341} qsc_x509_encoded_region;
342
352typedef qsc_x509_encoded_region qsc_x509_signed_region;
353
354typedef enum qsc_x509_extension_type_t
355{
356 QSC_X509_EXTENSION_NONE = 0,
357 QSC_X509_EXTENSION_SUBJECT_KEY_IDENTIFIER,
358 QSC_X509_EXTENSION_KEY_USAGE,
359 QSC_X509_EXTENSION_SUBJECT_ALT_NAME,
360 QSC_X509_EXTENSION_ISSUER_ALT_NAME,
361 QSC_X509_EXTENSION_BASIC_CONSTRAINTS,
362 QSC_X509_EXTENSION_NAME_CONSTRAINTS,
363 QSC_X509_EXTENSION_CRL_DISTRIBUTION_POINTS,
364 QSC_X509_EXTENSION_CERTIFICATE_POLICIES,
365 QSC_X509_EXTENSION_CRL_NUMBER,
366 QSC_X509_EXTENSION_AUTHORITY_KEY_IDENTIFIER,
367 QSC_X509_EXTENSION_EXTENDED_KEY_USAGE,
368 QSC_X509_EXTENSION_AUTHORITY_INFO_ACCESS,
369 QSC_X509_EXTENSION_SUBJECT_INFO_ACCESS,
370 QSC_X509_EXTENSION_UNKNOWN
371} qsc_x509_extension_type;
372
376typedef enum qsc_x509_key_usage_bits_t
377{
378 QSC_X509_KEY_USAGE_DIGITAL_SIGNATURE = 0x0001U,
379 QSC_X509_KEY_USAGE_NON_REPUDIATION = 0x0002U,
380 QSC_X509_KEY_USAGE_KEY_ENCIPHERMENT = 0x0004U,
381 QSC_X509_KEY_USAGE_DATA_ENCIPHERMENT = 0x0008U,
382 QSC_X509_KEY_USAGE_KEY_AGREEMENT = 0x0010U,
383 QSC_X509_KEY_USAGE_KEY_CERT_SIGN = 0x0020U,
384 QSC_X509_KEY_USAGE_CRL_SIGN = 0x0040U,
385 QSC_X509_KEY_USAGE_ENCIPHER_ONLY = 0x0080U,
386 QSC_X509_KEY_USAGE_DECIPHER_ONLY = 0x0100U
387} qsc_x509_key_usage_bits;
388
392typedef enum qsc_x509_extended_key_usage_bits_t
393{
394 QSC_X509_EXTENDED_KEY_USAGE_NONE = 0x0000U,
395 QSC_X509_EXTENDED_KEY_USAGE_ANY = 0x0001U,
396 QSC_X509_EXTENDED_KEY_USAGE_SERVER_AUTH = 0x0002U,
397 QSC_X509_EXTENDED_KEY_USAGE_CLIENT_AUTH = 0x0004U,
398 QSC_X509_EXTENDED_KEY_USAGE_CODE_SIGNING = 0x0008U,
399 QSC_X509_EXTENDED_KEY_USAGE_EMAIL_PROTECTION = 0x0010U,
400 QSC_X509_EXTENDED_KEY_USAGE_TIME_STAMPING = 0x0020U,
401 QSC_X509_EXTENDED_KEY_USAGE_OCSP_SIGNING = 0x0040U
402} qsc_x509_extended_key_usage_bits;
403
408{
410 qsc_x509_public_key_algorithm publickey;
411 qsc_x509_signature_algorithm signature;
412 qsc_x509_hash_algorithm hash;
413 qsc_x509_named_curve curve;
414 qsc_x509_pqc_parameter_set pqcparameter;
420} qsc_x509_algorithm_identifier;
421
426{
427 qsc_x509_name_attribute_type type;
430 uint8_t string_tag;
431 uint16_t rdn_index;
432 size_t length;
433 char value[QSC_X509_NAME_ATTRIBUTE_STRING_MAX + 1U];
434} qsc_x509_name_attribute;
435
440{
441 qsc_x509_name_attribute attributes[QSC_X509_NAME_ATTRIBUTES_MAX];
442 size_t count;
443} qsc_x509_name;
444
453
458{
459 qsc_x509_general_name_type type;
462 size_t length;
463 uint8_t data[QSC_X509_NAME_ATTRIBUTE_STRING_MAX + 1U];
464} qsc_x509_general_name;
465
470{
471 qsc_x509_algorithm_identifier algorithm;
472 uint8_t publickey[QSC_X509_SPKI_MAX];
474 uint8_t unusedbits;
475} qsc_x509_subject_public_key_info;
476
481{
482 bool present;
483 bool critical;
484 bool ca;
486 uint32_t pathlen;
487} qsc_x509_basic_constraints;
488
493{
494 bool present;
495 bool critical;
496 uint16_t bits;
497} qsc_x509_key_usage;
498
503{
504 bool present;
505 bool critical;
506 uint32_t bits;
507} qsc_x509_extended_key_usage;
508
513{
514 bool present;
515 bool critical;
516 uint8_t identifier[QSC_X509_KEY_IDENTIFIER_MAX];
518} qsc_x509_subject_key_identifier;
519
524{
525 bool present;
526 bool critical;
527 uint8_t keyidentifier[QSC_X509_KEY_IDENTIFIER_MAX];
531 qsc_x509_name issuername;
533 uint8_t serial[QSC_X509_SERIAL_NUMBER_MAX];
534 size_t seriallen;
535} qsc_x509_authority_key_identifier;
536
541{
542 bool present;
543 bool critical;
544 uint8_t value[QSC_X509_SERIAL_NUMBER_MAX];
545 size_t valuelen;
546} qsc_x509_crl_number;
547
552{
553 bool present;
554 bool critical;
555 qsc_x509_general_name entries[QSC_X509_SAN_ENTRIES_MAX];
556 size_t count;
557} qsc_x509_subject_alt_name;
558
563{
564 bool present;
565 bool critical;
566 qsc_x509_general_name entries[QSC_X509_SAN_ENTRIES_MAX];
567 size_t count;
568} qsc_x509_issuer_alt_name;
569
574{
575 qsc_x509_extension_type type;
578 bool critical;
579 uint8_t value[QSC_X509_SPKI_MAX];
580 size_t valuelen;
581 qsc_x509_encoded_region rawextnvalue;
582 bool decoded;
583} qsc_x509_extension;
584
589{
590 qsc_x509_extension entries[QSC_X509_EXTENSIONS_MAX];
591 size_t count;
592 bool decoded;
594 qsc_x509_basic_constraints basicconstraints;
595 qsc_x509_key_usage keyusage;
596 qsc_x509_extended_key_usage extendedkeyusage;
597 qsc_x509_subject_key_identifier subjectkeyidentifier;
598 qsc_x509_crl_number crlnumber;
599 qsc_x509_authority_key_identifier authoritykeyidentifier;
600 qsc_x509_subject_alt_name subjectaltname;
601 qsc_x509_issuer_alt_name issueraltname;
602} qsc_x509_extensions;
603
608{
609 uint32_t version;
610 uint8_t serialnumber[QSC_X509_SERIAL_NUMBER_MAX];
612 qsc_x509_algorithm_identifier tbsignature;
613 qsc_x509_name issuer;
614 qsc_x509_validity validity;
615 qsc_x509_name subject;
616 qsc_x509_subject_public_key_info subjectpublickeyinfo;
619 qsc_x509_extensions extensions;
620 qsc_x509_algorithm_identifier signaturealgorithm;
621 uint8_t signature[QSC_X509_SIGNATURE_MAX];
624 const uint8_t* tbsdata;
625 size_t tbsdatalen;
626 const uint8_t* der;
627 size_t derlen;
628 bool derowned;
629} qsc_x509_certificate;
630
635{
636 qsc_x509_certificate certificate;
638} qsc_x509_trust_anchor;
639
644{
645 qsc_x509_certificate* certificates;
646 size_t count;
647} qsc_x509_chain;
648
653{
654 qsc_x509_trust_anchor* anchors;
655 size_t count;
656 size_t capacity;
657} qsc_x509_store;
658
663#define QSC_X509_CERTIFICATE_WRITE_MAX 8192U
664
677typedef qsc_asn1_status (*qsc_x509_certificate_sign_callback)(qsc_x509_signature_algorithm signaturealgorithm,
678 const uint8_t* tbsdata, size_t tbsdatalen, uint8_t* signature, size_t* signaturelen, void* context);
679
684{
685 uint32_t version;
686 uint8_t serialnumber[QSC_X509_SERIAL_NUMBER_MAX];
688 qsc_x509_name issuer;
689 qsc_x509_validity validity;
690 qsc_x509_name subject;
691 qsc_x509_subject_public_key_info spki;
692 qsc_x509_algorithm_identifier signaturealgorithm;
693 qsc_x509_extensions extensions;
694} qsc_x509_certificate_builder;
695
696QSC_CPLUSPLUS_ENABLED_END
697
698#endif
ASN.1 helper functions and data types built on the QSC BER and DER encoding layer.
enum qsc_asn1_status_t qsc_asn1_status
ASN.1 helper status codes.
QSC_EXPORT_API struct qsc_asn1_time_t qsc_asn1_time
A normalized ASN.1 time representation.
QSC_EXPORT_API struct qsc_asn1_oid_t qsc_asn1_oid
A decoded ASN.1 OBJECT IDENTIFIER.
Object identifier registry and lookup helpers for the QSC X.509 layer.
enum qsc_oid_id_t qsc_oid_id
Known object identifier registry entries.
Contains common definitions for the Quantum Secure Cryptographic (QSC) library.
#define QSC_EXPORT_API
API export macro for Microsoft compilers when importing from a DLL.
Definition qsccommon.h:645
Parsed algorithm identifier data.
Definition x509types.h:408
qsc_oid_id oid
Definition x509types.h:409
qsc_asn1_oid algorithm_oid
Definition x509types.h:415
qsc_x509_named_curve curve
Definition x509types.h:413
qsc_asn1_oid parameter_oid
Definition x509types.h:416
qsc_x509_hash_algorithm hash
Definition x509types.h:412
bool parameters_present
Definition x509types.h:417
qsc_x509_pqc_parameter_set pqcparameter
Definition x509types.h:414
qsc_x509_public_key_algorithm publickey
Definition x509types.h:410
bool parameters_null
Definition x509types.h:418
bool parameters_oid
Definition x509types.h:419
qsc_x509_signature_algorithm signature
Definition x509types.h:411
Parsed authority key identifier extension data.
Definition x509types.h:524
size_t seriallen
Definition x509types.h:534
bool issuer_present
Definition x509types.h:529
bool serial_present
Definition x509types.h:532
bool critical
Definition x509types.h:526
uint8_t keyidentifier[QSC_X509_KEY_IDENTIFIER_MAX]
Definition x509types.h:527
size_t keyidentifierlen
Definition x509types.h:528
bool present
Definition x509types.h:525
uint8_t serial[QSC_X509_SERIAL_NUMBER_MAX]
Definition x509types.h:533
bool issuername_present
Definition x509types.h:530
qsc_x509_name issuername
Definition x509types.h:531
Parsed basic constraints extension data.
Definition x509types.h:481
bool pathlen_present
Definition x509types.h:485
bool critical
Definition x509types.h:483
bool ca
Definition x509types.h:484
bool present
Definition x509types.h:482
uint32_t pathlen
Definition x509types.h:486
A mutable certificate builder used to construct an X.509 v3 certificate.
Definition x509types.h:684
qsc_x509_validity validity
Definition x509types.h:689
qsc_x509_name issuer
Definition x509types.h:688
size_t serialnumberlen
Definition x509types.h:687
qsc_x509_subject_public_key_info spki
Definition x509types.h:691
qsc_x509_algorithm_identifier signaturealgorithm
Definition x509types.h:692
qsc_x509_extensions extensions
Definition x509types.h:693
uint32_t version
Definition x509types.h:685
uint8_t serialnumber[QSC_X509_SERIAL_NUMBER_MAX]
Definition x509types.h:686
qsc_x509_name subject
Definition x509types.h:690
A parsed X.509 certificate object.
Definition x509types.h:608
const uint8_t * tbsdata
Definition x509types.h:624
uint8_t signature[QSC_X509_SIGNATURE_MAX]
Definition x509types.h:621
bool issueruniqueid_present
Definition x509types.h:617
size_t signaturelen
Definition x509types.h:622
size_t tbsdatalen
Definition x509types.h:625
bool subjectuniqueid_present
Definition x509types.h:618
qsc_x509_validity validity
Definition x509types.h:614
qsc_x509_name issuer
Definition x509types.h:613
size_t serialnumberlen
Definition x509types.h:611
size_t derlen
Definition x509types.h:627
qsc_x509_algorithm_identifier signaturealgorithm
Definition x509types.h:620
qsc_x509_extensions extensions
Definition x509types.h:619
qsc_x509_algorithm_identifier tbsignature
Definition x509types.h:612
qsc_x509_subject_public_key_info subjectpublickeyinfo
Definition x509types.h:616
const uint8_t * der
Definition x509types.h:626
bool derowned
Definition x509types.h:628
uint32_t version
Definition x509types.h:609
uint8_t serialnumber[QSC_X509_SERIAL_NUMBER_MAX]
Definition x509types.h:610
uint8_t signatureunusedbits
Definition x509types.h:623
qsc_x509_name subject
Definition x509types.h:615
A certificate chain container.
Definition x509types.h:644
qsc_x509_certificate * certificates
Definition x509types.h:645
size_t count
Definition x509types.h:646
Parsed CRL number extension data.
Definition x509types.h:541
size_t valuelen
Definition x509types.h:545
uint8_t value[QSC_X509_SERIAL_NUMBER_MAX]
Definition x509types.h:544
bool critical
Definition x509types.h:543
bool present
Definition x509types.h:542
A raw encoded byte region associated with a decoded object.
Definition x509types.h:337
const uint8_t * data
Definition x509types.h:338
qsc_x509_storage_class storage
Definition x509types.h:340
size_t length
Definition x509types.h:339
Parsed extended key usage extension data.
Definition x509types.h:503
bool critical
Definition x509types.h:505
bool present
Definition x509types.h:504
uint32_t bits
Definition x509types.h:506
A decoded certificate extension entry.
Definition x509types.h:574
qsc_x509_extension_type type
Definition x509types.h:575
qsc_oid_id oid
Definition x509types.h:576
size_t valuelen
Definition x509types.h:580
qsc_asn1_oid extension_oid
Definition x509types.h:577
bool critical
Definition x509types.h:578
bool decoded
Definition x509types.h:582
uint8_t value[QSC_X509_SPKI_MAX]
Definition x509types.h:579
qsc_x509_encoded_region rawextnvalue
Definition x509types.h:581
Parsed extension set data.
Definition x509types.h:589
qsc_x509_subject_key_identifier subjectkeyidentifier
Definition x509types.h:597
qsc_x509_crl_number crlnumber
Definition x509types.h:598
qsc_x509_key_usage keyusage
Definition x509types.h:595
qsc_x509_authority_key_identifier authoritykeyidentifier
Definition x509types.h:599
qsc_x509_extended_key_usage extendedkeyusage
Definition x509types.h:596
qsc_x509_extension entries[QSC_X509_EXTENSIONS_MAX]
Definition x509types.h:590
size_t count
Definition x509types.h:591
qsc_x509_basic_constraints basicconstraints
Definition x509types.h:594
bool duplicatesrejected
Definition x509types.h:593
bool decoded
Definition x509types.h:592
qsc_x509_issuer_alt_name issueraltname
Definition x509types.h:601
qsc_x509_subject_alt_name subjectaltname
Definition x509types.h:600
A decoded general name entry.
Definition x509types.h:458
qsc_oid_id oid
Definition x509types.h:460
qsc_asn1_oid registeredid
Definition x509types.h:461
uint8_t data[QSC_X509_NAME_ATTRIBUTE_STRING_MAX+1U]
Definition x509types.h:463
size_t length
Definition x509types.h:462
qsc_x509_general_name_type type
Definition x509types.h:459
Parsed issuer alternative name extension data.
Definition x509types.h:563
bool critical
Definition x509types.h:565
size_t count
Definition x509types.h:567
qsc_x509_general_name entries[QSC_X509_SAN_ENTRIES_MAX]
Definition x509types.h:566
bool present
Definition x509types.h:564
Parsed key usage extension data.
Definition x509types.h:493
uint16_t bits
Definition x509types.h:496
bool critical
Definition x509types.h:495
bool present
Definition x509types.h:494
A decoded distinguished name attribute.
Definition x509types.h:426
qsc_oid_id oid
Definition x509types.h:428
char value[QSC_X509_NAME_ATTRIBUTE_STRING_MAX+1U]
Definition x509types.h:433
qsc_x509_name_attribute_type type
Definition x509types.h:427
uint16_t rdn_index
Definition x509types.h:431
qsc_asn1_oid attribute_oid
Definition x509types.h:429
size_t length
Definition x509types.h:432
uint8_t string_tag
Definition x509types.h:430
A decoded distinguished name.
Definition x509types.h:440
size_t count
Definition x509types.h:442
qsc_x509_name_attribute attributes[QSC_X509_NAME_ATTRIBUTES_MAX]
Definition x509types.h:441
A trust store container.
Definition x509types.h:653
size_t count
Definition x509types.h:655
size_t capacity
Definition x509types.h:656
qsc_x509_trust_anchor * anchors
Definition x509types.h:654
Parsed subject alternative name extension data.
Definition x509types.h:552
bool critical
Definition x509types.h:554
size_t count
Definition x509types.h:556
qsc_x509_general_name entries[QSC_X509_SAN_ENTRIES_MAX]
Definition x509types.h:555
bool present
Definition x509types.h:553
Parsed subject key identifier extension data.
Definition x509types.h:513
uint8_t identifier[QSC_X509_KEY_IDENTIFIER_MAX]
Definition x509types.h:516
size_t identifierlen
Definition x509types.h:517
bool critical
Definition x509types.h:515
bool present
Definition x509types.h:514
A decoded subject public key information structure.
Definition x509types.h:470
qsc_x509_algorithm_identifier algorithm
Definition x509types.h:471
uint8_t unusedbits
Definition x509types.h:474
size_t publickeylen
Definition x509types.h:473
uint8_t publickey[QSC_X509_SPKI_MAX]
Definition x509types.h:472
A trust anchor entry.
Definition x509types.h:635
qsc_x509_certificate certificate
Definition x509types.h:636
bool selfsigned
Definition x509types.h:637
A decoded X.509 validity interval.
Definition x509types.h:449
qsc_asn1_time notbefore
Definition x509types.h:450
qsc_asn1_time notafter
Definition x509types.h:451