Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ok_http] Add support for client certificates using Java PrivateKeys #1444

Merged
merged 49 commits into from
Jan 29, 2025

Conversation

brianquinlan
Copy link
Collaborator

@brianquinlan brianquinlan commented Jan 9, 2025

The tests don't currently pass for two reasons:

  1. there are intermittent time issues starting the flutter tests
  2. the certificates specify an algorithm not supported on the emulator

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

@brianquinlan brianquinlan changed the title Okhttp tls [ok_http] Add support for client certificates using Java PrivateKeys Jan 27, 2025
Copy link

github-actions bot commented Jan 27, 2025

PR Health

Breaking changes ⚠️
Package Change Current Version New Version Needed Version Looking good?
cronet_http Non-Breaking 1.3.2 1.3.3-wip 1.4.0
Got "1.3.3-wip" expected >= "1.4.0" (non-breaking changes)
⚠️
ok_http Non-Breaking 0.1.0 0.1.1-wip 0.1.1 ✔️

This check can be disabled by tagging the PR with skip-breaking-check.

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

Coverage ⚠️
File Coverage
pkgs/ok_http/example/integration_test/certificate_test.dart 💔 Not covered
pkgs/ok_http/example/integration_test/client_test.dart 💔 Not covered
pkgs/ok_http/lib/ok_http.dart 💔 Not covered
pkgs/ok_http/lib/src/jni/bindings.dart 💔 Not covered
pkgs/ok_http/lib/src/ok_http_client.dart 💔 Not covered
pkgs/ok_http/lib/src/ok_http_web_socket.dart 💔 Not covered

This check for test coverage is informational (issues shown here will not fail the PR).

This check can be disabled by tagging the PR with skip-coverage-check.

API leaks ⚠️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbols
ok_http $Certificate$NullableType
$Certificate$Type
PublicKey
$PublicKey$NullableType
$PublicKey$Type
$PublicKey
$X509Certificate$NullableType
$X509Certificate$Type
$PrivateKey$NullableType
$PrivateKey$Type
$PrivateKey

This check can be disabled by tagging the PR with skip-leaking-check.

License Headers ✔️
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/http/example/main.dart
pkgs/http_client_conformance_tests/example/client_test.dart
pkgs/http_client_conformance_tests/lib/src/dummy_isolate.dart
pkgs/http_parser/test/example_test.dart
pkgs/http_profile/lib/http_profile.dart
pkgs/web_socket/example/web_socket_example.dart
pkgs/web_socket/lib/testing.dart
pkgs/web_socket_conformance_tests/example/client_test.dart

@github-actions github-actions bot added the type-infra A repository infrastructure change or enhancement label Jan 28, 2025
Copy link
Member

@HosseinYousefi HosseinYousefi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with two small comments.

}

// TODO: Add `isA` type checks when
// https://github.com/dart-lang/native/pull/1943 is released.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is merged!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it's not released yet, I can release a version tomorrow.

pkgs/ok_http/lib/src/ok_http_client.dart Outdated Show resolved Hide resolved
@brianquinlan brianquinlan merged commit c7cc4f8 into dart-lang:master Jan 29, 2025
37 of 41 checks passed
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Feb 5, 2025
…eb_socket_channel, webdev, webdriver

Revisions updated by `dart tools/rev_sdk_deps.dart`.

core (https://github.com/dart-lang/core/compare/3b35aca..2458e1a):
  2458e1aa  2025-01-28  Vladimir E. Koltunov  [fix,async] exception in async _CancelOnErrorSubscriptionWrapper.onError (dart-lang/core#855)

ecosystem (https://github.com/dart-lang/ecosystem/compare/c4a163a..5b0d815):
  5b0d815  2025-02-03  dependabot[bot]  Bump the github-actions group with 6 updates (dart-lang/ecosystem#340)

http (https://github.com/dart-lang/http/compare/6d99ff5..c7cc4f8):
  c7cc4f8  2025-01-29  Brian Quinlan  [ok_http] Add support for client certificates using Java `PrivateKey`s (dart-lang/http#1444)

markdown (https://github.com/dart-lang/markdown/compare/19aaded..62f78c6):
  62f78c6  2025-02-01  dependabot[bot]  Bump actions/stale from 9.0.0 to 9.1.0 in the github-actions group (dart-lang/markdown#635)

test (https://github.com/dart-lang/test/compare/92eed6c..2ccfc5c):
  2ccfc5cd  2025-02-01  dependabot[bot]  Bump the github-actions group with 3 updates (dart-lang/test#2455)
  d8ee364a  2025-01-28  Lasse R.H. Nielsen  Release fake_async v1.3.3 (dart-lang/test#2453)
  385c4f75  2025-01-28  Lasse R.H. Nielsen  Remove "-wip" from CHANGELOG.md too.
  82417ab3  2025-01-27  Lasse R.H. Nielsen  Release fake_async v1.3.3

vector_math (https://github.com/google/vector_math.dart/compare/bd4b574..533c513):
  533c513  2025-02-01  dependabot[bot]  Bump the github-actions group with 2 updates (google/vector_math.dart#339)

web (https://github.com/dart-lang/web/compare/fd3d988..c2d5f63):
  c2d5f63  2025-02-01  dependabot[bot]  Bump actions/stale from 9.0.0 to 9.1.0 in the github-actions group (dart-lang/web#338)

web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/a937243..f335e52):
  f335e52  2025-02-01  dependabot[bot]  Bump actions/stale from 9.0.0 to 9.1.0 in the github-actions group (dart-lang/web_socket_channel#391)

webdev (https://github.com/dart-lang/webdev/compare/5dc7950..616da45):
  616da455  2025-01-30  Srujan Gaddam  [dwds] Implement hot reload and publish 24.3.4 (dart-lang/webdev#2583)
  a7ea61ff  2025-01-28  Jessy Yameogo  Added support for getModuleLibraries with the DDC library bundle format  (dart-lang/webdev#2581)

webdriver (https://github.com/google/webdriver.dart/compare/d83d6a3..e84e9cc):
  e84e9cc  2025-01-28  Ivan Inozemtsev  Explicitly close http clients (google/webdriver.dart#311)

Change-Id: I0c7fc6c3d0ae8f810c753babd9297d5f9565a0ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407940
Commit-Queue: Devon Carew <[email protected]>
Reviewed-by: Kevin Moore <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants