0N/A#!/bin/csh -f
0N/A#
0N/A# @bug 5014493
0N/A# @summary SaslServer.wrap throws NullPointerException when security
0N/A# layer negotiated
0N/A#
0N/A# BEFORE running this test, you need to set up the environment as follows.
0N/A# 1. Create a 'sample' service principal in the KDC.
0N/A# 2. Create a keytab for the server principal 'sample/fqdn@REALM'
0N/A# where 'fqdn' is the fully qualified domain name of the server and
0N/A# REALM is the KDC's realm. The principal must be a host-based service.
0N/A# For example, a principal name might be
0N/A# 'sample/machineX.imc.org@IMC.ORG'.
0N/A# On Windows, for example, you use the ktpass utility to create a host keytab
0N/A# file.
0N/A# c:> ktpass -princ sample/machineX.imc.org@IMC.ORG -mapuser sample \
0N/A# -ptype KRB5_NT_SRV_HST \
0N/A# -pass servertest123 -out machineX.keytab
0N/A# 3. Create a user principal in the KDC.
0N/A# 4. Set up a JAAS login module configuration file like gsseg_jaas.conf, updating
0N/A# the client and server entries according to the principal and machine names
0N/A# used.
0N/A# 5. Update AuthOnly.SERVER_FQDN with fqdn of server machine.
0N/A# 6. To examine exchange, turn on logging by adding
0N/A# -Djava.util.logging.config.file=log.properties
0N/A# 7. Update the realm and kdc settings in this script.
0N/A#
0N/A#
0N/A$JAVA_HOME/bin/java -Djava.security.krb5.realm=IMC.ORG -Djava.security.krb5.kdc=machineX.imc.org -Djava.security.auth.login.config=gsseg_jaas.conf ConfSecurityLayer