I'm using the class InstallCert to import a VMware vCenter certificate into my local Java keystore.
The line socket.startHandshake()
returns an UnsupportedOperationException
, but the class SavingTrustManager
still has downloaded the certificate successfully.
Then I store the downloaded certificate into my local keystore by using the following snippet.
KeyStore jsk;
... ... ..
jks.setCertificateEntry(alias, cert);
OutputStream out = new FileOutputStream("jssecacert");
jks.store(out, passphrase);
out.close();
But when I try to list all the entries in the keystore: keytool -list -keystore jssecacerts -v
, It shows that there are 160 entries including the one that I have downloaded.
I'm pretty sure that the keystore is generated by my code, and it is supposed to be initially empty. I'd like to know where do the other 159 entries come from ?
Thanks.