Skip to content
Commit a6e551c6 authored by Alex Klyubin's avatar Alex Klyubin
Browse files

Check parameters in KeyGenerator.init.

KeyGenerator.init is supposed to check whether all provided parameters
are OK. This is because KeyGenerator.generateKey cannot throw checked
exceptions. This CL makes AndroidKeyStore KeyGenerator implementation
do just that. Unfortunately, keymaster/kestore doesn't provide a way
to check whether all the parameters are OK without actually generating
a key. Thus, this KeyGenerator does its best inside init method
(before Keymaster is called), and then surfaces any remaining issues
(flagged by Keymaster/keystore) as unchecked IllegalStateException.

Bug: 18088752
Change-Id: I9a04da880dcbe26c37f41d1477e41bdc74db04c9
parent 14bc1c58
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