Object identifier registry and lookup helpers for the QSC X.509 layer. More...
Go to the source code of this file.
Data Structures | |
| struct | qsc_oid_entry_t |
| A registry entry describing a known object identifier. More... | |
Typedefs | |
| typedef enum qsc_oid_id_t | qsc_oid_id |
| Known object identifier registry entries. | |
| typedef QSC_EXPORT_API struct qsc_oid_entry_t | qsc_oid_entry |
| A registry entry describing a known object identifier. | |
Functions | |
| QSC_EXPORT_API size_t | qsc_oid_registry_count (void) |
| Gets the number of entries in the static object identifier registry. | |
| QSC_EXPORT_API const qsc_oid_entry * | qsc_oid_registry_at (size_t index) |
| Gets a registry entry by zero-based table index. | |
| QSC_EXPORT_API const qsc_oid_entry * | qsc_oid_get_entry (qsc_oid_id id) |
| Gets a registry entry by internal identifier. | |
| QSC_EXPORT_API qsc_oid_id | qsc_oid_identify (const qsc_asn1_oid *oid) |
| Identifies a decoded object identifier against the static registry. | |
| QSC_EXPORT_API bool | qsc_oid_equals_id (const qsc_asn1_oid *oid, qsc_oid_id id) |
| Tests whether a decoded object identifier matches a registry identifier. | |
| QSC_EXPORT_API bool | qsc_oid_get_encoded (qsc_oid_id id, const uint8_t **data, size_t *length) |
| Gets the encoded value octets for a registry identifier. | |
| QSC_EXPORT_API bool | qsc_oid_to_asn1 (qsc_oid_id id, qsc_asn1_oid *oid) |
| Copies the encoded value octets of a registry identifier to a decoded ASN.1 OID structure. | |
| QSC_EXPORT_API const char * | qsc_oid_get_dotted (qsc_oid_id id) |
| Gets the dotted-decimal text form of a registry identifier. | |
| QSC_EXPORT_API const char * | qsc_oid_get_name (qsc_oid_id id) |
| Gets the descriptive registry name of a registry identifier. | |
| QSC_EXPORT_API const char * | qsc_oid_get_name_from_oid (const qsc_asn1_oid *oid) |
| Gets the descriptive registry name of a decoded object identifier. | |
Object identifier registry and lookup helpers for the QSC X.509 layer.
This header defines the internal object identifier registry used by the X.509 support modules. The registry provides stable identifiers, encoded value octets, dotted-decimal names, and descriptive strings for the subset of ASN.1 OBJECT IDENTIFIER values required by certificate parsing, signature verification, public key extraction, distinguished name decoding, and extension handling.
The functions in this module operate on qsc_asn1_oid objects decoded by the ASN.1 helper layer. The registry is intentionally compact and focused on the algorithms and fields that are commonly encountered in DER-encoded X.509 certificates.
| enum qsc_oid_id_t |
Known object identifier registry entries.
| QSC_EXPORT_API bool qsc_oid_equals_id | ( | const qsc_asn1_oid * | oid, |
| qsc_oid_id | id ) |
Tests whether a decoded object identifier matches a registry identifier.
| oid | [const qsc_asn1_oid*] The decoded object identifier. |
| id | [qsc_oid_id] The registry identifier. |
| QSC_EXPORT_API const char * qsc_oid_get_dotted | ( | qsc_oid_id | id | ) |
Gets the dotted-decimal text form of a registry identifier.
| id | [qsc_oid_id] The registry identifier. |
| QSC_EXPORT_API bool qsc_oid_get_encoded | ( | qsc_oid_id | id, |
| const uint8_t ** | data, | ||
| size_t * | length ) |
Gets the encoded value octets for a registry identifier.
| id | [qsc_oid_id] The registry identifier. |
| data | [const uint8_t**] Receives a pointer to the encoded OID value octets. |
| length | [size_t*] Receives the number of encoded OID value octets. |
| QSC_EXPORT_API const qsc_oid_entry * qsc_oid_get_entry | ( | qsc_oid_id | id | ) |
Gets a registry entry by internal identifier.
| id | [qsc_oid_id] The internal registry identifier. |
| QSC_EXPORT_API const char * qsc_oid_get_name | ( | qsc_oid_id | id | ) |
Gets the descriptive registry name of a registry identifier.
| id | [qsc_oid_id] The registry identifier. |
| QSC_EXPORT_API const char * qsc_oid_get_name_from_oid | ( | const qsc_asn1_oid * | oid | ) |
Gets the descriptive registry name of a decoded object identifier.
| oid | [const qsc_asn1_oid*] The decoded object identifier. |
| QSC_EXPORT_API qsc_oid_id qsc_oid_identify | ( | const qsc_asn1_oid * | oid | ) |
Identifies a decoded object identifier against the static registry.
| oid | [const qsc_asn1_oid*] The decoded object identifier. |
| QSC_EXPORT_API const qsc_oid_entry * qsc_oid_registry_at | ( | size_t | index | ) |
Gets a registry entry by zero-based table index.
| index | [size_t] The registry entry index. |
| QSC_EXPORT_API size_t qsc_oid_registry_count | ( | void | ) |
Gets the number of entries in the static object identifier registry.
| QSC_EXPORT_API bool qsc_oid_to_asn1 | ( | qsc_oid_id | id, |
| qsc_asn1_oid * | oid ) |
Copies the encoded value octets of a registry identifier to a decoded ASN.1 OID structure.
| id | [qsc_oid_id] The registry identifier. |
| oid | [qsc_asn1_oid*] Receives the decoded OID structure. |