Don't use certificate after transfering ownership #1236

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@agl
Contributor
agl commented Feb 1, 2017

SSL_CTX_add_extra_chain_cert takes ownership of the given certificate
while, despite the similar name, SSL_CTX_add_client_CA does not. Thus
it's best to call SSL_CTX_add_client_CA before
SSL_CTX_add_extra_chain_cert, while the code still has ownership of the
argument.

@agl agl Don't use certificate after transfering ownership
SSL_CTX_add_extra_chain_cert takes ownership of the given certificate
while, despite the similar name, SSL_CTX_add_client_CA does not. Thus
it's best to call SSL_CTX_add_client_CA before
SSL_CTX_add_extra_chain_cert, while the code still has ownership of the
argument.
3096943
@mention-bot

@agl, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bagder, @jay and @rousskov to be potential reviewers.

@jay jay added a commit to jay/curl that referenced this pull request Feb 1, 2017
@agl @jay agl + jay openssl: Don't use certificate after transferring ownership
SSL_CTX_add_extra_chain_cert takes ownership of the given certificate
while, despite the similar name, SSL_CTX_add_client_CA does not. Thus
it's best to call SSL_CTX_add_client_CA before
SSL_CTX_add_extra_chain_cert, while the code still has ownership of the
argument.

Closes curl#1236
028391d
@jay jay added a commit that closed this pull request Feb 1, 2017
@agl @jay agl + jay openssl: Don't use certificate after transferring ownership
SSL_CTX_add_extra_chain_cert takes ownership of the given certificate
while, despite the similar name, SSL_CTX_add_client_CA does not. Thus
it's best to call SSL_CTX_add_client_CA before
SSL_CTX_add_extra_chain_cert, while the code still has ownership of the
argument.

Closes #1236
028391d
@jay jay closed this in 028391d Feb 1, 2017
@jay
Member
jay commented Feb 1, 2017

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment