Commit ae70ba5e authored by Tsuyoshi Horo's avatar Tsuyoshi Horo Committed by Commit Bot

Use ERR_INVALID_SIGNED_EXCHANGE for Signed Exchange OCSP failure

To distinguish the signed exchange error from network layer errors.

Bug: 815024
Change-Id: I165b8d44938575c2c5092c4f0012c1f58122ba79
Reviewed-on: https://chromium-review.googlesource.com/1073182Reviewed-by: default avatarKunihiko Sakamoto <ksakamoto@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561816}
parent 2d10a8a7
......@@ -369,7 +369,7 @@ void SignedExchangeHandler::OnCertVerifyComplete(int result) {
"OCSP check failed. response status: %d, revocation status: %d",
cert_verify_result_.ocsp_result.response_status,
cert_verify_result_.ocsp_result.revocation_status));
RunErrorCallback(static_cast<net::Error>(net::ERR_FAILED));
RunErrorCallback(net::ERR_INVALID_SIGNED_EXCHANGE);
return;
}
......
......@@ -458,7 +458,7 @@ TEST_P(SignedExchangeHandlerB1Test, OCSPNotChecked) {
WaitForHeader();
ASSERT_TRUE(read_header());
EXPECT_EQ(net::ERR_FAILED, error());
EXPECT_EQ(net::ERR_INVALID_SIGNED_EXCHANGE, error());
// Drain the MockSourceStream, otherwise its destructer causes DCHECK failure.
ReadStream(source_, nullptr);
}
......@@ -488,7 +488,7 @@ TEST_P(SignedExchangeHandlerB1Test, OCSPNotProvided) {
WaitForHeader();
ASSERT_TRUE(read_header());
EXPECT_EQ(net::ERR_FAILED, error());
EXPECT_EQ(net::ERR_INVALID_SIGNED_EXCHANGE, error());
// Drain the MockSourceStream, otherwise its destructer causes DCHECK failure.
ReadStream(source_, nullptr);
}
......@@ -519,7 +519,7 @@ TEST_P(SignedExchangeHandlerB1Test, OCSPInvalid) {
WaitForHeader();
ASSERT_TRUE(read_header());
EXPECT_EQ(net::ERR_FAILED, error());
EXPECT_EQ(net::ERR_INVALID_SIGNED_EXCHANGE, error());
// Drain the MockSourceStream, otherwise its destructer causes DCHECK failure.
ReadStream(source_, nullptr);
}
......@@ -551,7 +551,7 @@ TEST_P(SignedExchangeHandlerB1Test, OCSPRevoked) {
WaitForHeader();
ASSERT_TRUE(read_header());
EXPECT_EQ(net::ERR_FAILED, error());
EXPECT_EQ(net::ERR_INVALID_SIGNED_EXCHANGE, error());
// Drain the MockSourceStream, otherwise its destructer causes DCHECK failure.
ReadStream(source_, nullptr);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment