src/share/classes/sun/security/x509/X509CertImpl.java

Print this page

        

*** 39,49 **** import java.util.*; import javax.security.auth.x500.X500Principal; import sun.misc.HexDumpEncoder; ! import sun.misc.BASE64Decoder; import sun.security.util.*; import sun.security.provider.X509Factory; /** * The X509CertImpl class represents an X.509 certificate. These certificates --- 39,49 ---- import java.util.*; import javax.security.auth.x500.X500Principal; import sun.misc.HexDumpEncoder; ! import java.util.Base64; import sun.security.util.*; import sun.security.provider.X509Factory; /** * The X509CertImpl class represents an X.509 certificate. These certificates
*** 261,279 **** throw new IOException("Unable to read InputStream: " + ioe1.getMessage()); } if (line.equals(X509Factory.BEGIN_CERT)) { /* stream appears to be hex-encoded bytes */ - BASE64Decoder decoder = new BASE64Decoder(); ByteArrayOutputStream decstream = new ByteArrayOutputStream(); try { while ((line = certBufferedReader.readLine()) != null) { if (line.equals(X509Factory.END_CERT)) { der = new DerValue(decstream.toByteArray()); break; } else { ! decstream.write(decoder.decodeBuffer(line)); } } } catch (IOException ioe2) { throw new IOException("Unable to read InputStream: " + ioe2.getMessage()); --- 261,278 ---- throw new IOException("Unable to read InputStream: " + ioe1.getMessage()); } if (line.equals(X509Factory.BEGIN_CERT)) { /* stream appears to be hex-encoded bytes */ ByteArrayOutputStream decstream = new ByteArrayOutputStream(); try { while ((line = certBufferedReader.readLine()) != null) { if (line.equals(X509Factory.END_CERT)) { der = new DerValue(decstream.toByteArray()); break; } else { ! decstream.write(Base64.getMimeDecoder().decode(line)); } } } catch (IOException ioe2) { throw new IOException("Unable to read InputStream: " + ioe2.getMessage());