picoquic/tls_api.c
void picoquic_crypto_context_free(picoquic_crypto_context_t * ctx)
{
    if (ctx->aead_encrypt != NULL) {
        ptls_aead_free((ptls_aead_context_t *)ctx->aead_encrypt);
        ctx->aead_encrypt = NULL;
    }

    if (ctx->aead_decrypt != NULL) {
        ptls_aead_free((ptls_aead_context_t *)ctx->aead_decrypt);
        ctx->aead_decrypt = NULL;
    }

    if (ctx->pn_enc != NULL) {
        ptls_cipher_free((ptls_cipher_context_t *)ctx->pn_enc);
        ctx->pn_enc = NULL;
    }

    if (ctx->pn_dec != NULL) {
        ptls_cipher_free((ptls_cipher_context_t *)ctx->pn_dec);
        ctx->pn_dec = NULL;
    }
}
/*
 * Release the crypto context, and the associated keys.
 */
Release the crypto context, and the associated keys.
Release the crypto context and the associated keys .
void picoquic_crypto_context_free(picoquic_crypto_context_t * ctx)
{
    if (ctx->aead_encrypt != NULL) {
        ptls_aead_free((ptls_aead_context_t *)ctx->aead_encrypt);
        ctx->aead_encrypt = NULL;
    }
    if (ctx->aead_decrypt != NULL) {
        ptls_aead_free((ptls_aead_context_t *)ctx->aead_decrypt);
        ctx->aead_decrypt = NULL;
    }
    if (ctx->pn_enc != NULL) {
        ptls_cipher_free((ptls_cipher_context_t *)ctx->pn_enc);
        ctx->pn_enc = NULL;
    }
    if (ctx->pn_dec != NULL) {
        ptls_cipher_free((ptls_cipher_context_t *)ctx->pn_dec);
        ctx->pn_dec = NULL;
    }
}
void picoquic_crypto_context_free ( picoquic_crypto_context_t * ctx ) { if ( ctx -> aead_encrypt != NULL ) { ptls_aead_free ( ( ptls_aead_context_t * ) ctx -> aead_encrypt ) ; ctx -> aead_encrypt = NULL ; } if ( ctx -> aead_decrypt != NULL ) { ptls_aead_free ( ( ptls_aead_context_t * ) ctx -> aead_decrypt ) ; ctx -> aead_decrypt = NULL ; } if ( ctx -> pn_enc != NULL ) { ptls_cipher_free ( ( ptls_cipher_context_t * ) ctx -> pn_enc ) ; ctx -> pn_enc = NULL ; } if ( ctx -> pn_dec != NULL ) { ptls_cipher_free ( ( ptls_cipher_context_t * ) ctx -> pn_dec ) ; ctx -> pn_dec = NULL ; } }
Release the crypto context, and the associated keys.
Release the crypto context and the associated keys .