Skip to content

Commit

Permalink
Simplify PEM writing
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpaljak committed Apr 12, 2016
1 parent 594c4c8 commit 92df3bb
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/org/esteid/hacker/CLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 92df3bb

Please sign in to comment.