[jboss-cvs] JBossAS SVN: r114534 - projects/security/security-negotiation/branches/security-negotiation-2.1.3.GA_JBPAPP-10613/jboss-negotiation-spnego/src/main/java/org/jboss/security/negotiation/spnego/encoding.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 17 04:41:37 EDT 2013
Author: tfonteyn
Date: 2013-10-17 04:41:37 -0400 (Thu, 17 Oct 2013)
New Revision: 114534
Modified:
projects/security/security-negotiation/branches/security-negotiation-2.1.3.GA_JBPAPP-10613/jboss-negotiation-spnego/src/main/java/org/jboss/security/negotiation/spnego/encoding/TokenParser.java
Log:
[JBPAPP-10613] SPNEGO backport of additional Kerberos ticket decoding
Modified: projects/security/security-negotiation/branches/security-negotiation-2.1.3.GA_JBPAPP-10613/jboss-negotiation-spnego/src/main/java/org/jboss/security/negotiation/spnego/encoding/TokenParser.java
===================================================================
--- projects/security/security-negotiation/branches/security-negotiation-2.1.3.GA_JBPAPP-10613/jboss-negotiation-spnego/src/main/java/org/jboss/security/negotiation/spnego/encoding/TokenParser.java 2013-10-15 10:10:30 UTC (rev 114533)
+++ projects/security/security-negotiation/branches/security-negotiation-2.1.3.GA_JBPAPP-10613/jboss-negotiation-spnego/src/main/java/org/jboss/security/negotiation/spnego/encoding/TokenParser.java 2013-10-17 08:41:37 UTC (rev 114534)
@@ -183,13 +183,18 @@
is.reset();
bytes = getValueAt(is, (byte) 2);
- byte[] cipher = Arrays.copyOfRange(bytes, 3, bytes.length);
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+ bais.read();
+ int cipherLength = NegTokenDecoder.readLength(bais);
+ byte[] cipher = new byte[cipherLength];
+ bais.read(cipher);
+ bais.close();
byte[] ticketBytes = decrypt(key, cipher);
byte[] temp = reset(ticketBytes);
// at this point we have the decrypted ticket
- ByteArrayInputStream bais = new ByteArrayInputStream(temp);
+ bais = new ByteArrayInputStream(temp);
bais.read();
int length = NegTokenDecoder.readLength(bais);
temp = new byte[length];
More information about the jboss-cvs-commits
mailing list