Skip to content

Commit

Permalink
eclipse-ee4j#23424 ejb30/sec TCK failures
Browse files Browse the repository at this point in the history
Copy the OID to buffer excluding the name

Signed-off-by: hussainnm <hussain.nm@cognizant.com>
  • Loading branch information
hussainnm committed Mar 20, 2021
1 parent 3ac0020 commit 82104e6
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,11 @@ private static int verifyTokenHeader(Oid oid, byte[] token) throws GSSException
if (token[index] != 0x06)
throw new GSSException(GSSException.DEFECTIVE_TOKEN);

byte[] buf = new byte[token.length - index];
// add first two bytes to the MECH_OID_LEN
int oidlen = token[index+1] + 2;
byte[] buf = new byte[oidlen];

System.arraycopy(token, index, buf, 0, token.length - index);
System.arraycopy(token, index, buf, 0, oidlen);

Oid mechoid = getOID(buf);

Expand Down

0 comments on commit 82104e6

Please sign in to comment.