Delegated cert installer: test importing key

Add a test for importing of keys into KeyChain by calling
installKeyPair.

This test is similar to the testInstallKeyPair test case in
DelegatedCertInstallerTest, with the following differences:
* No negative test (will be added later when the test will be remove
from the DelegatedCertInstallerTest class).
*  The new test case requests access to the installed key and tries to
get it via KeyChain to verify it's a similar key.

A more complete test would have been trying to use the private key for
signing and verifying the signature.

That will be added when KeyManagementTest will share code with the
DirectDelegatedCertInstallerTest.

Bug: 110824288
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegatedCertInstallerDirectly
Change-Id: If5ab4bb147bfff637ed63603fe492e0a5bcc01d8
1 file changed