@@ -1993,18 +1993,20 @@ int wh_Client_CertEraseTrustedResponse(whClientContext* c, int32_t* out_rc);
19931993int wh_Client_CertEraseTrusted (whClientContext * c , whNvmId id , int32_t * out_rc );
19941994
19951995/**
1996- * @brief Sends a request to read a trusted certificate from NVM storage .
1996+ * @brief Sends a request to read a trusted certificate.
19971997 *
1998- * This function prepares and sends a request to read a trusted certificate
1999- * from NVM storage. This function does not block; it returns immediately after
2000- * sending the request.
1998+ * This function prepares and sends a request to read a trusted certificate.
1999+ * The id parameter accepts either an NVM ID for certificates stored in NVM,
2000+ * or a wrapped/cached key ID (via WH_CLIENT_KEYID_MAKE_WRAPPED()) for
2001+ * certificates cached through wh_Client_CertUnwrapAndCache(). This function
2002+ * does not block; it returns immediately after sending the request.
20012003 *
20022004 * @param[in] c Pointer to the client context.
2003- * @param[in] id The NVM ID of the certificate to retrieve.
2005+ * @param[in] id The key ID of the certificate to retrieve (NVM or wrapped) .
20042006 * @param[in] cert_len Maximum length of the certificate buffer.
20052007 * @return int Returns 0 on success, or a negative error code on failure.
20062008 */
2007- int wh_Client_CertReadTrustedRequest (whClientContext * c , whNvmId id ,
2009+ int wh_Client_CertReadTrustedRequest (whClientContext * c , whKeyId id ,
20082010 uint32_t cert_len );
20092011
20102012/**
@@ -2031,17 +2033,20 @@ int wh_Client_CertReadTrustedResponse(whClientContext* c, uint8_t* cert,
20312033 *
20322034 * This function handles the complete process of sending a request to read a
20332035 * trusted certificate and receiving the response. It blocks until the entire
2034- * operation is complete or an error occurs.
2036+ * operation is complete or an error occurs. The id parameter accepts either an
2037+ * NVM ID for certificates stored in NVM, or a wrapped/cached key ID (via
2038+ * WH_CLIENT_KEYID_MAKE_WRAPPED()) for certificates cached through
2039+ * wh_Client_CertUnwrapAndCache().
20352040 *
20362041 * @param[in] c Pointer to the client context.
2037- * @param[in] id The NVM ID of the certificate to retrieve.
2042+ * @param[in] id The key ID of the certificate to retrieve (NVM or wrapped) .
20382043 * @param[out] cert Pointer to store the certificate data.
20392044 * @param[in,out] cert_len Pointer to the maximum length of the certificate
20402045 * buffer. On output, contains the actual length of the certificate.
20412046 * @param[out] out_rc Pointer to store the response code from the server.
20422047 * @return int Returns 0 on success, or a negative error code on failure.
20432048 */
2044- int wh_Client_CertReadTrusted (whClientContext * c , whNvmId id , uint8_t * cert ,
2049+ int wh_Client_CertReadTrusted (whClientContext * c , whKeyId id , uint8_t * cert ,
20452050 uint32_t * cert_len , int32_t * out_rc );
20462051
20472052/**
@@ -2219,20 +2224,21 @@ int wh_Client_CertAddTrustedDma(whClientContext* c, whNvmId id,
22192224 int32_t * out_rc );
22202225
22212226/**
2222- * @brief Sends a request to read a trusted certificate from NVM storage using
2223- * DMA.
2227+ * @brief Sends a request to read a trusted certificate using DMA.
22242228 *
2225- * This function prepares and sends a request to read a trusted certificate from
2226- * NVM storage using DMA. This function does not block; it returns immediately
2227- * after sending the request.
2229+ * This function prepares and sends a request to read a trusted certificate
2230+ * using DMA. The id parameter accepts either an NVM ID for certificates stored
2231+ * in NVM, or a wrapped/cached key ID (via WH_CLIENT_KEYID_MAKE_WRAPPED()) for
2232+ * certificates cached through wh_Client_CertUnwrapAndCache(). This function
2233+ * does not block; it returns immediately after sending the request.
22282234 *
22292235 * @param[in] c Pointer to the client context.
2230- * @param[in] id NVM ID of the trusted certificate to get.
2236+ * @param[in] id The key ID of the trusted certificate to get (NVM or wrapped) .
22312237 * @param[in] cert Pointer to buffer to store the certificate data.
22322238 * @param[in] cert_len Length of the certificate buffer.
22332239 * @return int Returns 0 on success, or a negative error code on failure.
22342240 */
2235- int wh_Client_CertReadTrustedDmaRequest (whClientContext * c , whNvmId id ,
2241+ int wh_Client_CertReadTrustedDmaRequest (whClientContext * c , whKeyId id ,
22362242 void * cert , uint32_t cert_len );
22372243
22382244/**
@@ -2256,16 +2262,19 @@ int wh_Client_CertReadTrustedDmaResponse(whClientContext* c, int32_t* out_rc);
22562262 *
22572263 * This function handles the complete process of sending a request to read a
22582264 * trusted certificate using DMA and receiving the response. It blocks until the
2259- * entire operation is complete or an error occurs.
2265+ * entire operation is complete or an error occurs. The id parameter accepts
2266+ * either an NVM ID for certificates stored in NVM, or a wrapped/cached key ID
2267+ * (via WH_CLIENT_KEYID_MAKE_WRAPPED()) for certificates cached through
2268+ * wh_Client_CertUnwrapAndCache().
22602269 *
22612270 * @param[in] c Pointer to the client context.
2262- * @param[in] id NVM ID of the trusted certificate to get.
2271+ * @param[in] id The key ID of the trusted certificate to get (NVM or wrapped) .
22632272 * @param[in] cert Pointer to buffer to store the certificate data.
22642273 * @param[in] cert_len Length of the certificate buffer.
22652274 * @param[out] out_rc Pointer to store the response code from the server.
22662275 * @return int Returns 0 on success, or a negative error code on failure.
22672276 */
2268- int wh_Client_CertReadTrustedDma (whClientContext * c , whNvmId id , void * cert ,
2277+ int wh_Client_CertReadTrustedDma (whClientContext * c , whKeyId id , void * cert ,
22692278 uint32_t cert_len , int32_t * out_rc );
22702279
22712280/**
0 commit comments