Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 50624e99 authored by Bartosz Fabianowski's avatar Bartosz Fabianowski
Browse files

Have generateKey() treat additional entropy as optional

KeyStore.generateKey() takes an entropy parameter. This is optional
and can be null. That is how KeyStore used to work but a recent
refactor made us always feed the entropy to keymaster, even if it
is empty (null or byte[0] on the Java side). This CL makes us ignore
such empty entropy again.

We only noticed this because a recently added GTS test that happens
to set the entropy to null is failing on some hardware (other
keymaster implementations silently ignore this invalid attempt to
set entropy).

Bug: 35156555
Test: gts-tradefed run gts --module GtsGmscoreHostTestCases
      --test com.google.android.gts.security.DeviceIdAttestationHostTest

Change-Id: Iadaf40e69350c17dd18e4dc2a1dab97fa911e1bf
parent 5331371a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment