summaryrefslogtreecommitdiffstats
path: root/base/server
diff options
context:
space:
mode:
authorJack Magne <jmagne@dhcp-16-206.sjc.redhat.com>2016-07-22 14:43:21 -0700
committerJack Magne <jmagne@dhcp-16-206.sjc.redhat.com>2016-07-22 14:47:17 -0700
commit215d07d0754a5397e5008e98fe42626e8de9e399 (patch)
tree323c74b8474bb31c896b161c24e9a98a2186011b /base/server
parent3998429da6e4a96b1ec667436f1da6b96d0ca33c (diff)
downloadpki-215d07d0754a5397e5008e98fe42626e8de9e399.tar.gz
pki-215d07d0754a5397e5008e98fe42626e8de9e399.tar.xz
pki-215d07d0754a5397e5008e98fe42626e8de9e399.zip
Stop using a java8 only constant. Will allow compilation with java7.
Trivial fix.
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();
}