--- a/jdk/src/share/classes/com/sun/crypto/provider/CipherWithWrappingSpi.java Thu Apr 11 12:22:23 2013 +0900
+++ b/jdk/src/share/classes/com/sun/crypto/provider/CipherWithWrappingSpi.java Thu Apr 11 17:57:08 2013 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -169,7 +169,8 @@
try {
KeyFactory keyFactory =
- KeyFactory.getInstance(encodedKeyAlgorithm, "SunJCE");
+ KeyFactory.getInstance(encodedKeyAlgorithm,
+ SunJCE.getInstance());
X509EncodedKeySpec keySpec = new X509EncodedKeySpec(encodedKey);
key = keyFactory.generatePublic(keySpec);
} catch (NoSuchAlgorithmException nsae) {
@@ -191,8 +192,6 @@
}
} catch (InvalidKeySpecException ikse) {
// Should never happen.
- } catch (NoSuchProviderException nspe) {
- // Should never happen.
}
return key;
@@ -215,7 +214,8 @@
try {
KeyFactory keyFactory =
- KeyFactory.getInstance(encodedKeyAlgorithm, "SunJCE");
+ KeyFactory.getInstance(encodedKeyAlgorithm,
+ SunJCE.getInstance());
PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(encodedKey);
return keyFactory.generatePrivate(keySpec);
} catch (NoSuchAlgorithmException nsae) {
@@ -237,8 +237,6 @@
}
} catch (InvalidKeySpecException ikse) {
// Should never happen.
- } catch (NoSuchProviderException nspe) {
- // Should never happen.
}
return key;