diff options
author | Endi S. Dewata <edewata@redhat.com> | 2016-03-15 16:13:10 +0100 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2016-03-17 00:57:01 +0100 |
commit | b5637ae9c646c99efce4ff874666b75400502b2d (patch) | |
tree | 4a4b0ca46a8d64f6b122c14f25fbc2b0866a18bb /base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java | |
parent | f65188e4df1ecc080bfca18bd8244f6df9177adc (diff) | |
download | pki-b5637ae9c646c99efce4ff874666b75400502b2d.tar.gz pki-b5637ae9c646c99efce4ff874666b75400502b2d.tar.xz pki-b5637ae9c646c99efce4ff874666b75400502b2d.zip |
Fixed illegal token state transition via TEMP_LOST.
The TokenService.setTokenStatus() has been modified to restore
the temporarily lost token back into either uninitialized or
active state based on whether the token has certificates.
The TPSTokendb.tdbGetCertRecordsByCUID() has been modified to use
only tokenID attribute to search for token certificates more
accurately. It also has been simplified to return the certificate
records collection object directly.
Some constructors were added to the TPSException to allow chaining
the exception cause.
https://fedorahosted.org/pki/ticket/1808
Diffstat (limited to 'base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java')
-rw-r--r-- | base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java b/base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java index 05742842f..53af08a05 100644 --- a/base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java +++ b/base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java @@ -23,8 +23,8 @@ import java.math.BigInteger; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.Enumeration; import java.util.HashMap; import java.util.HashSet; @@ -1473,7 +1473,7 @@ public class TPSProcessor { throw new TPSException(logMsg, TPSStatus.STATUS_ERROR_REVOKE_CERTIFICATES_FAILED); } //find all certs belonging to the token - ArrayList<TPSCertRecord> certRecords = tps.tdb.tdbGetCertRecordsByCUID(cuid); + Collection<TPSCertRecord> certRecords = tps.tdb.tdbGetCertRecordsByCUID(cuid); CMS.debug(method + ": found " + certRecords.size() + " certs"); |