diff options
Diffstat (limited to 'pki/base/kra')
4 files changed, 14 insertions, 11 deletions
diff --git a/pki/base/kra/src/com/netscape/kra/EnrollmentService.java b/pki/base/kra/src/com/netscape/kra/EnrollmentService.java index c2705e1e4..badeaed23 100644 --- a/pki/base/kra/src/com/netscape/kra/EnrollmentService.java +++ b/pki/base/kra/src/com/netscape/kra/EnrollmentService.java @@ -508,6 +508,8 @@ public class EnrollmentService implements IService { privateKeyIn.getSequence(0); DerValue privateKeyDer = new DerValue(privateKeyIn.getOctetString()); DerInputStream privateKeyDerIn = privateKeyDer.data; + + @SuppressWarnings("unused") BigInt privateKeyVersion = privateKeyDerIn.getInteger(); BigInt privateKeyModulus = privateKeyDerIn.getInteger(); BigInt privateKeyExponent = privateKeyDerIn.getInteger(); @@ -544,7 +546,7 @@ public class EnrollmentService implements IService { */ public static PKIArchiveOptionsContainer[] getPKIArchiveOptions(String crmfBlob) throws EBaseException { - Vector<Object> options = new Vector<Object>(); + Vector<PKIArchiveOptionsContainer> options = new Vector<PKIArchiveOptionsContainer>(); if (CMS.debugOn()) CMS.debug("EnrollmentService::getPKIArchiveOptions> crmfBlob=" + crmfBlob); diff --git a/pki/base/kra/src/com/netscape/kra/KRAService.java b/pki/base/kra/src/com/netscape/kra/KRAService.java index 1a351e061..4858e286a 100644 --- a/pki/base/kra/src/com/netscape/kra/KRAService.java +++ b/pki/base/kra/src/com/netscape/kra/KRAService.java @@ -52,7 +52,7 @@ public class KRAService implements IService { // private variables private IKeyRecoveryAuthority mKRA = null; - private Hashtable<String,IService> mServices = new Hashtable<String,IService>(); + private Hashtable<String, IService> mServices = new Hashtable<String, IService>(); /** * Constructs KRA service. @@ -80,8 +80,7 @@ public class KRAService implements IService { r.getRequestId().toString()); mKRA.log(ILogger.LL_INFO, "KRA services request " + r.getRequestId().toString()); - IService s = (IService) mServices.get( - r.getRequestType()); + IService s = mServices.get(r.getRequestType()); if (s == null) { r.setExtData(IRequest.RESULT, IRequest.RES_ERROR); diff --git a/pki/base/kra/src/com/netscape/kra/RecoveryService.java b/pki/base/kra/src/com/netscape/kra/RecoveryService.java index 8958695c1..89f8f042a 100644 --- a/pki/base/kra/src/com/netscape/kra/RecoveryService.java +++ b/pki/base/kra/src/com/netscape/kra/RecoveryService.java @@ -168,7 +168,7 @@ public class RecoveryService implements IService { // byte publicKey[] = (byte[])request.get(ATTR_PUBLIC_KEY_DATA); // X500Name owner = (X500Name)request.get(ATTR_OWNER_NAME); - Hashtable params = mKRA.getVolatileRequest( + Hashtable<String, Object> params = mKRA.getVolatileRequest( request.getRequestId()); if (params == null) { @@ -345,6 +345,8 @@ public class RecoveryService implements IService { privateKeyIn.getSequence(0); DerValue privateKeyDer = new DerValue(privateKeyIn.getOctetString()); DerInputStream privateKeyDerIn = privateKeyDer.data; + + @SuppressWarnings("unused") BigInt privateKeyVersion = privateKeyDerIn.getInteger(); BigInt privateKeyModulus = privateKeyDerIn.getInteger(); BigInt privateKeyExponent = privateKeyDerIn.getInteger(); @@ -372,7 +374,7 @@ public class RecoveryService implements IService { * Recovers key. (using unwrapping/wrapping on token) * - used when allowEncDecrypt_recovery is false */ - public synchronized PrivateKey recoverKey(Hashtable request, KeyRecord keyRecord, boolean isRSA) + public synchronized PrivateKey recoverKey(Hashtable<String, Object> request, KeyRecord keyRecord, boolean isRSA) throws EBaseException { if (!isRSA) { @@ -437,7 +439,7 @@ public class RecoveryService implements IService { * @param priKey private key handle * @exception EBaseException failed to create P12 file */ - public void createPFX(IRequest request, Hashtable params, + public void createPFX(IRequest request, Hashtable<String, Object> params, PrivateKey priKey, CryptoToken ct) throws EBaseException { CMS.debug("RecoverService: createPFX() allowEncDecrypt_recovery=false"); try { @@ -531,7 +533,7 @@ public class RecoveryService implements IService { * Recovers key. * - used when allowEncDecrypt_recovery is true */ - public synchronized byte[] recoverKey(Hashtable request, KeyRecord keyRecord) + public synchronized byte[] recoverKey(Hashtable<String, Object> request, KeyRecord keyRecord) throws EBaseException { if (CMS.getConfigStore().getBoolean("kra.keySplitting")) { Credential creds[] = (Credential[]) @@ -562,7 +564,7 @@ public class RecoveryService implements IService { * @param priData decrypted private key (PrivateKeyInfo) * @exception EBaseException failed to create P12 file */ - public void createPFX(IRequest request, Hashtable params, + public void createPFX(IRequest request, Hashtable<String, Object> params, byte priData[]) throws EBaseException { CMS.debug("RecoverService: createPFX() allowEncDecrypt_recovery=true"); try { diff --git a/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java b/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java index 0b84926d1..3a860f447 100644 --- a/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java +++ b/pki/base/kra/src/com/netscape/kra/TokenKeyRecoveryService.java @@ -225,7 +225,7 @@ public class TokenKeyRecoveryService implements IService { (String) sContext.get(SessionContext.USER_ID); } - Hashtable params = mKRA.getVolatileRequest( + Hashtable<String, Object> params = mKRA.getVolatileRequest( request.getRequestId()); if (params == null) { @@ -579,7 +579,7 @@ public class TokenKeyRecoveryService implements IService { /** * Recovers key. */ - public synchronized byte[] recoverKey(Hashtable request, KeyRecord keyRecord) + public synchronized byte[] recoverKey(Hashtable<String, Object> request, KeyRecord keyRecord) throws EBaseException { /* Credential creds[] = (Credential[]) |