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

Client side certificate support #48

Merged
merged 1 commit into from
Apr 13, 2020
Merged

Client side certificate support #48

merged 1 commit into from
Apr 13, 2020

Conversation

Magua
Copy link
Contributor

@Magua Magua commented Jan 13, 2020

Client certificate supported with PKSC 12 / pfx.

Use like this for password-less p12.

requests.get(
  "https://client.badssl.com",
  cert = "./badssl.com-client.p12"
)

Add password if necessary.

requests.get(
  "https://client.badssl.com",
  cert = ("./badssl.com-client.p12", "password")
)

badssl.com used in tests can and will occasionally (annually?) update certificates and that would fail the tests. Therefore I made the test print a warning in case of client certificate failure instead of failing the test.

Warning looks like this:

WARNING: Certificate may have expired and needs to be updated. Please check: https://github.com/lihaoyi/requests-scala/blob/master/requests/test/resources/badssl.com-client.md and/or file issue

@Magua
Copy link
Contributor Author

Magua commented Jan 13, 2020

Closes #12

@lionelfleury
Copy link

Nice work! 👍

@Magua
Copy link
Contributor Author

Magua commented Apr 6, 2020

@lihaoyi have you had a chance to look at this, anything you want done differently?

@lihaoyi
Copy link
Member

lihaoyi commented Apr 6, 2020

Sorry, i just haven't had a chance to take a look at this properly. I'll try to find time for a proper review soon!

@lihaoyi
Copy link
Member

lihaoyi commented Apr 13, 2020

Looks good to me, sorry for the delay!

@lihaoyi lihaoyi merged commit 5fc80f6 into com-lihaoyi:master Apr 13, 2020
@Hakky54 Hakky54 mentioned this pull request Jul 5, 2020
@Magua Magua deleted the client-cert branch February 4, 2021 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants