1#!/bin/csh -f
2#
3# @bug 5014493
4# @summary SaslServer.wrap throws NullPointerException when security 
5#    layer negotiated
6#
7# BEFORE running this test, you need to set up the environment as follows.
8# 1. Create a 'sample' service principal in the KDC.
9# 2. Create a keytab for the server principal 'sample/fqdn@REALM'
10#    where 'fqdn' is the fully qualified domain name of the server and
11#    REALM is the KDC's realm. The principal must be a host-based service.
12#    For example, a principal name might be
13#      'sample/machineX.imc.org@IMC.ORG'. 
14#    On Windows, for example, you use the ktpass utility to create a host keytab 
15#    file.
16#    c:> ktpass -princ sample/machineX.imc.org@IMC.ORG -mapuser sample \
17#        -ptype KRB5_NT_SRV_HST \
18#        -pass servertest123 -out machineX.keytab
19# 3. Create a user principal in the KDC.
20# 4. Set up a JAAS login module configuration file like gsseg_jaas.conf, updating
21#    the client and server entries according to the principal and machine names
22#    used.
23# 5. Update AuthOnly.SERVER_FQDN with fqdn of server machine.
24# 6. To examine exchange, turn on logging by adding
25#        -Djava.util.logging.config.file=log.properties
26# 7. Update the realm and kdc settings in this script.
27#
28#
29$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
30