summaryrefslogtreecommitdiffstats
path: root/base/server
diff options
context:
space:
mode:
Diffstat (limited to 'base/server')
-rw-r--r--base/server/cms/src/com/netscape/cms/servlet/tks/SecureChannelProtocol.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/base/server/cms/src/com/netscape/cms/servlet/tks/SecureChannelProtocol.java b/base/server/cms/src/com/netscape/cms/servlet/tks/SecureChannelProtocol.java
index 9593816a3..db42cab77 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/tks/SecureChannelProtocol.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/tks/SecureChannelProtocol.java
@@ -56,6 +56,8 @@ public class SecureChannelProtocol {
static final int PROTOCOL_THREE = 3;
static final int HOST_CRYPTOGRAM = 0;
static final int CARD_CRYPTOGRAM = 1;
+ //Size of long type in bytes, since java7 has no define for this
+ static final int LONG_SIZE = 8;
private SymmetricKey transportKey = null;
CryptoManager cryptoManager = null;
@@ -762,7 +764,7 @@ public class SecureChannelProtocol {
}
public static byte[] longToBytes(long x) {
- ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES);
+ ByteBuffer buffer = ByteBuffer.allocate(LONG_SIZE);
buffer.putLong(x);
return buffer.array();
}