Function s2n_tls_sys::s2n_config_add_cert_chain_and_key

source ·
pub unsafe extern "C" fn s2n_config_add_cert_chain_and_key(
    config: *mut s2n_config,
    cert_chain_pem: *const c_char,
    private_key_pem: *const c_char
) -> c_int
Expand description

Associates a certificate chain and private key with an s2n_config object. Using this API, only one cert chain of each type (like ECDSA or RSA) may be associated with a config. cert_chain_pem should be a PEM encoded certificate chain, with the first certificate in the chain being your server’s certificate. private_key_pem should be a PEM encoded private key corresponding to the server certificate.

@deprecated Use s2n_config_add_cert_chain_and_key_to_store instead.

@param config The configuration object being updated @param cert_chain_pem A byte array of a PEM encoded certificate chain. @param private_key_pem A byte array of a PEM encoded key. @returns S2N_SUCCESS on success. S2N_FAILURE on failure.