pub type wc_SignCertCb = Option<unsafe extern "C" fn(in_: *const byte, inLen: word32, out: *mut byte, outLen: *mut word32, sigAlgo: c_int, keyType: c_int, ctx: *mut c_void) -> c_int>;Expand description
\ingroup CertManager \brief Callback function type for certificate/CSR signing.
This callback allows external signing implementations (e.g., TPM, HSM) to sign certificates and CSRs without requiring the crypto callback infrastructure. This is particularly useful for FIPS compliance where offloading wolfCrypt operations is not acceptable.
\param in Data to sign. For RSA, this is the DER-encoded digest (DigestInfo structure with algorithm identifier). For ECC, this is the raw hash to sign. \param inLen Length of data to sign in bytes. \param out Output buffer for the signature. \param outLen Input: size of output buffer. Output: actual signature size. \param sigAlgo Signature algorithm identifier (e.g., CTC_SHA256wRSA, CTC_SHA256wECDSA). \param keyType Key type (RSA_TYPE or ECC_TYPE only). \param ctx User-provided context pointer for callback state.
\return 0 on success. \return Negative error code on failure (BAD_FUNC_ARG, MEMORY_E, etc.).
\sa wc_SignCert_cb \sa wc_SignCert_ex
Example \code int mySignCallback(const byte* in, word32 inLen, byte* out, word32* outLen, int sigAlgo, int keyType, void* ctx) { MySignCtx* myCtx = (MySignCtx*)ctx; return myDevice_Sign(myCtx->device, in, inLen, out, outLen); } \endcode
Aliased Type§
pub enum wc_SignCertCb {
None,
Some(unsafe extern "C" fn(*const u8, u32, *mut u8, *mut u32, i32, i32, *mut c_void) -> i32),
}