Commit 4f500dae authored by Jorge Lucangeli Obes's avatar Jorge Lucangeli Obes Committed by chrome-bot
Browse files

Add SecureBlob::HexStringToSecureBlob.

Polymorphic usage of SecureBlob is problematic (see crbug.com/728047).
In some cases we're unnecessarily passing plain Blobs into functions
that take SecureBlobs because we don't have code to create a SecureBlob
from a hex string, so we use base::HexStringToBytes to create a Blob
instead.

This CL does attempt to use HexStringToBytes and then zero out the
memory. As long as we still have polymorphic usage of SecureBlobs,
this is not a big deal. Once we decouple SecureBlob from Blob, we can
improve this implementation.

BUG=chromium:728047
TEST=New unit tests.

Change-Id: Iad94cbd8f574dd35730cb2d68b6ae39798b03ef6
Reviewed-on: https://chromium-review.googlesource.com/1114919


Commit-Ready: Jorge Lucangeli Obes <jorgelo@chromium.org>
Tested-by: default avatarJorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: default avatarJorge Lucangeli Obes <jorgelo@chromium.org>
parent c2514025
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment