Commit Graph

2012 Commits

Author SHA1 Message Date
Jacob Hoffman-Andrews 08429bc04d Improve Debug impls for wrapped enums
SupportedKxGroup, SupportedCipherSuite, and EnabledVersions have derived
Debug implementations, but these implementations wind up being
excessively noisy. Instead, delegate their Debug implementations to
their underlying enums.
2022-05-15 17:50:09 +02:00
Jacob Hoffman-Andrews ae97eb7e79 impl Debug for WantsClientCert and WantsServerCert 2022-05-15 17:50:09 +02:00
Jacob Hoffman-Andrews 5f1cbaf522 Add Clone and Debug to more config states 2022-05-15 17:50:09 +02:00
Joseph Birr-Pixton 34ad3ab00e Prepare 0.20.5 2022-05-14 18:14:32 +01:00
Joseph Birr-Pixton a8d361c90a Deal with ServerHellos without any extensions 2022-05-14 18:01:33 +01:00
kdnakt 9da6446a84 Fix typos in comments 2022-05-14 17:34:23 +01:00
Dirkjan Ochtman 86f4695c8c Use original handshake encoding for transcript hash
Stores the parsed data for a handshake message payload alongside
the encoded version to avoid having to re-encode the message when
updating the transcript hash. Also avoids encoding outgoing handshake
message payloads twice.
2022-05-12 20:46:16 +02:00
randsoy 9b83dcfe71
[tls handshaked] fix:Interrupted system call (os error 4) (#1031)
Dynamically load the FFI Library of trust using flutter in Android system.  `Connection Failed: tls connection init failed: Interrupted system call (os error 4)`.
2022-05-12 11:28:47 +02:00
Jimmy Hartzell 093e88e7e1 remove extraneous trace 2022-05-07 07:49:24 +01:00
Jimmy Hartzell 014fce9040 Add support for IP addresses for dangerous clients only 2022-05-07 07:49:24 +01:00
dependabot[bot] a96c93c16d Update rustls-pemfile requirement from 0.3.0 to 1.0.0
Updates the requirements on [rustls-pemfile](https://github.com/rustls/pemfile) to permit the latest version.
- [Release notes](https://github.com/rustls/pemfile/releases)
- [Commits](https://github.com/rustls/pemfile/compare/v/0.3.0...v/1.0.0)

---
updated-dependencies:
- dependency-name: rustls-pemfile
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-15 07:44:55 +02:00
ComplexSpaces c42c53e13d Attach location context to corrupt message errors 2022-03-31 10:23:46 +02:00
Jerome Gravel-Niquet 9d1557e571 convert some panic! in tests with assert_eq! 2022-03-20 10:32:11 +00:00
Jerome Gravel-Niquet fbb870621e make cipher suites part of tests 2022-03-20 10:32:11 +00:00
Jerome Gravel-Niquet ff38717c5a remove supported_cipher_suites function, leave that to the crate user 2022-03-20 10:32:11 +00:00
Jerome Gravel-Niquet 9d12776f58 add trace log for cipher suites 2022-03-20 10:32:11 +00:00
Jerome Gravel-Niquet fa243fd137 add comments 2022-03-20 10:32:11 +00:00
Jerome Gravel-Niquet b0b61b1f30 expose cipher suites from ClientHello 2022-03-20 10:32:11 +00:00
Jerome Gravel-Niquet 3f5eee91f4 fix clippy nightly errors 2022-03-18 10:44:18 -07:00
Joseph Birr-Pixton 0a5c977634 Attempt to improve TicketAgeSkew test reliability 2022-03-13 21:04:58 +00:00
Joseph Birr-Pixton 003bd4e264 Fix server::ResolvesServerCertUsingSni case sensitivity
Extend testing to show this working.
2022-03-13 20:50:40 +00:00
Joseph Birr-Pixton b3e354b3dc Build everything each night
Goal: notice upstream breakages (like LLVM version) before unrelated
PRs run into them.
2022-02-20 20:06:06 +00:00
Joseph Birr-Pixton 9c1e0862f7 Avoid using error handling code for control flow
`require_handshake_msg` is designed to express message type
requirements: failures of those checks are expensive because
they involve logging output and allocations in the error value.

Introduce `is_handshake_msg` which does the same validation, but
just calculates a bool so is cheap.
2022-02-20 19:57:09 +00:00
Joseph Birr-Pixton 29b803022a Add test that observes log level usage 2022-02-20 19:57:09 +00:00
Joseph Birr-Pixton 8e5968f0a2 Prepare 0.20.4 2022-02-19 08:18:10 +00:00
Brian Smith 5ed9ebcc39 Only set QUIC state when the connection is QUIC. 2022-02-19 08:15:21 +00:00
Benjamin Saunders 9bdddf919c Don't expect EndOfEarlyData from QUIC 2022-02-19 08:14:59 +00:00
Brian Smith 71c902cd5e Use LLVM 14 for code coverage.
Rust Nightly recently upgraded to LLVM 14, and coverage jobs in CI
are currently broken. Fix them by upgrading to LLVM 14.
2022-02-19 08:15:08 +01:00
Joseph Birr-Pixton 5bda754ac1 Prepare 0.20.3 2022-02-13 14:59:33 +00:00
Joseph Birr-Pixton 1eddab6986 Support SEC1 keys in tlsclient & tlsserver 2022-02-13 14:54:41 +00:00
Joseph Birr-Pixton ec8a71b332 cargo fmt & cargo clippy fixes 2022-02-13 14:49:18 +00:00
Joseph Birr-Pixton 4c87c4af68 Reject malformed change_cipher_specs in TLS1.3 2022-02-13 14:29:48 +00:00
dependabot[bot] f8e7124536 Update rustls-pemfile requirement from 0.2.0 to 0.3.0
Updates the requirements on [rustls-pemfile](https://github.com/rustls/pemfile) to permit the latest version.
- [Release notes](https://github.com/rustls/pemfile/releases)
- [Commits](https://github.com/rustls/pemfile/compare/v/0.2.0...v/0.3.0)

---
updated-dependencies:
- dependency-name: rustls-pemfile
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-07 09:38:38 +01:00
Timon ab060f8c8b Move (most) release notes to one, single, seperate document. 2022-02-06 15:57:19 +00:00
Joseph Birr-Pixton 763d05e269 Test loading the expected signing key formats 2022-02-06 10:33:11 +00:00
Joseph Birr-Pixton 87f148a68d Support SEC1-format EC keys via PKCS8 conversion 2022-02-06 10:33:11 +00:00
Joseph Birr-Pixton f9a3d42bd7 test_server_mtu_reduction: fix test; opt in to half rtt 2022-02-05 16:10:44 +00:00
Joseph Birr-Pixton 184b5090c2 Require 0.5RTT server data to be explicitly enabled 2022-02-05 15:56:59 +00:00
hasheddan 837ccd7fca Change nor to and in docs about compression support in TLS versions
Updates the documentation on TLS vulnerabilities to specify that both
TLSv1.1 and TLSv1.2 offered support for compression.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2022-01-30 08:54:32 +01:00
Joseph Birr-Pixton 68f3fc9f2e Remove final openssl-using tests
These were:

- bugs::partial_chain: better tested in webpki, but also has never
  not worked and is the most common configuration of TLS servers.
- features::recv_low_mtu: can we as a client deal with a very
  fragmenty server?  New test test_server_mtu_reduction added.
- features::send_small_fragments bogo tests MaxSendFragment-* cover this
- features::send_sni: does the client send SNI?  Large numbers of sni
  tests in api.rs cover this, plus bogo   ServerNameExtensionClient-*
- features::do_not_send_sni: already covered by client_with_sni_disabled_does_not_send_sni
2022-01-29 16:21:07 +00:00
Brian Smith f97bb5aca1 Remove now-unused OpenSSL test utilities. 2022-01-27 23:13:58 +01:00
Brian Smith 881b7aed17 Remove resumption tests from rustls-mio/tests/features.rs.
The Bogo test suite tests resumption a lot more thoroughly, and these
seem to be redundant with it.

The resumption tests were the last to use `TlsServer`, so remove it.
2022-01-27 23:13:58 +01:00
Brian Smith e85d3cb762 Remove 1 second pause before running BadSSL tests.
The badssl tests attempt to do some rate limiting. But, it is assuming the tests
are executed serially. Actually, all the tests run concurrently, sleep
concurrently for 1 second, and then wake up and go at the same time. Thus, the
effect is basically just to slow down `cargo test` by 1 second.

I doubt the rate limiting would be useful if it worked, as badssl is probably
not getting a lot of traffic.
2022-01-27 23:13:04 +01:00
Brian Smith 0f770a94af Remove redundant rustls-mio/tests/errors.rs test.
These tests are redundant with Bogo tests like:

    "MinimumVersion-*-TLS11-TLS12-TLS":
    "MinimumVersion-*-TLS11-TLS13-TLS":
2022-01-27 21:37:07 +01:00
Brian Smith 20eb9a0678 Remove `client_auth_requested_but_unsupported` OpenSSL-based test.
PR #983 adds an integration test, which is measured by the coverage
tests, to replace this.
2022-01-27 21:36:15 +01:00
Brian Smith 0a6c94fd99 Remove remaining redundant client auth tests that use OpenSSL.
`client_auth_by_client` is covered by multiple Bogo tests, in
particular the RSA signature scheme tests for client authentication.

The scenerios in `client_auth_by_server_required` and
`client_auth_required_but_unsupported` is covered by the Bogo
`NoClientCertificate-*`, `RequireAnyClientCertificate-*`,
`SkipClientCertificate`, etc.

I retained `client_auth_requested_but_unsupported` because I didn't
see a Bogo test for it.
2022-01-27 21:36:15 +01:00
Brian Smith 477d3b79cd Remove redundant client auth signature algorithm tests.
Bogo tests all the signature algorithms for client auth already, both
in client and server. Bogo tests TLS 1.3 and TLS 1.2 individually, which
is an important improvement over the redundant tests.

Regarding Ed25519 specifically, BoringSSL doesn't enable it by default,
but it does still test it, e.g.:

```
    "Server-Verify-Ed25519-TLS12": {
      "actual": "PASS",
      "expected": "PASS",
      "is_unexpected": false
    },
    "Server-Verify-Ed25519-TLS13": {
       "actual": "PASS",
       "expected": "PASS",
       "is_unexpected": false
    },
```
2022-01-27 21:36:15 +01:00
Brian Smith 116e31157c Add tests for `Debug` implementations of assertions. 2022-01-27 20:05:32 +00:00
Brian Smith d71648e3b6 AllowAnyAuthenticatedClient: Remove redundant function.
The implementation of `client_auth_mandatory()` is redundant with the
default implementation. By removing this redundant implementation, we
add test coverage of the default implementation, which is currently
uncovered.
2022-01-27 20:04:39 +00:00
Brian Smith 3916e445de Add integration test for `AllowAnyAnonymousOrAuthenticatedClient`. 2022-01-27 20:02:28 +00:00