Hi Vinnie
I find a problem with the keytool -selfcert command for MSCAPI. As you
know, -selfcert reads the key/cert pair from an entry, updates several
fields in the cert, and writes them back to the keystore.
However, in MSCAPI's KeyStore, there is
public void engineSetKeyEntry(String alias, java.security.Key key,
char[] password, Certificate[] chain) throws KeyStoreException
{
....
if (key instanceof RSAPrivateCrtKey) {
....
} else {
throw new UnsupportedOperationException(
"Cannot assign the key to the given alias.");
}
So here the key must be a RSAPrivateCrtKey. It will be nice if a
sun.security.mscapi.RSAPrivateKey can also be accepted.
Thanks
Max