Setting CURLOPT_SSL_VERIFYHOST to 0 when certificateAuthority is false t... #498

Merged
merged 1 commit into from Dec 22, 2013

Conversation

Projects
None yet
2 participants
@kenden
Contributor

kenden commented Dec 13, 2013

...o match documentation

When $certificateAuthority is False,
the documentation for setSslVerification() in the Interface, at:
https://github.com/guzzle/guzzle/blob/master/src/Guzzle/Http/ClientInterface.php
says:
"Setting $certificateAuthority to FALSE will turn off peer verification, unset the bundled cacert.pem, and disable host verification."

This allows to have:
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
which can be good for testing or troubleshooting. See this, work example.
http://ademar.name/blog/2006/04/curl-ssl-certificate-problem-v.html

@mtdowling

This comment has been minimized.

Show comment
Hide comment
@mtdowling

mtdowling Dec 13, 2013

Member

This is a valid change. I'm not sure how that inconsistency made its way in.

Can you fix the failing test please?

Member

mtdowling commented Dec 13, 2013

This is a valid change. I'm not sure how that inconsistency made its way in.

Can you fix the failing test please?

kenden added a commit to kenden/guzzle that referenced this pull request Dec 16, 2013

Fixing test for pull request 498
guzzle#498.

Setting certificate_authority to FALSE should disable host verification
@kenden

This comment has been minimized.

Show comment
Hide comment
@kenden

kenden Dec 16, 2013

Contributor

I sent a pull request with a fix for the Unit test.
The issue got introduced with the initial SSL configuration verification code:
38019b9
I would be interesting to know where the code comes from though. because some Mozilla software might have the same issue. claylo, would you have more info maybe?

Contributor

kenden commented Dec 16, 2013

I sent a pull request with a fix for the Unit test.
The issue got introduced with the initial SSL configuration verification code:
38019b9
I would be interesting to know where the code comes from though. because some Mozilla software might have the same issue. claylo, would you have more info maybe?

@kenden

This comment has been minimized.

Show comment
Hide comment
@kenden

kenden Dec 17, 2013

Contributor

I added a fix for the unit test in the same branch.

Contributor

kenden commented Dec 17, 2013

I added a fix for the unit test in the same branch.

@mtdowling

This comment has been minimized.

Show comment
Hide comment
@mtdowling

mtdowling Dec 17, 2013

Member

Thanks for combining the PRs... One more thing :) Can you squash this into a single commit?

Member

mtdowling commented Dec 17, 2013

Thanks for combining the PRs... One more thing :) Can you squash this into a single commit?

Setting CURLOPT_SSL_VERIFYHOST to 0 when certificateAuthority is fals…
…e to match documentation

When $certificateAuthority is False,
the documentation for setSslVerification() in the Interface, at:
https://github.com/guzzle/guzzle/blob/master/src/Guzzle/Http/ClientInterface.php
says:
"Setting $certificateAuthority to FALSE will turn off peer verification, unset the bundled cacert.pem, and disable host verification."

Also fixing test unit
@kenden

This comment has been minimized.

Show comment
Hide comment
@kenden

kenden Dec 18, 2013

Contributor

Done.

Contributor

kenden commented Dec 18, 2013

Done.

mtdowling added a commit that referenced this pull request Dec 22, 2013

Merge pull request #498 from kenden/patch-1
Setting CURLOPT_SSL_VERIFYHOST to 0 when certificateAuthority is false t...

@mtdowling mtdowling merged commit 025f730 into guzzle:master Dec 22, 2013

1 check failed

default The Travis CI build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment