public void testEntry06() throws Exception {
assertTrue(NotSupportMsg, JKSSupported);
KeyStore.TrustedCertificateEntry tCert = new KeyStore.TrustedCertificateEntry(
new KeyStoreTestSupport.MCertificate("type", new byte[0]));
TestKeyPair tkp = new TestKeyPair("DSA");
KeyStoreTestSupport.MCertificate certs[] = {
new KeyStoreTestSupport.MCertificate("DSA", tkp.getPrivate()
.getEncoded()),
new KeyStoreTestSupport.MCertificate("DSA", tkp.getPrivate()
.getEncoded()) };
KeyStore.PrivateKeyEntry pKey = new KeyStore.PrivateKeyEntry(tkp
.getPrivate(), certs);
char[] pwd = { 'p', 'a', 's', 's', 'w', 'd' };
KeyStore.PasswordProtection pp = new KeyStore.PasswordProtection(pwd);
String[] aliases = { "Alias1", "Alias2", "Alias3", "Alias4", "Alias5" };
KeyStore[] kss = createKS();
assertNotNull("KeyStore objects were not created", kss);
for (int i = 0; i < kss.length; i++) {
kss[i].load(null, null);
kss[i].setEntry(aliases[0], tCert, null);
kss[i].setEntry(aliases[1], pKey, pp);
kss[i].setEntry(aliases[2], pKey, pp);
kss[i].setKeyEntry(aliases[3], tkp.getPrivate(), pwd, certs);
kss[i].setCertificateEntry(aliases[4], certs[0]);
assertEquals("Incorrect size", kss[i].size(), 5);
try {