diff options
author | Jack Magne <jmagne@dhcp-16-213.sjc.redhat.com> | 2014-04-23 12:00:42 -0700 |
---|---|---|
committer | Jack Magne <jmagne@dhcp-16-213.sjc.redhat.com> | 2014-04-28 15:07:10 -0700 |
commit | 4a6f2615144371873c1ad9b84e4b47f28d65213e (patch) | |
tree | a2c539506dbcdea6bf9b3498c8faf88476750d14 /base/common/src/org | |
parent | 8a6935ba8587ece5e5fcf8b65448c1b57d5ac463 (diff) | |
download | pki-4a6f2615144371873c1ad9b84e4b47f28d65213e.tar.gz pki-4a6f2615144371873c1ad9b84e4b47f28d65213e.tar.xz pki-4a6f2615144371873c1ad9b84e4b47f28d65213e.zip |
Secure Channel final steps.
This patch allows the current secure channel functionality to work with
both tpsclient and esc. In order to get esc to work the following changes
were needed.
1. It turns out the server has been been forcing chunked encoding format upon the
outgoing data. Turns out that the system already knows how to do this so we were
getting double chunk size values and getting twice the amount of CRLF chars.
2. There was a minor error where I was not attempting to select the card manager
applet but the coolkey applet, which does not exist yet.
Diffstat (limited to 'base/common/src/org')
-rw-r--r-- | base/common/src/org/dogtagpki/tps/TPSConnection.java | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/base/common/src/org/dogtagpki/tps/TPSConnection.java b/base/common/src/org/dogtagpki/tps/TPSConnection.java index 64f8cb906..d93827775 100644 --- a/base/common/src/org/dogtagpki/tps/TPSConnection.java +++ b/base/common/src/org/dogtagpki/tps/TPSConnection.java @@ -90,28 +90,15 @@ public class TPSConnection { String s = message.encode(); CMS.debug("TPSMessage.write: Writing: " + s); - - if (chunked) { - // send message length + EOL - out.print(Integer.toHexString(s.length())); - out.print("\r\n"); - } - // send message out.print(s); - /* - * - * Right now, tpsclient is counting the final crlf as part of the message and ruining the MAC calculations - * For now do this and figure out later how to handle this for both tpsclient and esc. - * - if (chunked) { - // send EOL - out.print("\r\n"); - } + // We don't have to send any specific chunk format here + // The output stream detects chunked encoding and sends + // the correct output to the other end. - */ out.flush(); } + } |