File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
src/main/java/com/ibm/as400/access Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -404,6 +404,11 @@ private byte[] getGSSToken() {
404404 return this .gssToken_ ;
405405 }
406406
407+ public void clearGSSToken () {
408+ if (this .gssToken_ != null )
409+ CredentialVault .clearArray (gssToken_ );
410+ }
411+
407412 // Determines if the password contains a Kerberos token
408413 private boolean isGSSToken (char [] auth ){
409414 char [] prefix = KERBEROS_PREFIX_CHARS ;
@@ -4201,6 +4206,7 @@ public void removeVetoableChangeListener(VetoableChangeListener listener)
42014206 public synchronized void resetAllServices ()
42024207 {
42034208 if (Trace .traceOn_ ) Trace .log (Trace .DIAGNOSTIC , "Resetting all services." );
4209+ clearGSSToken ();
42044210 setStayAlive (0 );
42054211
42064212 disconnectAllServices ();
Original file line number Diff line number Diff line change @@ -592,6 +592,11 @@ public void close ()
592592
593593
594594 as400_ .disconnectServer (server_ );
595+ // Clear the sensitive auth token via the public AS400 object
596+ if (as400PublicClassObj_ != null ) {
597+ as400PublicClassObj_ .clearGSSToken ();
598+ }
599+
595600 server_ = null ;
596601 }
597602
You can’t perform that action at this time.
0 commit comments