From b4097be4cf6c5d7a8252dce9214278000570dde5 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Wed, 21 Aug 2024 13:56:00 -0500 Subject: [PATCH] Remove redundant code in CRSEnrollment --- .../com/netscape/cms/servlet/cert/scep/CRSEnrollment.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/base/ca/src/main/java/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java b/base/ca/src/main/java/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java index 3e7be89612a..abd7143b66b 100644 --- a/base/ca/src/main/java/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java +++ b/base/ca/src/main/java/com/netscape/cms/servlet/cert/scep/CRSEnrollment.java @@ -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; @@ -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");