Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(680)

Issue 2297193006: Do a better job at faking simple challenge signatures. (Closed)

Created:
4 years, 3 months ago by The one and only Dr. Crash
Modified:
4 years, 3 months ago
Reviewers:
xiyuan, Darren Krahn
CC:
chromium-reviews, hashimoto+watch_chromium.org, oshima+watch_chromium.org, dkalin1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Do a better job at faking simple challenge signatures. By returning a signed simple challenge that can actually be parsed as SignedData, we allow callers of the FakeCryptohomeClient to extract the original data back and process it, making for better fake behavior and simpler tests. Note that the signature is purposedly not verifiable in the FakeCryptohomeClient. BUG=643245 TEST=chromeos_unittests; unit_tests and components_unittests also pass Committed: https://crrev.com/911199cb30f608636c79d47e50dca84735e3a08f Cr-Commit-Position: refs/heads/master@{#417118}

Patch Set 1 #

Patch Set 2 : Added test for chromeos_unittests. #

Patch Set 3 : Be a good modern C++ programmer and let go of const char*. #

Total comments: 2

Patch Set 4 : Better interface, more meaningful unit test. #

Patch Set 5 : Added the unit test I've been talking about... #

Patch Set 6 : Added missing attestation.proto file. #

Total comments: 7

Patch Set 7 : Adressed feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -46 lines) Patch
M chrome/browser/chromeos/BUILD.gn View 1 2 3 4 5 6 2 chunks +1 line, -1 line 0 comments Download
D chrome/browser/chromeos/attestation/attestation_signed_data.proto View 1 2 3 4 5 6 1 chunk +0 lines, -17 lines 0 comments Download
M chrome/browser/chromeos/attestation/platform_verification_flow.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chromeos/BUILD.gn View 1 2 3 4 5 6 5 chunks +12 lines, -0 lines 0 comments Download
M chromeos/chromeos.gyp View 1 2 3 4 5 6 3 chunks +16 lines, -0 lines 0 comments Download
M chromeos/dbus/fake_cryptohome_client.h View 1 2 3 1 chunk +11 lines, -5 lines 0 comments Download
M chromeos/dbus/fake_cryptohome_client.cc View 1 2 3 4 5 6 13 chunks +48 lines, -22 lines 0 comments Download
A chromeos/dbus/fake_cryptohome_client_unittest.cc View 1 2 3 4 5 6 1 chunk +76 lines, -0 lines 0 comments Download
A + chromeos/dbus/proto/attestation.proto View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 28 (15 generated)
The one and only Dr. Crash
4 years, 3 months ago (2016-09-02 04:39:07 UTC) #3
The one and only Dr. Crash
4 years, 3 months ago (2016-09-02 04:43:20 UTC) #4
Darren Krahn
https://codereview.chromium.org/2297193006/diff/40001/chromeos/dbus/fake_cryptohome_client.h File chromeos/dbus/fake_cryptohome_client.h (right): https://codereview.chromium.org/2297193006/diff/40001/chromeos/dbus/fake_cryptohome_client.h#newcode220 chromeos/dbus/fake_cryptohome_client.h:220: static const std::string kSignature; These constants can go in ...
4 years, 3 months ago (2016-09-02 17:32:12 UTC) #6
The one and only Dr. Crash
I put them in the .h so that the unit test could use them. What ...
4 years, 3 months ago (2016-09-02 21:47:47 UTC) #7
The one and only Dr. Crash
Looks much better. https://codereview.chromium.org/2297193006/diff/40001/chromeos/dbus/fake_cryptohome_client.h File chromeos/dbus/fake_cryptohome_client.h (right): https://codereview.chromium.org/2297193006/diff/40001/chromeos/dbus/fake_cryptohome_client.h#newcode220 chromeos/dbus/fake_cryptohome_client.h:220: static const std::string kSignature; On 2016/09/02 ...
4 years, 3 months ago (2016-09-03 01:17:37 UTC) #8
xiyuan
lgtm https://codereview.chromium.org/2297193006/diff/100001/chromeos/dbus/fake_cryptohome_client.cc File chromeos/dbus/fake_cryptohome_client.cc (right): https://codereview.chromium.org/2297193006/diff/100001/chromeos/dbus/fake_cryptohome_client.cc#newcode30 chromeos/dbus/fake_cryptohome_client.cc:30: const char kTwentyBytesNonce[] = "+addtwentybytesnonce"; nit: const -> ...
4 years, 3 months ago (2016-09-06 22:32:32 UTC) #17
The one and only Dr. Crash
Darren, do you have any opinion about the move of attestation.proto? In a way, I ...
4 years, 3 months ago (2016-09-07 02:43:47 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2297193006/120001
4 years, 3 months ago (2016-09-07 22:17:48 UTC) #21
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 3 months ago (2016-09-07 23:43:31 UTC) #23
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/911199cb30f608636c79d47e50dca84735e3a08f Cr-Commit-Position: refs/heads/master@{#417118}
4 years, 3 months ago (2016-09-07 23:45:53 UTC) #25
achuithb
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/2326473002/ by achuith@chromium.org. ...
4 years, 3 months ago (2016-09-08 09:50:08 UTC) #26
Darren Krahn
On 2016/09/07 02:43:47, The one and only Dr. Crash wrote: > Darren, do you have ...
4 years, 3 months ago (2016-09-08 22:45:18 UTC) #27
The one and only Dr. Crash
4 years, 3 months ago (2016-09-08 22:51:55 UTC) #28
Message was sent while issue was closed.
> Sorry for the delay -- FWIW, I don't feel strongly...

Let's leave it in dbus/ for now, and maybe consolidate a bunch of
attestation stuff later on so it can be shared between Chromium and
Chromium OS. Protos and .h derived from copying info from protos are out of
sync again as work on attestationd is progressing. I asked Andrey to file a
tracking bug for that.

On Thu, Sep 8, 2016 at 3:45 PM, <dkrahn@chromium.org> wrote:

> On 2016/09/07 02:43:47, The one and only Dr. Crash wrote:
> > Darren, do you have any opinion about the move of attestation.proto? In
> a way,
> I
> > think it could belong in the attestation/ directory (even though none of
> the
> > code in there depends on it) just as a "neutral ground" for that proto
> > definition. But the dbus location is fine too, and flows well
> dependencies-wise.
>
> Sorry for the delay -- FWIW, I don't feel strongly...
>
> >
> >
> https://codereview.chromium.org/2297193006/diff/100001/
> chromeos/dbus/fake_cryptohome_client.cc
> > File chromeos/dbus/fake_cryptohome_client.cc (right):
> >
> >
> https://codereview.chromium.org/2297193006/diff/100001/
> chromeos/dbus/fake_cryptohome_client.cc#newcode33
> > chromeos/dbus/fake_cryptohome_client.cc:33: }
> > On 2016/09/06 22:32:32, xiyuan wrote:
> > > nit: append "// namespace" after the closing }
> >
> > Done.
> >
> >
> https://codereview.chromium.org/2297193006/diff/100001/
> chromeos/dbus/fake_cryptohome_client_unittest.cc
> > File chromeos/dbus/fake_cryptohome_client_unittest.cc (right):
> >
> >
> https://codereview.chromium.org/2297193006/diff/100001/
> chromeos/dbus/fake_cryptohome_client_unittest.cc#newcode36
> > chromeos/dbus/fake_cryptohome_client_unittest.cc:36: void Run() {
> > On 2016/09/06 22:32:32, xiyuan wrote:
> > > nit: We probably can get rid of this method and just do
> > > base::RunLoop().RunUntilIdle(); where this method is called,
> > >
> > >
> > > e.g.
> > > https://cs.chromium.org/chromium/src/dbus/bus_unittest.cc?rcl=0&l=341
> >
> > Sure.
> >
> >
> https://codereview.chromium.org/2297193006/diff/100001/
> chromeos/dbus/proto/attestation.proto
> > File chromeos/dbus/proto/attestation.proto (right):
> >
> >
> https://codereview.chromium.org/2297193006/diff/100001/
> chromeos/dbus/proto/attestation.proto#newcode1
> > chromeos/dbus/proto/attestation.proto:1: // Copyright (c) 2012 The
> Chromium
> > Authors. All rights reserved.
> > On 2016/09/06 22:32:32, xiyuan wrote:
> > > nit: Is this a new file? If so, we should do
> > >
> > > // Copyright 2016 The Chromium Authors. All rights reserved.
> >
> > I moved it from some other location so it's not new (though initially
> mine was
> > new,so it is confusing I am sure).
>
>
>
> https://codereview.chromium.org/2297193006/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698