--- a/jdk/src/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java Thu Apr 11 12:22:23 2013 +0900
+++ b/jdk/src/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java Thu Apr 11 17:57:08 2013 +0100
@@ -25,7 +25,6 @@
package com.sun.crypto.provider;
-import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.security.*;
import java.security.spec.*;
@@ -232,14 +231,13 @@
}
PBEParameterSpec pbeSpec = new PBEParameterSpec(salt, iCount);
try {
- params = AlgorithmParameters.getInstance(pbeAlgo, "SunJCE");
- } catch (GeneralSecurityException gse) {
+ params = AlgorithmParameters.getInstance(pbeAlgo,
+ SunJCE.getInstance());
+ params.init(pbeSpec);
+ } catch (NoSuchAlgorithmException nsae) {
// should never happen
throw new RuntimeException(
"SunJCE provider is not configured properly");
- }
- try {
- params.init(pbeSpec);
} catch (InvalidParameterSpecException ipse) {
// should never happen
throw new RuntimeException("PBEParameterSpec not supported");