New issue
Advanced search Search tips

Issue 888020 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 31
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 827531



Sign in to add a comment

Tests using HTTPS embedded test server fail when running network service OOP on Android

Project Member Reported by cduvall@chromium.org, Sep 21

Issue description

All the tests using EmbeddedTestServer.createAndStartHTTPSServer fail with NS enabled OOP for some reason. These same tests pass when using NetworkServiceInProcess.

This could be a test only issue or something bigger with HTTPS.
 
Components: Internals>Network>Certificate
Owner: eroman@chromium.org
Status: Assigned (was: Available)
This looks like it is just a test setup problem.

EmbeddedTestServer uses a self-signed certificate for the localhost server, which it installs as a trust root [1] in the current process.

When the network service runs out of process, its trust store does not contain the test certificate so the HTTPS requests fail due to certificate errors.

We can either forward the test certificate to the network service process, or use a mock certificate verification.

[1] https://chromium.googlesource.com/chromium/src/+/257312a525f9b7dadc54e5607753ce05d0e7cd39/net/test/android/javatests/src/org/chromium/net/test/EmbeddedTestServer.java#170
Thanks for the pointer!
Labels: -Pri-1 -Proj-Servicification-Canary Pri-2
This is test-only, so not canary blocking.
Owner: cduvall@chromium.org
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/09928a3d8a901d72298ded4f8206c325bcbbf637

commit 09928a3d8a901d72298ded4f8206c325bcbbf637
Author: Clark DuVall <cduvall@chromium.org>
Date: Wed Oct 31 01:43:04 2018

Fix HTTPS embedded test server with network service on Android

When running tests with network service enabled, we need to
initialize NetworkServiceTestHelper to register test certs
and perform other setup in the network process. This does the
necessary setup for Android, similar to what is alredy being
done for desktop here:
https://cs.chromium.org/chromium/src/chrome/test/base/chrome_test_launcher.cc?l=167&rcl=024b72104d153da4c609c19d09facb8bd48632b6

Bug:  888020 
Change-Id: I7016c42ff59169eb4f32b8531a83266b120a65fe
Reviewed-on: https://chromium-review.googlesource.com/c/1306665
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604106}
[modify] https://crrev.com/09928a3d8a901d72298ded4f8206c325bcbbf637/chrome/android/BUILD.gn
[modify] https://crrev.com/09928a3d8a901d72298ded4f8206c325bcbbf637/chrome/browser/android/DEPS
[modify] https://crrev.com/09928a3d8a901d72298ded4f8206c325bcbbf637/chrome/browser/android/chrome_entry_point_for_test.cc
[modify] https://crrev.com/09928a3d8a901d72298ded4f8206c325bcbbf637/testing/buildbot/filters/mojo.fyi.network_chrome_public_test_apk.filter

Status: Fixed (was: Assigned)

Sign in to add a comment