openHiTLS API openHiTLS 0.1.0-Alpha1

◆ HITLS_GetCertificate()

HITLS_CERT_X509 * HITLS_GetCertificate ( const HITLS_Ctx ctx)

Obtain the local certificate.

Returns the most recently added certificate if it is called before the certificate is selected. If no certificate is added, NULL is returned. It returns the certificate selected during the handshake if a certificate selection occurs, or NULL if no certificate is selected (e.g. on a client that does not use a client certificate).

注意
: Shallow copy, can be used only during the ctx life cycle, and the caller must not release the returned pointer.
参数
ctx[IN] TLS link object
返回值
Devicecertificate