pub unsafe extern "C" fn otCoapSecureGetPeerCertificateBase64(
    aInstance: *mut otInstance,
    aPeerCert: *mut c_uchar,
    aCertLength: *mut usize,
    aCertBufferSize: usize
) -> otError
Expand description

Returns the peer x509 certificate base64 encoded.

@note This function requires the build-time features MBEDTLS_BASE64_C and MBEDTLS_SSL_KEEP_PEER_CERTIFICATE to be enabled.

@param[in] aInstance A pointer to an OpenThread instance. @param[out] aPeerCert A pointer to the base64 encoded certificate buffer. @param[out] aCertLength The length of the base64 encoded peer certificate. @param[in] aCertBufferSize The buffer size of aPeerCert.

@retval OT_ERROR_INVALID_STATE Not connected yet. @retval OT_ERROR_NONE Successfully get the peer certificate. @retval OT_ERROR_NO_BUFS Can’t allocate memory for certificate.