diff --git a/src/org/esteid/hacker/CLI.java b/src/org/esteid/hacker/CLI.java index 9313a0d..e24a0ff 100644 --- a/src/org/esteid/hacker/CLI.java +++ b/src/org/esteid/hacker/CLI.java @@ -22,7 +22,6 @@ import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; -import java.io.OutputStreamWriter; import java.net.URL; import java.net.URLClassLoader; import java.nio.charset.Charset; @@ -46,7 +45,6 @@ import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.openssl.PEMParser; -import org.bouncycastle.openssl.jcajce.JcaPEMWriter; import apdu4j.HexUtils; import apdu4j.LoggingCardTerminal; @@ -263,12 +261,9 @@ public static void main(String argv[]) throws Exception { pem.close(); X509Certificate newcert = ca.cloneUserCertificate((RSAPublicKey) crt.getPublicKey(), crt); - JcaPEMWriter wr = new JcaPEMWriter(new OutputStreamWriter(System.out)); - wr.writeObject(newcert); - wr.close(); + System.out.println(crt2pem(newcert)); } - Card card = null; CardTerminal term;