Make WordPress Core

Opened 9 years ago

Closed 4 years ago

#34883 closed enhancement (reported-upstream)

Support TLS Client Certificates

Reported by: outlandish-josh's profile Outlandish Josh Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: HTTP API Keywords: has-patch needs-unit-tests
Focuses: Cc:

Description

As we get savvier about TLS as part of the HTTPS Everywhere movement, one use-case that would be nice to support is using Client Certificates when making HTTPS requests. Using client certificates for authentication is a strong way to build trusted APIs.

This looks like it would be fairly straightforward to implement as the option is supported by both Curl and PHP stream contexts (CURLOPT_SSLCERT or local_cert, respectively). We'd just need to add the handling for specifying the path to a client cert as part of the $options array in the API calls, and turn that in the proper option for the actual transporter.

I should be able to create a patch for this shortly.

Attachments (2)

34883.diff (2.5 KB) - added by Outlandish Josh 9 years ago.
Adding client cert option to HTTP reqests API
34883-correct.diff (2.7 KB) - added by Outlandish Josh 9 years ago.
Corrected patch. I derped the first one.

Download all attachments as: .zip

Change History (7)

@Outlandish Josh
9 years ago

Adding client cert option to HTTP reqests API

@Outlandish Josh
9 years ago

Corrected patch. I derped the first one.

#1 @johnbillion
9 years ago

  • Keywords has-patch added
  • Version trunk deleted

#2 @danielbachhuber
9 years ago

  • Keywords needs-unit-tests added
  • Milestone changed from Awaiting Review to Future Release

#3 follow-up: @dd32
8 years ago

  • Keywords needs-upstream added

As we've now switched to using Requests in core, this should be submitted as an enhancement for Requests.

#4 in reply to: ↑ 3 @pbiron
4 years ago

Replying to dd32:

As we've now switched to using Requests in core, this should be submitted as an enhancement for Requests.

done https://github.com/rmccue/Requests/issues/377

#5 @desrosj
4 years ago

  • Keywords needs-upstream removed
  • Resolution set to reported-upstream
  • Status changed from new to closed

Because this requires a change upstream in Requests and a ticket has been opened up there, I am going to close this out.

Note: See TracTickets for help on using tickets.