Skip to content

Commit

Permalink
Remove redundant code in CRSEnrollment
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed Aug 21, 2024
1 parent 458f1a8 commit b4097be
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package com.netscape.cms.servlet.cert.scep;

import java.io.ByteArrayInputStream;
import java.io.FileOutputStream;
import java.security.InvalidAlgorithmParameterException;
import java.security.KeyPair;
import java.security.MessageDigest;
Expand Down Expand Up @@ -2195,12 +2194,6 @@ public CryptoContext()
INTEGER modulus = (INTEGER) pubKeySeq.elementAt(0);
signingCertKeySize = modulus.bitLength();

try (FileOutputStream fos = new FileOutputStream("pubkey.der")) {
fos.write(signingCert.getPublicKey().getEncoded());
} catch (Exception e) {
logger.warn("Unable to store public key: " + e.getMessage(), e);
}

} catch (InvalidBERException e) {
throw new CryptoContextException(
"Internal Error: Bad internal Certificate Representation. Not a valid RSA-signed certificate");
Expand Down

0 comments on commit b4097be

Please sign in to comment.