Fix for issue 3075 (ads-truststore creation failure and exception handling)
1. There is a problem with the default cipher algorithm provided in the CryptoManager configuration (RSA/ECB/OAEPWITHSHA-1ANDMGF1PADDING) since it does not work in IBM Java. RSA/ECB/PKCS1Padding must be used instead in default Java 5 AIX installations. This issue may apply to any other JVM that do not include the same ciphers as Sun JCE.
A fix to handle this case corresponds to the modifications performed in ConfigureDS.java. ConfigureDS checks whether the default cipher can be used with the JVM and if not, tries to use an alternative cipher. If the default cipher does not work and an alternative cipher is found, the configuration of the CryptoManager is updated.
2. There is an issue with keytool utility on Java 1.6. If we write directly the passwords to the keytool process OutputStream it fails. Using a sleep fixes the issue. The modifications in CertificateManager fix this problem. Note that genkeypair is the new subcommand recommended to be used since 1.6, and the code reflects this.
Apart from that a fix with the temporary self-signed certificate that is generated has been also committed by marking the file to be deleted on exit (before these modifications the file was not deleted).