summaryrefslogtreecommitdiffstats
path: root/base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java
diff options
context:
space:
mode:
authorJack Magne <jmagne@localhost.localdomain>2015-08-24 11:23:04 -0700
committerJack Magne <jmagne@localhost.localdomain>2015-08-24 17:00:19 -0700
commit3e484b8c88739f0418b5220d040d163dd1b25106 (patch)
treeb9d286e360c732ee6e9c2f0ed8221042b78ed4e9 /base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java
parent0baf14ad496d18991a83f211b4b60d1811e21fb3 (diff)
downloadpki-3e484b8c88739f0418b5220d040d163dd1b25106.tar.gz
pki-3e484b8c88739f0418b5220d040d163dd1b25106.tar.xz
pki-3e484b8c88739f0418b5220d040d163dd1b25106.zip
SC650 format/enroll fails
Simple fix to correctly identify scp01/gp201 sc650 card.
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.java12
1 files changed, 11 insertions, 1 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 14e8eadbf..637cfa394 100644
--- a/base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java
+++ b/base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java
@@ -3402,10 +3402,20 @@ public class TPSProcessor {
byte protocol = oidSecureChannelProtocol.at(length - 2);
byte implementation = oidSecureChannelProtocol.at(length - 1);
+ if (protocol == SecureChannel.SECURE_PROTO_03) {
+ throw new TPSException("TPSProcessor.gp211GetSecureChannelProtocolDetails: No support for SCP03 as of yet, bailing.",
+ TPSStatus.STATUS_ERROR_SECURE_CHANNEL);
+ }
+
platProtInfo.setProtocol(protocol);
platProtInfo.setImplementation(implementation);
platProtInfo.setKeysetInfoData(keyData);
- platProtInfo.setPlatform(SecureChannel.GP211);
+
+ if (protocol == SecureChannel.SECURE_PROTO_02)
+ platProtInfo.setPlatform(SecureChannel.GP211);
+ else
+ platProtInfo.setPlatform(SecureChannel.GP201);
+
CMS.debug("TPSProcessor.gp211GetSecureChannelProtocolDetails: protocol: " + protocol + " implementation: "
+ implementation + " keyInfoData: " + keyData.toHexString());