ngtcp2_conn_install_tx_handshake_key ==================================== Synopsis -------- *#include * .. function:: int ngtcp2_conn_install_tx_handshake_key( ngtcp2_conn *conn, const ngtcp2_crypto_aead_ctx *aead_ctx, const uint8_t *iv, size_t ivlen, const ngtcp2_crypto_cipher_ctx *hp_ctx) `ngtcp2_conn_install_tx_handshake_key` installs packet protection keying materials for encrypting outgoing Handshake packets. *aead_ctx* is AEAD cipher context object which must be initialized with an encryption key. *iv* is IV of length *ivlen*. *hp_ctx* is a packet header protection cipher context object. *ivlen* must be the minimum length of AEAD nonce, or 8 bytes if that is larger. If this function succeeds, *conn* takes ownership of *aead_ctx* and *hp_ctx*. :member:`ngtcp2_callbacks.delete_crypto_aead_ctx` and :member:`ngtcp2_callbacks.delete_crypto_cipher_ctx` will be called to delete these objects when they are no longer used. If this function fails, the caller is responsible to delete them. This function returns 0 if it succeeds, or one of the following negative error codes: :macro:`NGTCP2_ERR_NOMEM` Out of memory.