pub unsafe extern "C" fn s2n_connection_get_client_cert_chain(
conn: *mut s2n_connection,
der_cert_chain_out: *mut *mut u8,
cert_chain_len: *mut u32
) -> c_int
Expand description
Gets the raw certificate chain received from the client.
The retrieved certificate chain has the format described by the TLS 1.2 RFC: https://datatracker.ietf.org/doc/html/rfc5246#section-7.4.2. Each certificate is a DER-encoded ASN.1 X.509, prepended by a 3 byte network-endian length value. Note that this format is used regardless of the connection’s protocol version.
@warning The buffer pointed to by cert_chain_out
shares its lifetime with the s2n_connection object.
@param conn A pointer to the s2n_connection object
@param cert_chain_out A pointer that’s set to the client certificate chain.
@param cert_chain_len A pointer that’s set to the size of the cert_chain_out
buffer.
@returns S2N_SUCCESS on success. S2N_FAILURE on failure