Skip to content

Commit

Permalink
kg2 API changed again...
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberphone committed Apr 8, 2019
1 parent 24c1af2 commit 82f402c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Expand Up @@ -136,7 +136,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) thro
session.setAttribute(KEYGEN2_SESSION_ATTR,
new ServerState(new KeyGen2SoftHSM(KeyProviderService.keyManagementKey),
keygen2EnrollmentUrl,
KeyProviderService.serverCertificateFingerprint,
KeyProviderService.serverCertificate,
null));

////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
Expand Up @@ -35,7 +35,6 @@

import org.webpki.crypto.CertificateUtil;
import org.webpki.crypto.CustomCryptoProvider;
import org.webpki.crypto.HashAlgorithms;

import org.webpki.json.JSONDecoderCache;
import org.webpki.json.DataEncryptionAlgorithms;
Expand Down Expand Up @@ -83,7 +82,7 @@ public class KeyProviderService extends InitPropertyReader implements ServletCon

static JSONDecoderCache keygen2JSONCache;

static byte[] serverCertificateFingerprint;
static X509Certificate serverCertificate;

static String grantedVersions;

Expand Down Expand Up @@ -202,10 +201,8 @@ public String getMimeType() throws IOException {
////////////////////////////////////////////////////////////////////////////////////////////
// Get TLS server certificate
////////////////////////////////////////////////////////////////////////////////////////////
X509Certificate serverCertificate =
CertificateUtil.getCertificateFromBlob(
ArrayUtil.readFile(getPropertyString(TLS_CERTIFICATE)));
serverCertificateFingerprint = HashAlgorithms.SHA256.digest(serverCertificate.getEncoded());
serverCertificate = CertificateUtil.getCertificateFromBlob(
ArrayUtil.readFile(getPropertyString(TLS_CERTIFICATE)));

////////////////////////////////////////////////////////////////////////////////////////////
// Are we logging?
Expand Down

0 comments on commit 82f402c

Please sign in to comment.