1
0
mirror of https://github.com/square/okhttp.git synced 2025-11-23 06:42:24 +03:00
Commit Graph

144 Commits

Author SHA1 Message Date
Yuri Schimke
95cb15ab4d Disable javadoc (#8025) 2023-09-16 10:38:35 +01:00
Yuri Schimke
248b0e6318 Update Release version (#7792) 2023-05-01 11:27:57 +01:00
Yuri Schimke
f408411ff9 Avoid exposing internal methods (#7734) 2023-04-23 08:05:59 +01:00
Jesse Wilson
4d1f8add89 Confirm we send SNI server names on the JDK9 Platform (#7597)
This introduces a new API in MockWebServer's RecordedRequest to
capture the inbound server names.

Co-authored-by: Yuri Schimke <yuri@schimke.ee>
2023-01-04 07:59:45 +10:00
Jesse Wilson
847b5af240 Avoid InetAddress.getCanonicalHostName(). (#7607)
Just hard-coding 'localhost' is simpler and avoids problems where
the host machine's IP address has additional DNS registrations.

Closes: https://github.com/square/okhttp/issues/7603
2023-01-02 09:04:37 -05:00
Jesse Wilson
fe6db78647 Get more TLS stuff passing on BouncyCastle (#7602)
There's something up with ECDSA on BouncyCastle, and rather
than figuring it out I've just switched to RSA signatures
with that provider.
2022-12-31 20:39:55 -05:00
Yuri Schimke
58ee1ce170 Revert downgrade to 1.4 for gradle reasons (#7391)
* Revert "Downgrade to kotlin apiVersion 1.4 (#7267)"
* Revert "Improve runtime compatibility with kotlin 1.5.31 (#7343)"
* Revert "Remove usage of toDuration() (#7329)"
2022-07-25 17:57:09 +01:00
Jesse Wilson
e9a3ad3d94 4.10.0 is out 2022-06-12 10:09:53 -04:00
Yuri Schimke
6ad9fb12b6 Downgrade to kotlin apiVersion 1.4 (#7267)
* Test against kotlin 1.4

* Compile down to Kotlin 1.4

* Fix to use the invariant locale for lowercase

* Fix to use the invariant locale for lowercase
2022-06-08 10:44:30 -04:00
Jesse Wilson
bdc213f180 Remove japicmp (#7118)
This plugin served us very well for a long time. But the binary
compatibility plugin is better suited for our current situation.
2022-02-27 10:20:06 -05:00
Jesse Wilson
3e16ec28fe Adopt Kotlin's binary compatibility validator (#7112) 2022-02-26 14:17:33 -05:00
Yuri Schimke
362f53546d Adopt Version Catalog and Updates plugin (#7075) 2022-02-15 23:38:32 +00:00
Goooler
f5758b7f26 Enable Gradle's type-safe project accessors (#7069) 2022-02-08 20:01:28 +00:00
Jesse Wilson
c30d9ad14b Convert more tests to Kotlin (#6980) 2022-01-05 00:20:25 -05:00
Goooler
8debc78b00 Simplify gradle kts (#6931) 2021-11-27 12:31:27 +00:00
Jesse Wilson
d9a65a85c5 Switch to Vanniktech for Maven publishing (#6929)
* Switch to Vanniktech for Maven publishing

Steal configuration from Okio, which already works nicely.

* Update mockwebserver-junit5/build.gradle.kts

Co-authored-by: Benoît Quenaudon <bquenaudon@squareup.com>

Co-authored-by: Benoît Quenaudon <bquenaudon@squareup.com>
2021-11-26 06:58:00 -05:00
Goooler
d0759a7907 Simplify kts (#6926)
* Simplify kts

* Use extensions

* Use extensions

* Simplify kts
2021-11-25 19:41:08 -05:00
Goooler
3417fd0e78 Update README files to 4.9.3 (#6927) 2021-11-24 09:34:33 -05:00
Jesse Wilson
35bb1740a4 Convert the main build.gradle file to KTS (#6925)
I attempted to do a literal translation as much as possible.
Subprojects now need plugins to be configured directly so they
can use the appropriate syntax.
2021-11-24 07:19:39 +00:00
Jesse Wilson
a87f4b4585 Changelog for OkHttp 4.9.2 2021-09-30 21:13:35 -04:00
Goooler
e1af67f082 Declare types & Cleanup (#6842)
* Declare types

* Code cleanup

* Declare types
2021-08-30 23:32:43 -04:00
Goooler
e016350e5a Convert module gradle builds files to kts (#6830) 2021-08-12 08:36:23 +01:00
Goooler
8e8c2a6037 Code cleanup (#6831) 2021-08-12 08:26:27 +01:00
Goooler
90f8a7d26f Refactor applyOsgi & baselineJar to kotlin (#6823) 2021-08-12 07:52:29 +01:00
Goooler
cc3ce11fc4 Code cleanup and imports (#6822) 2021-08-03 14:52:10 +03:00
Goooler
b668b75f11 Replace deprecated methods (#6776) 2021-07-29 10:08:34 +03:00
Goooler
7f4b97e8a4 Update docs to use https (#6642) 2021-04-22 08:30:57 +01:00
Yuri Schimke
690cfa9b43 Fix animal sniffer build (#6635) 2021-04-15 08:41:10 +01:00
Goooler
ef5d0c83f7 Update README files to 4.9.1 (#6617) 2021-04-10 07:42:40 +01:00
Yuri Schimke
b607bb0aa8 Partial move to gradle kotlin (#6532) 2021-02-06 14:57:47 +00:00
Yuri Schimke
168cbffb6e Fail on unencodable keys (#6468) 2020-12-28 20:46:01 -05:00
Yuri Schimke
ec1d18d143 Quick Android Test Fixes (#6428) 2020-11-21 09:50:01 +00:00
Yuri Schimke
d1cf4944f2 Junit import fail (#6429)
* Missed some imports

* Missed some imports

* Missed some imports
2020-11-19 21:23:18 -05:00
Yuri Schimke
25814afb80 Move tls tests to Junit 5 (#6372) 2020-11-01 09:12:12 -05:00
Jesse Wilson
59ae0c138d Convert more tests to JUnit 5 (#6366) 2020-11-01 05:46:35 +00:00
Simon Wimmesberger
b4d66af1da Publish OSGi metadata for OkHttp 2020-10-06 22:40:28 -04:00
Jesse Wilson
c13cabdba6 Fix docs on privateKeyPkcs8Pem() to not require RSA (#6306)
PKCS #1 is RSA-only
PKCS #8 is any key
2020-10-05 11:54:27 -04:00
Jesse Wilson
cbeaf8f955 Prepare for release 4.9.0. 2020-09-11 17:08:20 -04:00
Jesse Wilson
96a2118dd4 Release OkHttp 4.8.1. 2020-08-06 10:07:13 -04:00
Jesse Wilson
b1963bf8d8 Implement DER constraints on date formats (#6213)
The time zone must be 'Z', and cannot be an offset like '+0000'. That
is allowed by ASN.1 but not by DER.

Closes: https://github.com/square/okhttp/issues/6210
2020-08-05 19:50:44 -04:00
Yuri Schimke
d2c5a74def Allow missing SAN in certificates (#6186) 2020-07-16 06:34:27 -04:00
Jesse Wilson
6aae409a3e Don't install the Bouncy Castle provider in HeldCertificate (#6183)
This potentially changes behavior for applications requiring security
features that are available in Bouncy Castle but not the platform. To
mitigate this, execute this before such operations:

    Security.addProvider(BouncyCastleProvider())

You will also need to configure this dependency:

    implementation "org.bouncycastle:bcprov-jdk15on:1.65"
2020-07-12 11:59:51 -04:00
Jesse Wilson
548f601f69 Fix some issues discovered by simple fuzzing (#6181)
We were throwing IllegalArgumentException or ParseException but
want to throw only ProtocolException or EOFException.
2020-07-11 20:03:35 -04:00
Jesse Wilson
a70e992c3f Prepare for release 4.8.0. 2020-07-11 14:01:06 -04:00
Jesse Wilson
cf367d9339 Add defensive checks for malformed ASN.1 DER (#6180)
If the date is before 1950-01-01, use a four-digit year

If the self-delimiting object identifer exceeds the enclosing object's
size, fail.

If a nested object exceeds its enclosing object's size, fail.
2020-07-11 10:38:11 -04:00
Jesse Wilson
c4cbb57a46 Don't crash on unknown GeneralName types. (#6170)
We don't have API support for all of them, but we shouldn't crash when an
unsupported name is encountered.

Also encode attributes using UTF-8, not PrintableString. Both are permitted,
but UTF-8 supports more data.
2020-07-06 09:38:00 +01:00
Jesse Wilson
19e9a8ffd3 Drop support for indefinite length in DER (#6166)
This is a feature of ASN.1 that DER doesn't use, and in fact it forbids.
2020-07-05 08:12:29 +01:00
cketti
c04b57edac Add limits to what length values DerReader supports (#6164)
* Add limits to what length values DerReader supports

With this change DerReader doesn't support reading values with a length
greater than Long.MAX_VALUE. That shouldn't be a problem in practice.

* Make DerReader check length is encoded in shortest form possible

* Spotless and IntelliJ disagree on import order

Co-authored-by: Jesse Wilson <jesse@swank.ca>
2020-07-03 08:47:25 -04:00
Jesse Wilson
353a52b970 Improve code style for the new DER package (#6157)
Improve docs, fix some names, fix some internal APIs.
2020-06-30 06:14:49 +01:00
Jesse Wilson
45df82e15b Honor RFC 5280 when choosing a time format (#6154)
We switch to 4-digit years at the last possible moment.
2020-06-29 10:11:13 -04:00