test/sun/security/ssl/javax/net/ssl/TLSv12/ShortRSAKey512.java
Print this page
@@ -46,11 +46,11 @@
import java.security.KeyFactory;
import java.security.cert.Certificate;
import java.security.cert.CertificateFactory;
import java.security.spec.*;
import java.security.interfaces.*;
-import sun.misc.BASE64Decoder;
+import java.util.Base64;
public class ShortRSAKey512 {
/*
@@ -227,11 +227,11 @@
}
if (keyCertStr != null) {
// generate the private key.
PKCS8EncodedKeySpec priKeySpec = new PKCS8EncodedKeySpec(
- new BASE64Decoder().decodeBuffer(keySpecStr));
+ Base64.getMimeDecoder().decode(keySpecStr));
KeyFactory kf = KeyFactory.getInstance("RSA");
RSAPrivateKey priKey =
(RSAPrivateKey)kf.generatePrivate(priKeySpec);
// generate certificate chain