@@ -235,14 +235,14 @@ typedef int (wc_pem_password_cb)(char* passwd, int sz, int rw, void* userdata);
235235
236236#ifdef WOLFSSL_CERT_SIGN_CB
237237/*!
238- \ingroup CertManager
238+ \ingroup CertManager
239239 \brief Callback function type for certificate/CSR signing.
240-
240+
241241 This callback allows external signing implementations (e.g., TPM, HSM)
242242 to sign certificates and CSRs without requiring the crypto callback
243243 infrastructure. This is particularly useful for FIPS compliance where
244244 offloading wolfCrypt operations is not acceptable.
245-
245+
246246 \param in Data to sign. For RSA, this is the DER-encoded digest
247247 (DigestInfo structure with algorithm identifier). For ECC,
248248 this is the raw hash to sign.
@@ -253,20 +253,20 @@ typedef int (wc_pem_password_cb)(char* passwd, int sz, int rw, void* userdata);
253253 CTC_SHA256wECDSA).
254254 \param keyType Key type (RSA_TYPE, ECC_TYPE, etc.).
255255 \param ctx User-provided context pointer for callback state.
256-
256+
257257 \return 0 on success.
258258 \return Negative error code on failure (BAD_FUNC_ARG, MEMORY_E, etc.).
259-
259+
260260 \sa wc_SignCert_cb
261261 \sa wc_SignCert_ex
262-
262+
263263 _Example_
264264 \code
265- int mySignCallback(const byte* in, word32 inLen, byte* out,
265+ int mySignCallback(const byte* in, word32 inLen, byte* out,
266266 word32* outLen, int sigAlgo, int keyType, void* ctx)
267267 {
268268 MySignCtx* myCtx = (MySignCtx*)ctx;
269- // Perform signing using external device/HSM
269+ /* Perform signing using external device/HSM */
270270 return myDevice_Sign (myCtx -> device , in , inLen , out , outLen );
271271 }
272272 \endcode
@@ -555,20 +555,20 @@ WOLFSSL_API int wc_SignCert_ex(int requestSz, int sType, byte* buf,
555555WOLFSSL_API int wc_SignCert (int requestSz , int sType , byte * buf , word32 buffSz ,
556556 RsaKey * rsaKey , ecc_key * eccKey , WC_RNG * rng );
557557/*!
558- \ingroup CertManager
558+ \ingroup CertManager
559559 \brief Sign a certificate or CSR using a callback function.
560-
561- This function signs a certificate or Certificate Signing Request (CSR)
560+
561+ This function signs a certificate or Certificate Signing Request (CSR)
562562 using a user-provided signing callback. This allows external signing
563563 implementations (e.g., TPM, HSM) without requiring the crypto callback
564564 infrastructure, making it suitable for FIPS-compliant applications.
565-
565+
566566 The function performs the following:
567567 1. Hashes the certificate/CSR body according to the signature algorithm
568568 2. Encodes the hash (RSA) or prepares it for signing (ECC)
569569 3. Calls the user-provided callback to perform the actual signing
570570 4. Encodes the signature into the certificate/CSR DER structure
571-
571+
572572 \param requestSz Size of the certificate body to sign (from Cert.bodySz).
573573 \param sType Signature algorithm type (e.g., CTC_SHA256wRSA,
574574 CTC_SHA256wECDSA).
@@ -578,34 +578,34 @@ WOLFSSL_API int wc_SignCert(int requestSz, int sType, byte* buf, word32 buffSz,
578578 \param signCb User-provided signing callback function.
579579 \param signCtx Context pointer passed to the signing callback.
580580 \param rng Random number generator (may be NULL if not needed).
581-
581+
582582 \return Size of the signed certificate/CSR on success.
583583 \return BAD_FUNC_ARG if signCb is NULL or other parameters are invalid.
584584 \return BUFFER_E if the buffer is too small for the signed certificate.
585585 \return MEMORY_E if memory allocation fails.
586586 \return Negative error code on other failures.
587-
587+
588588 \sa wc_SignCertCb
589589 \sa wc_SignCert
590590 \sa wc_SignCert_ex
591591 \sa wc_MakeCert
592592 \sa wc_MakeCertReq
593-
593+
594594 _Example_
595595 \code
596596 Cert cert;
597597 byte derBuf[4096];
598598 int derSz;
599599 MySignCtx myCtx;
600-
601- // Initialize cert and set subject, etc.
600+
601+ /* Initialize cert and set subject, etc. */
602602 wc_InitCert (& cert );
603- // ... set cert fields ...
604-
605- // Make certificate body
603+ /* ... set cert fields ... */
604+
605+ /* Make certificate body */
606606 derSz = wc_MakeCert (& cert , derBuf , sizeof (derBuf ), NULL , NULL , & rng );
607-
608- // Sign using callback
607+
608+ /* Sign using callback */
609609 derSz = wc_SignCert_cb (cert .bodySz , cert .sigType , derBuf , sizeof (derBuf ),
610610 RSA_TYPE , mySignCallback , & myCtx , & rng );
611611 if (derSz > 0 ) {
0 commit comments