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:
Key Features:
API Methods:
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 errorBoth 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:
<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. is the name
<engine_name> is the name provided by the SE or TEE provider
Format:
hrotengine=<engine_name> Example: # Using Hardware Secure Element hrotengine=rdktee # Using Software-based OpenSSL hrotengine= # Using SE provider hrotengine=se_pkcs
BPI 2025Q4 build uses getMtlsCerts() directly because its xconf-client doesn't have LIBRDKCERTSEL_BUILD defined. It gets a single static cert from the shell script, no retry mechanism.
WITH rdk-cert-config (LIBRDKCERTSEL_BUILD):
#ifdef LIBRDKCERTSEL_BUILD
do {
xcGetCertStatus = rdkcertselector_getCert(handleCertSelector, &pCertURI, &pCertPC);
// Set cert on curl handle
curl_easy_perform(easy);
// Report result back to selector
rdkcertselector_setCurlStatus(handleCertSelector, curl_code, url);
} while(rdkcertselector_setCurlStatus(...) == TRY_ANOTHER); // <- Retry on failure
WITHOUT rdk-cert-config (no LIBRDKCERTSEL_BUILD):
#else
// Fallback - simple one-shot attempt
if(T2ERROR_SUCCESS == getMtlsCerts(&pCertFile, &pCertPC)) {
curl_easy_perform(easy);
}
// No retry logic - fails if cert unavailable
#endif
Key Difference:
rdkcertselector_getCert() = Advanced failover (tries CURL_MTLS → CURL_RED → next cert if connection fails)getMtlsCerts() = Simple fallback (load cert once, use it, if it fails, done—no retry)Server Side (xconfwebconfig/xconfadmin)
The xconf-server currently does NOT validate incoming client certificates, which requires below key points.
LIBRDKCERTSEL_BUILD will allow xconf-client to use rdk-cert-config for intelligent certificate management/etc/ssl/certs/certsel.conf and /etc/ssl/certs/hrot.properties for BPI4 platformIf MTLS is enabled in client side and not in server side then,
For TRUE mTLS :
Server-side validation in xconfwebconfig (mandatory):
Client-side with LIBRDKCERTSEL_BUILD (already works in telemetry):
Server Enabled with MTLS ( needs client Certs )
┌───────┴───────┐
↓ ↓
Telemetry Standalone xconf-client
(with LIBRDKCERTSEL) (without LIBRDKCERTSEL)
↓ ↓
✅ Can send cert ❌ WILL FAIL - has no cert to send
Connects OK Connection Denied