Debugging

When you are trying to identify JGSS problems, use the JGSS debugging capability to produce helpful categorized messages.

You can turn on one or more categories by setting the appropriate values for the Java™ property com.ibm.security.jgss.debug. Activate multiple categories by using a comma to separate the category names.

Debugging categories include the following:

Category Description
help List debug catgories
all Turn on debugging for all categories
off Turn off debugging completely
app Application debugging (default)
ctx Context operations debugging
cred Credentials (including name) operations
marsh Marshaling of tokens
mic MIC operations
prov Provider operations
qop QOP operations
unmarsh Unmarshaling of tokens
unwrap Unwrap operations
wrap Wrap operations

JGSS Debug class

To debug your JGSS application programmatically, use the debug class in the IBM® JGSS framework. Your application can use the debug class to turn on and off debug categories and display debugging information for the active categories.

The default debugging constructor reads the Java property com.ibm.security.jgss.debug to determine which categories to activate (turn on).

Example: Debugging for the application category

The following example shows how to request debug information for the application category:

     import com.ibm.security.jgss.debug;

     Debug debug = new Debug(); // Gets categories from Java property

     // Lots of work required to set up someBuffer. Test that the
     // category is on before setting up for debugging.

     if (debug.on(Debug.OPTS_CAT_APPLICATION)) {
         // Fill someBuffer with data.
	     debug.out(Debug.OPTS_CAT_APPLICATION, someBuffer);
         // someBuffer may be a byte array or a String. 
Related concepts
JGSS concepts
Configuring your iSeries server to use IBM JGSS
Running IBM JGSS applications
Developing IBM JGSS applications
Samples: IBM Java Generic Security Service (JGSS)
Related reference
IBM JGSS javadoc reference information