8186186: GSSContext.isEstablished() can return true on error state

Reviewed-by: weijun
This commit is contained in:
Weijun Wang 2018-08-21 20:19:46 -07:00 committed by Ivan Gerasimov
parent 73ac71d532
commit dcb930f123
2 changed files with 60 additions and 2 deletions

View file

@ -583,7 +583,8 @@ public class SpNegoContext implements GSSContextSpi {
}
} else {
negoResult = SpNegoToken.NegoResult.REJECT;
state = STATE_DONE;
state = STATE_DELETED;
throw new GSSException(GSSException.FAILURE);
}
if (DEBUG) {
@ -642,7 +643,8 @@ public class SpNegoContext implements GSSContextSpi {
}
} else {
negoResult = SpNegoToken.NegoResult.REJECT;
state = STATE_DONE;
state = STATE_DELETED;
throw new GSSException(GSSException.FAILURE);
}
// generate SPNEGO token