test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLContextImpl/TrustTrustedCert.java

Print this page

        

@@ -42,11 +42,11 @@
 import javax.net.ssl.*;
 import java.security.*;
 import java.security.cert.*;
 import java.security.spec.*;
 import java.security.interfaces.*;
-import sun.misc.BASE64Decoder;
+import java.util.Base64;
 
 
 public class TrustTrustedCert {
 
     /*

@@ -228,11 +228,11 @@
 
         ks.setCertificateEntry("Trusted RSA Signer", trusedCert);
 
         // generate the private key.
         PKCS8EncodedKeySpec priKeySpec = new PKCS8EncodedKeySpec(
-                            new BASE64Decoder().decodeBuffer(targetPrivateKey));
+                                Base64.getMimeDecoder().decode(targetPrivateKey));
         KeyFactory kf = KeyFactory.getInstance("RSA");
         RSAPrivateKey priKey =
                 (RSAPrivateKey)kf.generatePrivate(priKeySpec);
 
         // generate certificate chain