Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCR Not Sending Client Certificate when wrapping Requests #220

Closed
fxfitz opened this issue Oct 12, 2015 · 6 comments
Closed

VCR Not Sending Client Certificate when wrapping Requests #220

fxfitz opened this issue Oct 12, 2015 · 6 comments
Labels
stale Issues and PRs that have had birthdays since last activity. Please feel free to reopen though!

Comments

@fxfitz
Copy link

fxfitz commented Oct 12, 2015

When using VCR and attempting to send a client certificate to a webserver (as seen below), VCR does not include the certificate in the packets being sent out.

This can be confirmed by looking at a Wireshark capture (screenshot). When the client presents the certificate, you can see the 'Certificates Length' is actually 0.

This works as expected when not using VCR.

creds_resp = requests.get(computer.creds_href,
                              cert=client_cert,
                              verify=CA_FILENAME)
@colonelpanic8
Copy link
Collaborator

Seems likely that this is because we only forward certain values explicitly to the actual connection.

def putrequest(self, method, url, *args, **kwargs):

self.real_connection.request(

We probably need to store the data coming in as args, kwargs there and pass it on appropriately.

But thats all just a guess.

@agriffis
Copy link
Contributor

@fxfitz You didn't happen to investigate this any further, did you?

@fxfitz
Copy link
Author

fxfitz commented Nov 24, 2015

Sadly, no, I haven't.

@kevin1024
Copy link
Owner

I'd like to write a test for this, but since this happens at the protocol layer I'm not sure how to assert that the certificate is included.

@kevin1024
Copy link
Owner

The SSL also changed in py2.7+ to use SSLContext instead of as args to the HTTPConnection object. So this might be version-dependent.

@neozenith neozenith added the stale Issues and PRs that have had birthdays since last activity. Please feel free to reopen though! label Jan 5, 2020
@neozenith
Copy link
Collaborator

A lot of changes have happened to VCRpy since this ticket was opened. As this ticket has become stale and we have a lot of old tickets that need to be groomed, I'm closing this for now to make it easier to see what is still relevant.

However if it is still needed, please feel free to re-open or create a new ticket.

Thanks! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues and PRs that have had birthdays since last activity. Please feel free to reopen though!
Projects
None yet
Development

No branches or pull requests

5 participants