equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
137 flag = true; |
137 flag = true; |
138 } |
138 } |
139 return flag; |
139 return flag; |
140 } |
140 } |
141 |
141 |
|
142 @SuppressWarnings("fallthrough") |
142 byte[] calculateChecksum(int alg, byte[] header, byte[] trailer, |
143 byte[] calculateChecksum(int alg, byte[] header, byte[] trailer, |
143 byte[] data, int start, int len, int tokenId) throws GSSException { |
144 byte[] data, int start, int len, int tokenId) throws GSSException { |
144 |
145 |
145 switch (alg) { |
146 switch (alg) { |
146 case MessageToken.SGN_ALG_DES_MAC_MD5: |
147 case MessageToken.SGN_ALG_DES_MAC_MD5: |
1263 |
1264 |
1264 // get the token Sequence Number required for encryption |
1265 // get the token Sequence Number required for encryption |
1265 // Note: When using this RC4 based encryption type, the sequence number |
1266 // Note: When using this RC4 based encryption type, the sequence number |
1266 // is always sent in big-endian rather than little-endian order. |
1267 // is always sent in big-endian rather than little-endian order. |
1267 byte[] seqNum = new byte[4]; |
1268 byte[] seqNum = new byte[4]; |
1268 token.writeBigEndian(token.getSequenceNumber(), seqNum); |
1269 WrapToken.writeBigEndian(token.getSequenceNumber(), seqNum); |
1269 |
1270 |
1270 // Krb5Token.debug("\narcFourEncrypt:" + Krb5Token.getHexBytes(all)); |
1271 // Krb5Token.debug("\narcFourEncrypt:" + Krb5Token.getHexBytes(all)); |
1271 |
1272 |
1272 // Encrypt |
1273 // Encrypt |
1273 try { |
1274 try { |