| Table of Contents |
|---|
This document provides comprehensive guidance for integrating rdk-cert-config with the xconf-client and xconf-server ecosystem. The rdk-cert-config library provides intelligent certificate management and selection capabilities for RDK devices, enabling:
Repo - https://github.com/rdkcentral/rdk-cert-config
rdk-cert-config repo provides two main libraries:
Purpose: Intelligent certificate selection with automatic failover
Key Features:
API Methods:
| Code Block |
|---|
rdkcertselector_h rdkcertselector_new(const char *config_path,
const char *hrotprop_path,
const char *cert_group)
rdkcertselectorStatus_t rdkcertselector_getCert(rdkcertselector_h handle,
char **cert_uri,
char **cert_pass)
rdkcertselectorRetry_t rdkcertselector_setCurlStatus(rdkcertselector_h handle,
unsigned int curl_status,
const char *endpoint)
void rdkcertselector_free(rdkcertselector_h *handle) |
CertSelector Status Codes:
certselectorOk (0) - SuccesscertselectorGeneralFailure (1) - General failurecertselectorBadPointer (2) - Invalid pointercertselectorFileError (3) - File access errorcertselectorFileNotFound (4) - Certificate file not foundcertselectorBadArgument (5) - Invalid argumentCertSelector Retry Codes:
NO_RETRY (100) - Certificate succeeded or connection failed for non-cert reasonTRY_ANOTHER (101) - Certificate failed; another cert is available to tryRETRY_ERROR (102) - Internal errorDevice-Side Files
Both CertSelector and CertLocator rely on a configuration file, certsel.conf, which contains a prioritized list of certificates along with their file paths and passcode sources. Additionally, CertSelector uses another configuration file, hrot.properties, to determine the name of the OpenSSL provider when available.
These files must be deployed on each RDK device:
/etc/ssl/certs/certsel.confCertificate manifest defining available certificates and their priority order.
Format:
| Code Block |
|---|
<usage_group>,<cert_reference>,<cert_type>,<cert_uri>,<credential_reference> Example: # Primary certificate (TEE, highest priority) CURL_XCONF,XCONF_TEE_P12,P12,pkcs11:model=PKCS#15;token=test,xconf_tee_cred # Secondary certificate (Secure Element) CURL_XCONF,XCONF_SE_P12,P12,[file:///opt/certs/xconf_se.pk12],xconf_se_cred # Tertiary certificate (Filesystem) CURL_XCONF,XCONF_MAIN_P12,P12,[file:///etc/ssl/certs/xconf_main.pk12],xconf_main_cred # Fallback certificate (firmware-embedded, static) CURL_XCONF,XCONF_FALLBACK_P12,P12,[file:///etc/ssl/certs/xconf_fallback.pk12],xconf_fb_cred |
Field Descriptions:
| Field | Description | Example |
|---|---|---|
| usage_group | Certificate usage category (must match cert_group in code). This indicates the connection for which the certificate will be used | CURL_MTLS, CURL_RED, SRVR_TLS |
| cert_reference | Human-readable identifier for logging. This is a string used by a component to request a specific certificate using the certLocator API | XCONF_TEE_P12, XCONF_SE_P12 |
| cert_type | Certificate format (PEM, P12, or P11), indicates the OpenSSL certificate type | P12, PEM, P11 |
| cert_uri | Certificate location as file:///path-to-cert or PKCS#11 URI | [file:///opt/certs/cert.pk12], pkcs11:... |
| credential_reference | Key for password lookup via RdkConfigApi | xconf_se_cred |
/etc/ssl/certs/hrot.propertiesHardware Root of Trust properties for OpenSSL engine selection.
Format:
| Code Block |
|---|
hrotengine=<engine_name> Example: # Using Hardware Secure Element hrotengine=rdktee # Using Software-based OpenSSL hrotengine= # Using SE provider hrotengine=se_pkcs |