Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Add SSL plugin to support cert (.pem) and ssl-key files for authentication to remote resource. See: http://docs.guzzlephp.org/en/latest/request-options.html#cert and http://docs.guzzlephp.org/en/latest/request-options.html#ssl-key
Comment | File | Size | Author |
---|---|---|---|
#5 | ssl_authentication-2841317-5.patch | 4 KB | Alfredo Vázquez |
#2 | ssl_authentication-2841317.patch | 955 bytes | alozie |
Comments
Comment #2
alozie CreditAttribution: alozie commentedI've created a BasicSSL plugin (BasicSSL.php) to add support for SSL authentication. It provides support for cert (.pem) and SSL key (.key) files as described by guzzle RequestOptions (see: https://api.drupal.org/api/drupal/vendor!guzzlehttp!guzzle!src!RequestOp... and https://docs.guzzlephp.org/en/latest/request-options.html).
Comment #3
mikeryanCatching up on the queue at long last... Let's run this through the testbot.
Comment #4
heddnThere should be an exception thrown if these config keys are missing, no?
And it would help a lot if we could throw some doxygen code examples into the class comments.
Comment #5
Alfredo Vázquez CreditAttribution: Alfredo Vázquez commentedUpdate on BasicSSL file, now it throws an exception. Besides I added a Unit Testing file.
Comment #6
heddnSo, I learned something in the past week or so about Drupal's http client. You can easily override it. https://www.jeffgeerling.com/blog/2016/increase-guzzle-http-client-reque... gives one example. So, I'm not sure this patch/issue is needed. Just add the guzzle overrides to settings.php for the (I assume) self-signed certs. Can you comment if that will work?