excon 0.93.1 → 0.99.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3211fd54e5e026f3be23a2177c02a8c868e643306724f05cc654b5ec5c5fced
4
- data.tar.gz: 6ad596f7c44528b3a6655c5461d86de5161c8a7e55c1fdecc49d0cca88700921
3
+ metadata.gz: 4de69b0df9a1fc68f382e6d007845ddd9dac6ec8e6f0150b0988caafc604fc66
4
+ data.tar.gz: 3735d61f7219a99bfcfd8f953c7dd16f66b0232a794c602042f30a7eda7c9334
5
5
  SHA512:
6
- metadata.gz: 3813a14810ae26ba1b7331ac3b6b3b8a96de0aa69b476b10bc063cd4f85169ffd44fd3f90182cf62a0795ea8959239fa1c8aa6974b41aec57805cf170b8ee687
7
- data.tar.gz: c4fc25ce76d8c4304ef6f73b44d1a21179ab3b825d3ca2927fff3bc98082416d0acaa9e7dbe310bd9ebefd2513165eb4158c3ca330c11588092ea708e2e35484
6
+ metadata.gz: 366bb5af60bbd24b607bb9306a5f1581e0daeb95881e33376e85a9a7892935758fb06c09d656f27ffd3f791fbcc372e9703bf738f08a10c5d46f06558a34e19e
7
+ data.tar.gz: a38b16b4e9fe30c66d75e96e39330f6661a3c4a906801e7eaade9c3efd4af8d86a804b224d264f777f8d13026c0c1dc18581120ce179c5bfd6cf8ae3e427cd10
data/CONTRIBUTORS.md CHANGED
@@ -1,140 +1,182 @@
1
- * Aaron Stone <aaron@serendipity.cx>
2
- * Adam Esterline <adam@esterlines.com>
3
- * Alexander Sandström <alexander@skovik.com>
4
- * Andrew Katz <andrew.katz@outright.com>
5
- * Andy Delcambre <adelcambre@gmail.com>
6
- * Anshul Khandelwal <anshul@anshulkhandelwal.com>
7
- * Ash Wilson <smashwilson@gmail.com>
8
- * Ben Burkert <ben@benburkert.com>
9
- * Benedikt Böhm <bb@xnull.de>
10
- * Bo Jeanes <me@bjeanes.com>
11
- * Brandur <brandur@mutelight.org>
12
- * Brian D. Burns <iosctr@gmail.com>
13
- * Brian Hartsock <brian.hartsock@gmail.com>
14
- * Bryan Paxton <starbelly@pobox.com>
15
- * Caio Chassot <dev@caiochassot.com>
16
- * Caius Durling <dev@caius.name>
17
- * Carl Hörberg <carl.hoerberg@gmail.com>
18
- * Carl Hörberg <carl.hoerberg@gmail.com>
19
- * Carlos Sanchez <csanchez@maestrodev.com>
20
- * Casper Thomsen <ct@clearhaus.com>
21
- * Chris Hanks <christopher.m.hanks@gmail.com>
22
- * Claudio Poli <masterkain@gmail.com>
23
- * Damien Mathieu <damien@heroku.com>
24
- * Dan Hensgen <dan@methodhead.com>
25
- * Dan Peterson <dpiddy@gmail.com>
26
- * Dan Prince <dprince@redhat.com>
27
- * Dane Harrigan <dane.harrigan@gmail.com>
28
- * Dave Myron <therealdave.myron@gmail.com>
29
- * Dave Newton <davelnewton@gmail.com>
30
- * David Biehl <dbiehl@ncmedical.com>
31
- * David Biehl <lazylodr@gmail.com>
32
- * Dimitrij Denissenko <dimitrij@blacksquaremedia.com>
33
- * Dominik Richter <dominik.richter@gmail.com>
34
- * Doug McInnes <doug@dougmcinnes.com>
35
- * Eugene Howe <eugene@xtreme-computers.net>
36
- * Evan Phoenix <evan@fallingsnow.net>
37
- * Fabian Wiesel <fabian.wiesel@sap.com>
38
- * Federico Ravasio <ravasio.federico@gmail.com>
39
- * Glenn Pratt <glennpratt@gmail.com>
40
- * Graeme Nelson <graeme.nelson@gmail.com>
41
- * Guillaume Balaine <igosuki@gmail.com>
42
- * Hakan Ensari <hakan.ensari@papercavalier.com>
43
- * Ian Neubert <ian@ianneubert.com>
44
- * Jacob Atzen <jacob@incremental.dk>
45
- * James Cox <james@imaj.es>
46
- * James Watling <watling.james@gmail.com>
47
- * Jean Mertz <jean@mertz.fm>
48
- * Jeremy Hinegardner <jeremy@copiousfreetime.org>
49
- * Jesse Kempf <jesse.kempf@opower.com>
50
- * Joe Rafaniello <jrafanie@redhat.com>
51
- * John Keiser <jkeiser@opscode.com>
52
- * John Leach <john@brightbox.co.uk>
53
- * Jonas Pfenniger <jonas@pfenniger.name>
54
- * Jonathan Dance <github@wuputah.com>
55
- * Jonathan Dance <jd@wuputah.com>
56
- * Jonathan Roes <jroes@jroes.net>
57
- * Joshua B. Smith <jbsmith@us.ibm.com>
58
- * Joshua Gross <joshua@surfeasy.com>
59
- * Joshua Mckinney <joshmckin@gmail.com>
60
- * Joshua Napoli <jnapoli@swipely-napoli.home>
61
- * Joshua Napoli <jnapoli@swipely-napoli.local>
62
- * Kelly Mahan <kmahan@kmahan.com>
63
- * Kensuke Nagae <kyanny@gmail.com>
64
- * Konstantin Shabanov <etehtsea@gmail.com>
65
- * Kyle Rames <kyle.rames@rackspace.com>
66
- * Lewis Marshall <lewis@lmars.net>
67
- * Lincoln Stoll <me@lstoll.net>
68
- * Louis Sobel <sobel@mit.edu>
69
- * Mahemoff <michael@mahemoff.com>
70
- * Mathias Meyer <meyer@paperplanes.de>
71
- * Matt Gauger <matt.gauger@gmail.com>
72
- * Matt Sanders <matt@modal.org>
73
- * Matt Sanders <matt@polycot.com>
74
- * Matt Snyder <snyder2112@me.com>
75
- * Matt Todd <chiology@gmail.com>
76
- * Max Lincoln <max@devopsy.com>
77
- * Michael Brodhead <mkb@engineyard.com>
78
- * Michael Hale <mike@hales.ws>
79
- * Michael Rowe <mrowe@mojain.com>
80
- * Michael Rykov <mrykov@gmail.com>
81
- * Mike Heffner <mikeh@fesnel.com>
82
- * Myron Marston <myron.marston@gmail.com>
83
- * Nathan Long <nathan.long@tma1.com>
84
- * Nathan Sutton <nate@zencoder.com>
85
- * Nick Osborn <nick.osborn@digital.cabinet-office.gov.uk>
86
- * Nicolas Sanguinetti <contacto@nicolassanguinetti.info>
87
- * Paul Gideon Dann <pdgiddie@gmail.com>
88
- * Pavel <pavel.evst@gmail.com>
89
- * Peter Meier <peter.meier@immerda.ch>
90
- * Peter Weldon <peter.weldon@null.net>
91
- * Peter Weldon <peter@lautus.net>
92
- * Phil Ross <phil.ross@gmail.com>
93
- * Richard Ramsden <richard@rramsden.ca>
94
- * Ruslan Korolev <rs3@fastmail.com>
95
- * Ruslan Korolev <rs41@gmx.com>
96
- * Ruslan Kyrychuk <ruslan.kyrychuk@gmail.com>
97
- * Ryan Bigg <radarlistener@fastmail.fm>
98
- * Ryan Mohr <ryan.mohr@gmail.com>
99
- * Sam Withrow <sam.withrow@curiousnation.org>
100
- * Scott Gonyea <me@aitrus.org>
101
- * Scott Gonyea <me@sgonyea.com>
102
- * Scott Walkinshaw <scott.walkinshaw@gmail.com>
103
- * Sean Cribbs <seancribbs@gmail.com>
104
- * Sergio Rubio <rubiojr@frameos.org>
105
- * Shai Rosenfeld <shaiguitar@gmail.com>
106
- * Stefan Merettig <stefan-merettig@nuriaproject.org>
107
- * Stephen Chu <github@stephenchu.com>
108
- * Swanand Pagnis <swanandp@users.noreply.github.com>
109
- * Terry Howe <terrylhowe@gmail.com>
110
- * Thom Mahoney & Josh Lane <tmahoney@engineyard.com>
111
- * Thom May <thom@digital-science.com>
112
- * Tim Carey-Smith <tim@spork.in>
113
- * Todd Lunter <tlunter@gmail.com>
114
- * Tom Maher <tmaher@heroku.com>
115
- * Tom Maher <tmaher@tursom.org>
116
- * Trym Skaar <trym@tryms.no>
117
- * Tuomas Silen <tuomas.silen@nodeta.fi>
118
- * Victor Costan <costan@gmail.com>
119
- * Viven <vivien.schilis@gmail.com>
120
- * Wesley Beary <geemus+github@gmail.com>
121
- * Wesley Beary <geemus@engineyard.com>
122
- * Wesley Beary <geemus@gmail.com>
123
- * Wesley Beary <wbeary@engineyard.com>
124
- * Wesley Beary <wesley@heroku.com>
125
- * Zach Anker <zanker@squareup.com>
126
- * chrisrhoden <carhoden@gmail.com>
127
- * dickeyxxx <jeff@dickeyxxx.com>
128
- * geemus (Wesley Beary) <wbeary@engineyard.com>
129
- * geemus <geemus@gmail.com>
130
- * ggoodale <ggoodale@gmail.com>
131
- * marios <marios@redhat.com>
132
- * mkb <mkb@black-ice.org>
133
- * phiggins <pete@peterhiggins.org>
134
- * rin_ne <rinrin.ne@gmail.com>
135
- * rinrinne <rinrin.ne@gmail.com>
136
- * rkyrychuk <ruslan.kyrychuk@gmail.com>
137
- * sshaw <skye.shaw@gmail.com>
138
- * starbelly <starbelly@pobox.com>
139
- * twrodriguez <tw.rodriguez@gmail.com>
140
- * zimbatm <zimbatm@zimbatm.com>
1
+ * Aaron Stone
2
+ * Adam Avilla
3
+ * Adam Esterline
4
+ * Alexander Sandström
5
+ * Alexandr Burov
6
+ * Andrew Katz
7
+ * Andrew Metcalf
8
+ * Andrew Sullivan Cant
9
+ * André Diego Piske
10
+ * Andy Delcambre
11
+ * Anshul Khandelwal
12
+ * Anton Chuchkalov
13
+ * Antonio Terceiro
14
+ * Ash Wilson
15
+ * Atul Bhosale
16
+ * Bart de Water
17
+ * Ben Burkert
18
+ * Benedikt Böhm
19
+ * Bill Mill
20
+ * Bo Jeanes
21
+ * Brandur
22
+ * Brian D. Burns
23
+ * Brian Hartsock
24
+ * Bryan Paxton
25
+ * Caio Chassot
26
+ * Caius Durling
27
+ * Carl Hörberg
28
+ * Carl Hörberg
29
+ * Carlos Sanchez
30
+ * Casper Thomsen
31
+ * Chris Hanks
32
+ * Christoph Rieß
33
+ * Christophe Taton
34
+ * Claudio Poli
35
+ * Craig Shannon
36
+ * Damien Mathieu
37
+ * Dan Hensgen
38
+ * Dan Peterson
39
+ * Dan Prince
40
+ * Dane Harrigan
41
+ * Daniel Berger
42
+ * Dave Myron
43
+ * Dave Newton
44
+ * Dave Vasilevsky
45
+ * David Biehl
46
+ * David Taylor
47
+ * Dimitrij Denissenko
48
+ * Dominik Richter
49
+ * Doug McInnes
50
+ * Esteban Pastorino
51
+ * Eugene Howe
52
+ * Evan Phoenix
53
+ * Fabian Wiesel
54
+ * Federico Ravasio
55
+ * Felix Wolfsteller
56
+ * Glenn Pratt
57
+ * Graeme Nelson
58
+ * Grey Baker
59
+ * Guillaume Balaine
60
+ * Hakan Ensari
61
+ * Hiroshi Hatake
62
+ * Ian Neubert
63
+ * Igor Fedoronchuk
64
+ * Jacob Atzen
65
+ * James Cox
66
+ * James Watling
67
+ * Jean Mertz
68
+ * Jeremy Hinegardner
69
+ * Jesse Kempf
70
+ * Jessica Jiang
71
+ * Joe Rafaniello
72
+ * John Keiser
73
+ * John Leach
74
+ * Jonas Pfenniger
75
+ * Jonathan Dance
76
+ * Jonathan Roes
77
+ * Joshua B. Smith
78
+ * Joshua Gross
79
+ * Joshua Mckinney
80
+ * Joshua Napoli
81
+ * Kelly Mahan
82
+ * Kensuke Nagae
83
+ * Kimmo Lehto
84
+ * Koen Rouwhorst
85
+ * Konstantin Shabanov
86
+ * Kyle Purkiss
87
+ * Kyle Rames
88
+ * Lewis Marshall
89
+ * Lincoln Stoll
90
+ * Louis Sobel
91
+ * Mahemoff
92
+ * Marco Costa
93
+ * Markus Bucher
94
+ * Mathias Meyer
95
+ * Matt Gauger
96
+ * Matt Palmer
97
+ * Matt Sanders
98
+ * Matt Snyder
99
+ * Matt Todd
100
+ * Maurice Schreiber
101
+ * Max Lincoln
102
+ * Michael Brodhead
103
+ * Michael Hale
104
+ * Michael Rowe
105
+ * Michael Rykov
106
+ * Mike Heffner
107
+ * Milovan Zogovic
108
+ * Myron Marston
109
+ * Nathan Long
110
+ * Nathan Sutton
111
+ * Nick Osborn
112
+ * Nicolas Leger
113
+ * Nicolas Sanguinetti
114
+ * Paul Gideon Dann
115
+ * Pavel
116
+ * Pavel Valena
117
+ * Peter Meier
118
+ * Peter Weldon
119
+ * Phil Ross
120
+ * Raul Murciano
121
+ * Richard Godbee
122
+ * Richard Ramsden
123
+ * Rohan Mendon
124
+ * Ruslan Korolev
125
+ * Ruslan Kyrychuk
126
+ * Ryan Bigg
127
+ * Ryan Mohr
128
+ * Ryan Schlesinger
129
+ * Ryoji Yoshioka
130
+ * Sam
131
+ * Sam Lehman
132
+ * Sam Withrow
133
+ * Scott Gonyea
134
+ * Scott Walkinshaw
135
+ * Sean Cribbs
136
+ * Sergio Rubio
137
+ * Shai Rosenfeld
138
+ * Stan Hu
139
+ * Stefan Merettig
140
+ * Stephen Chu
141
+ * Swanand Pagnis
142
+ * Terry Howe
143
+ * Thom Mahoney & Josh Lane
144
+ * Thom May
145
+ * Tim Carey-Smith
146
+ * Timothée Peignier
147
+ * Tobias Schmidt
148
+ * Todd Lunter
149
+ * Tom Maher
150
+ * Trym Skaar
151
+ * Tuomas Silen
152
+ * Victor Costan
153
+ * Viven
154
+ * Vít Ondruch
155
+ * Wesley Beary
156
+ * Yusuke Nakamura
157
+ * Zach Anker
158
+ * chrisrhoden
159
+ * dependabot[bot]
160
+ * dickeyxxx
161
+ * geemus
162
+ * geemus (Wesley Beary)
163
+ * ggoodale
164
+ * ivan.filenko
165
+ * jasquat
166
+ * karimb
167
+ * marios
168
+ * mkb
169
+ * nathannaveen
170
+ * ojab
171
+ * patrick brisbin
172
+ * pavel
173
+ * phiggins
174
+ * rin_ne
175
+ * rinrinne
176
+ * rkyrychuk
177
+ * shale
178
+ * sshaw
179
+ * starbelly
180
+ * twrodriguez
181
+ * wsnarski
182
+ * zimbatm
data/README.md CHANGED
@@ -446,7 +446,16 @@ connection = Excon.new('https://example.com',
446
446
 
447
447
  `client_key_pass` is optional.
448
448
 
449
- If you already have loaded the certificate and key into memory, then pass it through like:
449
+ Optionally, you can also pass the whole chain by passing the extra certificates through `client_chain`:
450
+
451
+ ```ruby
452
+ connection = Excon.new('https://example.com',
453
+ client_cert: 'mycert.pem',
454
+ client_chain: 'mychain.pem',
455
+ client_key: 'mycert.key')
456
+ ```
457
+
458
+ If you already have loaded the certificate, key and chain into memory, then pass it through like:
450
459
 
451
460
  ```ruby
452
461
  client_cert_data = File.load 'mycert.pem'
@@ -454,6 +463,7 @@ client_key_data = File.load 'mycert.key'
454
463
 
455
464
  connection = Excon.new('https://example.com',
456
465
  client_cert_data: client_cert_data,
466
+ client_chain_data: client_chain_data,
457
467
  client_key_data: client_key_data)
458
468
  ```
459
469
 
data/data/cacert.pem CHANGED
@@ -1,7 +1,7 @@
1
1
  ##
2
2
  ## Bundle of CA Root Certificates
3
3
  ##
4
- ## Certificate data from Mozilla as of: Tue Oct 11 03:12:05 2022 GMT
4
+ ## Certificate data from Mozilla as of: Tue Jan 10 04:12:06 2023 GMT
5
5
  ##
6
6
  ## This is a bundle of X.509 certificates of public Certificate Authorities
7
7
  ## (CA). These were automatically extracted from Mozilla's root certificates
@@ -14,7 +14,7 @@
14
14
  ## Just configure this file as the SSLCACertificateFile.
15
15
  ##
16
16
  ## Conversion done with mk-ca-bundle.pl version 1.29.
17
- ## SHA256: 3ff8bd209b5f2e739b9f2b96eacb694a774114685b02978257824f37ff528f71
17
+ ## SHA256: 90c470e705b4b5f36f09684dc50e2b79c8b86989a848b62cd1a7bd6460ee65f6
18
18
  ##
19
19
 
20
20
 
@@ -489,29 +489,6 @@ IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN
489
489
  +8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ==
490
490
  -----END CERTIFICATE-----
491
491
 
492
- Network Solutions Certificate Authority
493
- =======================================
494
- -----BEGIN CERTIFICATE-----
495
- MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG
496
- EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr
497
- IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx
498
- MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
499
- MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G
500
- CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx
501
- jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT
502
- aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT
503
- crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc
504
- /Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB
505
- AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP
506
- BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv
507
- bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA
508
- A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q
509
- 4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/
510
- GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
511
- wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD
512
- ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
513
- -----END CERTIFICATE-----
514
-
515
492
  COMODO ECC Certification Authority
516
493
  ==================================
517
494
  -----BEGIN CERTIFICATE-----
@@ -1654,36 +1631,6 @@ uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7
1654
1631
  yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3
1655
1632
  -----END CERTIFICATE-----
1656
1633
 
1657
- Staat der Nederlanden EV Root CA
1658
- ================================
1659
- -----BEGIN CERTIFICATE-----
1660
- MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJOTDEeMBwGA1UE
1661
- CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
1662
- RVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0yMjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5M
1663
- MR4wHAYDVQQKDBVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRl
1664
- cmxhbmRlbiBFViBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkk
1665
- SzrSM4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nCUiY4iKTW
1666
- O0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3dZ//BYY1jTw+bbRcwJu+r
1667
- 0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46prfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8
1668
- Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13lpJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ7O6M5HTp5gV
1669
- XJrm0w912fxBmJc+qiXbj5IusHsMX/FjqTf5m3VpTCgmJdrV8hJwRVXj33NeN/Uhb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GiqtDhFZK
1683
- DyAthg710tvSeopLzaXoTvFeJiUBWSOgftL2fiFX1ye8FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGy
1684
- eUN51q1veieQA6TqJIc/2b3Z6fJfUEkc7uzXLg==
1685
- -----END CERTIFICATE-----
1686
-
1687
1634
  IdenTrust Commercial Root CA 1
1688
1635
  ==============================
1689
1636
  -----BEGIN CERTIFICATE-----
@@ -2135,87 +2082,6 @@ F8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ
2135
2082
  aaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g==
2136
2083
  -----END CERTIFICATE-----
2137
2084
 
2138
- TrustCor RootCert CA-1
2139
- ======================
2140
- -----BEGIN CERTIFICATE-----
2141
- MIIEMDCCAxigAwIBAgIJANqb7HHzA7AZMA0GCSqGSIb3DQEBCwUAMIGkMQswCQYDVQQGEwJQQTEP
2142
- MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig
2143
- U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp
2144
- dHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0IENBLTEwHhcNMTYwMjA0MTIzMjE2WhcNMjkx
2145
- MjMxMTcyMzE2WjCBpDELMAkGA1UEBhMCUEExDzANBgNVBAgMBlBhbmFtYTEUMBIGA1UEBwwLUGFu
2146
- YW1hIENpdHkxJDAiBgNVBAoMG1RydXN0Q29yIFN5c3RlbXMgUy4gZGUgUi5MLjEnMCUGA1UECwwe
2147
- VHJ1c3RDb3IgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MR8wHQYDVQQDDBZUcnVzdENvciBSb290Q2Vy
2148
- dCBDQS0xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv463leLCJhJrMxnHQFgKq1mq
2149
- jQCj/IDHUHuO1CAmujIS2CNUSSUQIpidRtLByZ5OGy4sDjjzGiVoHKZaBeYei0i/mJZ0PmnK6bV4
2150
- pQa81QBeCQryJ3pS/C3Vseq0iWEk8xoT26nPUu0MJLq5nux+AHT6k61sKZKuUbS701e/s/OojZz0
2151
- JEsq1pme9J7+wH5COucLlVPat2gOkEz7cD+PSiyU8ybdY2mplNgQTsVHCJCZGxdNuWxu72CVEY4h
2152
- gLW9oHPY0LJ3xEXqWib7ZnZ2+AYfYW0PVcWDtxBWcgYHpfOxGgMFZA6dWorWhnAbJN7+KIor0Gqw
2153
- /Hqi3LJ5DotlDwIDAQABo2MwYTAdBgNVHQ4EFgQU7mtJPHo/DeOxCbeKyKsZn3MzUOcwHwYDVR0j
2154
- BBgwFoAU7mtJPHo/DeOxCbeKyKsZn3MzUOcwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
2155
- AYYwDQYJKoZIhvcNAQELBQADggEBACUY1JGPE+6PHh0RU9otRCkZoB5rMZ5NDp6tPVxBb5UrJKF5
2156
- mDo4Nvu7Zp5I/5CQ7z3UuJu0h3U/IJvOcs+hVcFNZKIZBqEHMwwLKeXx6quj7LUKdJDHfXLy11yf
2157
- ke+Ri7fc7Waiz45mO7yfOgLgJ90WmMCV1Aqk5IGadZQ1nJBfiDcGrVmVCrDRZ9MZyonnMlo2HD6C
2158
- qFqTvsbQZJG2z9m2GM/bftJlo6bEjhcxwft+dtvTheNYsnd6djtsL1Ac59v2Z3kf9YKVmgenFK+P
2159
- 3CghZwnS1k1aHBkcjndcw5QkPTJrS37UeJSDvjdNzl/HHk484IkzlQsPpTLWPFp5LBk=
2160
- -----END CERTIFICATE-----
2161
-
2162
- TrustCor RootCert CA-2
2163
- ======================
2164
- -----BEGIN CERTIFICATE-----
2165
- MIIGLzCCBBegAwIBAgIIJa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Z845b2EzwnexhF7sUMlQMAimTHpKG9n/v55IFDlndmQguLvqcAFLTxWYp5KeX
2192
- RKQOKIETNcX2b2TmQcTVL8w0RSXPQQCWPUouwpaYT05KnJe32x+SMsj/D1Fu1uwJ
2193
- -----END CERTIFICATE-----
2194
-
2195
- TrustCor ECA-1
2196
- ==============
2197
- -----BEGIN CERTIFICATE-----
2198
- MIIEIDCCAwigAwIBAgIJAISCLF8cYtBAMA0GCSqGSIb3DQEBCwUAMIGcMQswCQYDVQQGEwJQQTEP
2199
- MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig
2200
- U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp
2201
- dHkxFzAVBgNVBAMMDlRydXN0Q29yIEVDQS0xMB4XDTE2MDIwNDEyMzIzM1oXDTI5MTIzMTE3Mjgw
2202
- N1owgZwxCzAJBgNVBAYTAlBBMQ8wDQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5
2203
- MSQwIgYDVQQKDBtUcnVzdENvciBTeXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29y
2204
- IENlcnRpZmljYXRlIEF1dGhvcml0eTEXMBUGA1UEAwwOVHJ1c3RDb3IgRUNBLTEwggEiMA0GCSqG
2205
- SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPj+ARtZ+odnbb3w9U73NjKYKtR8aja+3+XzP4Q1HpGjOR
2206
- MRegdMTUpwHmspI+ap3tDvl0mEDTPwOABoJA6LHip1GnHYMma6ve+heRK9jGrB6xnhkB1Zem6g23
2207
- xFUfJ3zSCNV2HykVh0A53ThFEXXQmqc04L/NyFIduUd+Dbi7xgz2c1cWWn5DkR9VOsZtRASqnKmc
2208
- p0yJF4OuowReUoCLHhIlERnXDH19MURB6tuvsBzvgdAsxZohmz3tQjtQJvLsznFhBmIhVE5/wZ0+
2209
- fyCMgMsq2JdiyIMzkX2woloPV+g7zPIlstR8L+xNxqE6FXrntl019fZISjZFZtS6mFjBAgMBAAGj
2210
- YzBhMB0GA1UdDgQWBBREnkj1zG1I1KBLf/5ZJC+Dl5mahjAfBgNVHSMEGDAWgBREnkj1zG1I1KBL
2211
- f/5ZJC+Dl5mahjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF
2212
- AAOCAQEABT41XBVwm8nHc2FvcivUwo/yQ10CzsSUuZQRg2dd4mdsdXa/uwyqNsatR5Nj3B5+1t4u
2213
- /ukZMjgDfxT2AHMsWbEhBuH7rBiVDKP/mZb3Kyeb1STMHd3BOuCYRLDE5D53sXOpZCz2HAF8P11F
2214
- hcCF5yWPldwX8zyfGm6wyuMdKulMY/okYWLW2n62HGz1Ah3UKt1VkOsqEUc8Ll50soIipX1TH0Xs
2215
- J5F95yIW6MBoNtjG8U+ARDL54dHRHareqKucBK+tIA5kmE2la8BIWJZpTdwHjFGTot+fDz2LYLSC
2216
- jaoITmJF4PkL0uDgPFveXHEnJcLmA4GLEFPjx1WitJ/X5g==
2217
- -----END CERTIFICATE-----
2218
-
2219
2085
  SSL.com Root Certification Authority RSA
2220
2086
  ========================================
2221
2087
  -----BEGIN CERTIFICATE-----
data/excon.gemspec CHANGED
@@ -26,7 +26,6 @@ Gem::Specification.new do |s|
26
26
  s.add_development_dependency('eventmachine', '>= 1.0.4')
27
27
  s.add_development_dependency('open4')
28
28
  s.add_development_dependency('rake')
29
- s.add_development_dependency('rdoc')
30
29
  s.add_development_dependency('shindo')
31
30
  s.add_development_dependency('sinatra')
32
31
  s.add_development_dependency('sinatra-contrib')
@@ -62,6 +62,7 @@ module Excon
62
62
  # @option params [Class] :instrumentor Responds to #instrument as in ActiveSupport::Notifications
63
63
  # @option params [String] :instrumentor_name Name prefix for #instrument events. Defaults to 'excon'
64
64
  def initialize(params = {})
65
+ @pid = Process.pid
65
66
  @data = Excon.defaults.dup
66
67
  # merge does not deep-dup, so make sure headers is not the original
67
68
  @data[:headers] = @data[:headers].dup
@@ -89,7 +90,9 @@ module Excon
89
90
  end
90
91
 
91
92
  if @data[:scheme] == UNIX
92
- if @data[:host]
93
+ # 'uri' >= v0.12.0 returns an empty string instead of nil for no host.
94
+ # So treat the parameter as present if and only if it is both non-nill and non-empty.
95
+ if @data[:host] && !@data[:host].empty?
93
96
  raise ArgumentError, "The `:host` parameter should not be set for `unix://` connections.\n" +
94
97
  "When supplying a `unix://` URI, it should start with `unix:/` or `unix:///`."
95
98
  elsif !@data[:socket]
@@ -478,6 +481,11 @@ module Excon
478
481
  @_excon_sockets ||= {}
479
482
  @_excon_sockets.compare_by_identity
480
483
 
484
+ if @pid != Process.pid
485
+ @_excon_sockets.clear # GC will take care of closing sockets
486
+ @pid = Process.pid
487
+ end
488
+
481
489
  if @data[:thread_safe_sockets]
482
490
  # In a multi-threaded world, if the same connection is used by multiple
483
491
  # threads at the same time to connect to the same destination, they may
@@ -577,6 +585,8 @@ module Excon
577
585
  raise ArgumentError, "The `:ssl_proxy_headers` parameter should only be used with HTTPS requests."
578
586
  end
579
587
  if @data[:proxy][:scheme] == UNIX
588
+ # URI.parse might return empty string for security reasons.
589
+ @data[:proxy][:host] = nil if @data[:proxy][:host] == ""
580
590
  if @data[:proxy][:host]
581
591
  raise ArgumentError, "The `:host` parameter should not be set for `unix://` proxies.\n" +
582
592
  "When supplying a `unix://` URI, it should start with `unix:/` or `unix:///`."
@@ -72,6 +72,8 @@ module Excon
72
72
  :client_key_pass,
73
73
  :client_cert,
74
74
  :client_cert_data,
75
+ :client_chain,
76
+ :client_chain_data,
75
77
  :certificate,
76
78
  :certificate_path,
77
79
  :disable_proxy,
@@ -20,15 +20,24 @@ module Excon
20
20
  def host
21
21
  @data[:host]
22
22
  end
23
+ def scheme
24
+ @data[:scheme]
25
+ end
23
26
  def local_address
24
27
  @data[:local_address]
25
28
  end
26
29
  def local_port
27
30
  @data[:local_port]
28
31
  end
32
+ def http_method # can't be named "method"
33
+ @data[:method]
34
+ end
29
35
  def path
30
36
  @data[:path]
31
37
  end
38
+ def query
39
+ @data[:query]
40
+ end
32
41
  def port
33
42
  @data[:port]
34
43
  end
@@ -72,9 +81,13 @@ module Excon
72
81
  :body => String.new,
73
82
  :cookies => [],
74
83
  :host => datum[:host],
84
+ :scheme => datum[:scheme],
85
+ :method => datum[:method],
75
86
  :headers => Excon::Headers.new,
76
87
  :path => datum[:path],
88
+ :query => datum[:query],
77
89
  :port => datum[:port],
90
+ :omit_default_port => datum[:omit_default_port],
78
91
  :status => status,
79
92
  :status_line => line,
80
93
  :reason_phrase => reason_phrase
data/lib/excon/socket.rb CHANGED
@@ -40,12 +40,14 @@ module Excon
40
40
 
41
41
  def_delegators(:@socket, :close)
42
42
 
43
+
43
44
  def initialize(data = {})
44
45
  @data = data
45
46
  @nonblock = data[:nonblock]
46
47
  @port ||= @data[:port] || 80
47
48
  @read_buffer = String.new
48
49
  @eof = false
50
+ @backend_eof = false
49
51
  connect
50
52
  end
51
53
 
@@ -61,9 +63,22 @@ module Excon
61
63
 
62
64
  def readline
63
65
  if @nonblock && RUBY_VERSION.to_f > 1.8_7
64
- buffer = String.new
65
- buffer << (read_nonblock(1) || raise(EOFError)) while buffer[-1] != "\n"
66
- buffer
66
+ result = String.new
67
+ block = @read_buffer
68
+ @read_buffer = String.new
69
+
70
+ loop do
71
+ idx = block.index("\n")
72
+ if idx.nil?
73
+ result << block
74
+ else
75
+ result << block.slice!(0, idx+1)
76
+ add_to_read_buffer(block)
77
+ break
78
+ end
79
+ block = read_nonblock(@data[:chunk_size]) || raise(EOFError)
80
+ end
81
+ result
67
82
  else # nonblock/legacy
68
83
  begin
69
84
  Timeout.timeout(@data[:read_timeout]) do
@@ -172,20 +187,27 @@ module Excon
172
187
  end
173
188
  end
174
189
 
190
+ def add_to_read_buffer(str)
191
+ @read_buffer << str
192
+ @eof = false
193
+ end
194
+
175
195
  def read_nonblock(max_length)
176
196
  begin
177
197
  if max_length
178
- until @read_buffer.length >= max_length
198
+ until @backend_eof || @read_buffer.length >= max_length
179
199
  @read_buffer << @socket.read_nonblock(max_length - @read_buffer.length)
180
200
  end
181
201
  else
182
- loop do
202
+ while !@backend_eof
183
203
  @read_buffer << @socket.read_nonblock(@data[:chunk_size])
184
204
  end
185
205
  end
186
206
  rescue OpenSSL::SSL::SSLError => error
187
207
  if error.message == 'read would block'
188
- select_with_timeout(@socket, :read) && retry
208
+ if @read_buffer.empty?
209
+ select_with_timeout(@socket, :read) && retry
210
+ end
189
211
  else
190
212
  raise(error)
191
213
  end
@@ -195,10 +217,10 @@ module Excon
195
217
  select_with_timeout(@socket, :read) && retry
196
218
  end
197
219
  rescue EOFError
198
- @eof = true
220
+ @backend_eof = true
199
221
  end
200
222
 
201
- if max_length
223
+ ret = if max_length
202
224
  if @read_buffer.empty?
203
225
  nil # EOF met at beginning
204
226
  else
@@ -208,6 +230,8 @@ module Excon
208
230
  # read until EOFError, so return everything
209
231
  @read_buffer.slice!(0, @read_buffer.length)
210
232
  end
233
+ @eof = @backend_eof && @read_buffer.empty?
234
+ ret
211
235
  end
212
236
 
213
237
  def read_block(max_length)
@@ -219,9 +243,7 @@ module Excon
219
243
  raise(error)
220
244
  end
221
245
  rescue *READ_RETRY_EXCEPTION_CLASSES
222
- if @read_buffer.empty?
223
- select_with_timeout(@socket, :read) && retry
224
- end
246
+ select_with_timeout(@socket, :read) && retry
225
247
  rescue EOFError
226
248
  @eof = true
227
249
  end
@@ -90,6 +90,14 @@ module Excon
90
90
  else
91
91
  ssl_context.key = OpenSSL::PKey::RSA.new(client_key_data, client_key_pass)
92
92
  end
93
+ if client_chain_data && OpenSSL::X509::Certificate.respond_to?(:load)
94
+ ssl_context.extra_chain_cert = OpenSSL::X509::Certificate.load(client_chain_data)
95
+ elsif client_chain_data
96
+ certs = client_chain_data.scan(/-----BEGIN CERTIFICATE-----(?:.|\n)+?-----END CERTIFICATE-----/)
97
+ ssl_context.extra_chain_cert = certs.map do |cert|
98
+ OpenSSL::X509::Certificate.new(cert)
99
+ end
100
+ end
93
101
  elsif @data.key?(:certificate) && @data.key?(:private_key)
94
102
  ssl_context.cert = OpenSSL::X509::Certificate.new(@data[:certificate])
95
103
  if OpenSSL::PKey.respond_to? :read
@@ -171,6 +179,14 @@ module Excon
171
179
  end
172
180
  end
173
181
 
182
+ def client_chain_data
183
+ @client_chain_data ||= if (ccd = @data[:client_chain_data])
184
+ ccd
185
+ elsif (path = @data[:client_chain])
186
+ File.read path
187
+ end
188
+ end
189
+
174
190
  def connect
175
191
  # backwards compatability for things lacking nonblock
176
192
  @nonblock = HAVE_NONBLOCK && @nonblock
data/lib/excon/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Excon
3
- VERSION = '0.93.1'
3
+ VERSION = '0.99.0'
4
4
  end
data/lib/excon.rb CHANGED
@@ -198,8 +198,13 @@ module Excon
198
198
  headers_match = !stub.has_key?(:headers) || stub[:headers].keys.all? do |key|
199
199
  case value = stub[:headers][key]
200
200
  when Regexp
201
- if (match = value.match(request_params[:headers][key]))
202
- captures[:headers][key] = match.captures
201
+ case request_params[:headers][key]
202
+ when String
203
+ if (match = value.match(request_params[:headers][key]))
204
+ captures[:headers][key] = match.captures
205
+ end
206
+ when Regexp # for unstub on regex params
207
+ match = (value == request_params[:headers][key])
203
208
  end
204
209
  match
205
210
  else
@@ -209,8 +214,13 @@ module Excon
209
214
  non_headers_match = (stub.keys - [:headers]).all? do |key|
210
215
  case value = stub[key]
211
216
  when Regexp
212
- if (match = value.match(request_params[key]))
213
- captures[key] = match.captures
217
+ case request_params[key]
218
+ when String
219
+ if (match = value.match(request_params[key]))
220
+ captures[key] = match.captures
221
+ end
222
+ when Regexp # for unstub on regex params
223
+ match = (value == request_params[key])
214
224
  end
215
225
  match
216
226
  else
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.93.1
4
+ version: 0.99.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - dpiddy (Dan Peterson)
8
8
  - geemus (Wesley Beary)
9
9
  - nextmat (Matt Sanders)
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-10-20 00:00:00.000000000 Z
13
+ date: 2023-02-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -96,20 +96,6 @@ dependencies:
96
96
  - - ">="
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
- - !ruby/object:Gem::Dependency
100
- name: rdoc
101
- requirement: !ruby/object:Gem::Requirement
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- version: '0'
106
- type: :development
107
- prerelease: false
108
- version_requirements: !ruby/object:Gem::Requirement
109
- requirements:
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- version: '0'
113
99
  - !ruby/object:Gem::Dependency
114
100
  name: shindo
115
101
  requirement: !ruby/object:Gem::Requirement
@@ -249,7 +235,7 @@ metadata:
249
235
  documentation_uri: https://github.com/excon/excon/blob/master/README.md
250
236
  source_code_uri: https://github.com/excon/excon
251
237
  wiki_uri: https://github.com/excon/excon/wiki
252
- post_install_message:
238
+ post_install_message:
253
239
  rdoc_options:
254
240
  - "--charset=UTF-8"
255
241
  require_paths:
@@ -265,8 +251,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
265
251
  - !ruby/object:Gem::Version
266
252
  version: '0'
267
253
  requirements: []
268
- rubygems_version: 3.3.5
269
- signing_key:
254
+ rubygems_version: 3.4.1
255
+ signing_key:
270
256
  specification_version: 4
271
257
  summary: speed, persistence, http(s)
272
258
  test_files: []