Test passing null cert/keys to WifiEnterpriseConfig
Ensure that null certificates and keys don't crash. Bug: 34765004 Test: This is a test Change-Id: I439b4f985c1b88ad4a9b58ee6f4eb4f90bd81246
This commit is contained in:
@@ -86,6 +86,16 @@ public class WifiEnterpriseConfigTest {
|
||||
assertTrue(result[0] == cert0 && result[1] == cert1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetClientKeyEntryWithNull() {
|
||||
mEnterpriseConfig.setClientKeyEntry(null, null);
|
||||
assertEquals(null, mEnterpriseConfig.getClientCertificateChain());
|
||||
assertEquals(null, mEnterpriseConfig.getClientCertificate());
|
||||
mEnterpriseConfig.setClientKeyEntryWithCertificateChain(null, null);
|
||||
assertEquals(null, mEnterpriseConfig.getClientCertificateChain());
|
||||
assertEquals(null, mEnterpriseConfig.getClientCertificate());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetClientCertificateChain() {
|
||||
PrivateKey clientKey = FakeKeys.RSA_KEY1;
|
||||
|
||||
Reference in New Issue
Block a user