The KeyRecoveryAuthority.PR_INTERNAL_TOKEN_NAME has been replaced
with CryptoUtil.INTERNAL_TOKEN_NAME since they are identical.

https://fedorahosted.org/pki/ticket/2556

Pushed to master under trivial rule.

--
Endi S. Dewata
>From 4b7163537dbf161ede20ff2c6e6ed441f130b03d Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <[email protected]>
Date: Sat, 21 Jan 2017 02:12:40 +0100
Subject: [PATCH] Refactored KeyRecoveryAuthority.PR_INTERNAL_TOKEN_NAME.

The KeyRecoveryAuthority.PR_INTERNAL_TOKEN_NAME has been replaced
with CryptoUtil.INTERNAL_TOKEN_NAME since they are identical.

https://fedorahosted.org/pki/ticket/2556
---
 base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java b/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java
index 86b68e397bc5058eb989f41f4e77c50b0bd5ff4b..f05aa471f0c5d7a435ab45e88f25b9e8eea8574e 100644
--- a/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java
+++ b/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java
@@ -68,6 +68,7 @@ import com.netscape.cmscore.dbs.KeyRecord;
 import com.netscape.cmscore.dbs.KeyRepository;
 import com.netscape.cmscore.dbs.ReplicaIDRepository;
 import com.netscape.cmscore.request.RequestSubsystem;
+import com.netscape.cmsutil.crypto.CryptoUtil;
 
 import netscape.security.util.DerOutputStream;
 import netscape.security.x509.CertificateChain;
@@ -92,7 +93,6 @@ public class KeyRecoveryAuthority implements IAuthority, IKeyService, IKeyRecove
      * Internal Constants
      */
 
-    private static final String PR_INTERNAL_TOKEN_NAME = "internal";
     private static final String PARAM_CREDS = "creds";
     private static final String PARAM_LOCK = "lock";
     private static final String PARAM_PK12 = "pk12";
@@ -335,11 +335,11 @@ public class KeyRecoveryAuthority implements IAuthority, IKeyService, IKeyRecove
         if (serverKeygenTokenName == null) {
             serverKeygenTokenName = "internal";
         }
-        if (serverKeygenTokenName.equalsIgnoreCase(PR_INTERNAL_TOKEN_NAME))
-            serverKeygenTokenName = PR_INTERNAL_TOKEN_NAME;
+        if (serverKeygenTokenName.equalsIgnoreCase(CryptoUtil.INTERNAL_TOKEN_NAME))
+            serverKeygenTokenName = CryptoUtil.INTERNAL_TOKEN_NAME;
 
         try {
-            if (serverKeygenTokenName.equalsIgnoreCase(PR_INTERNAL_TOKEN_NAME)) {
+            if (serverKeygenTokenName.equalsIgnoreCase(CryptoUtil.INTERNAL_TOKEN_NAME)) {
                 CMS.debug("KeyRecoveryAuthority: getting internal crypto token for serverkeygen");
                 mKeygenToken = CryptoManager.getInstance().getInternalKeyStorageToken();
             } else {
-- 
2.5.5

_______________________________________________
Pki-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/pki-devel

Reply via email to