[][src]Function openthread_sys::otCoapSecureGetPeerCertificateBase64

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

This method returns the peer x509 certificate base64 encoded.

@note This function requires the build-time feature MBEDTLS_BASE64_C 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.