Skip to content

Commit

Permalink
Ignore errors during self-signed attestation cert gen
Browse files Browse the repository at this point in the history
  • Loading branch information
arekinath committed Oct 24, 2018
1 parent cd2ed2d commit be4942b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/net/cooperi/pivapplet/PivApplet.java
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,15 @@ public class PivApplet extends Applet implements ExtendedLength
atslot.asym.genKeyPair();
atslot.imported = false;

writeAttestationCert(atslot);
try {
writeAttestationCert(atslot);
} catch (Exception ex) {
/* Ignore it, we just won't make a self-signed one */
outgoing.reset();
incoming.reset();
incoming.cullNonTransient();
return;
}

final short len = outgoing.available();
final File file = atslot.cert;
Expand Down

0 comments on commit be4942b

Please sign in to comment.