1 ** This document is mainly useful for people doing libsasl development
2 or users having a lot of difficulty getting libsasl to work.
4 Testing the CMU SASL Library with the included sample applications
5 ##################################################################
7 The CMU SASL library comes with two small sample programs:
8 sample-client and sample-server. Each of these programs dump base-64
9 SASL iterations to STDOUT, and read the next iteration from STDIN.
10 Lines preceded by "C: " are from the client, and from "S: " are from
13 This makes it fairly straightforward to test mechanisms; simply run
14 the sample-client on the "client" machine, and sample-server on the
17 Both programs take a -m MECH command line argument; this can be used
18 to force the mechanism used in the exchange. KERBEROS_V4 requires
19 that the IP addresses of both client and server be set, along with the
20 service name, and the server's fully-qualified hostname; these are
21 done through more command line arguments.
25 Here's the client side of an exchange. The mechanism selection code
26 chooses KERBEROS_V4; negotiation takes place, and the client is
27 authenticated. This is being run on the machine SPOOKY.ANDREW.CMU.EDU
28 (128.2.121.162), pretending to be talking to an "rcmd" service running
29 on port 23 (note the semicolons in the IP address. There is a strong
30 chance these will need to be escaped for proper interpretation by the shell):
32 > ./sample-client -i local=128.2.121.162;23,remote=128.2.121.162;23 -s rcmd -n SPOOKY.ANDREW.CMU.EDU
33 Waiting for mechanism list from server...
34 S: UExBSU4gQU5PTllNT1VTIEtFUkJFUk9TX1Y0IERJR0VTVC1NRDUgQ1JBTS1NRDUgAAAAAED5EEA=
35 Choosing best mechanism from: PLAIN ANONYMOUS KERBEROS_V4 DIGEST-MD5 CRAM-MD5
36 Using mechanism KERBEROS_V4
38 Sending initial response...
40 Waiting for server reply...
43 C: BAYCQU5EUkVXLkNNVS5FRFUAOCDnIsZLQRdjLHXvzPNgpURYVj1iMqBIcTRaMpEQ8vWeYnfB+mTCVEa2URpkVgpzS1161MAX7ERzFV/EfGKlrAhGJCdN56mQ3eL2PzJlK7Z9ctKv4gKErcmV
44 Waiting for server reply...
47 C: ohBT+Jqab9zmDzclN7GSTw==
52 Here's the server side of the same dialog:
55 > ./sample-server -s rcmd -i local=128.2.121.162;23,remote=128.2.121.162;23
56 Generating client mechanism list...
57 Sending list of 5 mechanism(s)
58 S: UExBSU4gQU5PTllNT1VTIEtFUkJFUk9TX1Y0IERJR0VTVC1NRDUgQ1JBTS1NRDUgAAAAAED5EEA=
59 Waiting for client mechanism...
63 Waiting for client reply...
64 C: BAYCQU5EUkVXLkNNVS5FRFUAOCDnIsZLQRdjLHXvzPNgpURYVj1iMqBIcTRaMpEQ8vWeYnfB+mTCVEa2URpkVgpzS1161MAX7ERzFV/EfGKlrAhGJCdN56mQ3eL2PzJlK7Z9ctKv4gKErcmV
67 Waiting for client reply...
68 C: ohBT+Jqab9zmDzclN7GSTw==
76 Running the Testsuite application
77 #################################
79 The Testsuite application in the utils directory trys out all the
80 functionality of libsasl against itself. When you run the application
81 it displays some requirments for running, such as being able to read
82 and write to the sasldb file. If this program is set up correctly and
83 still fails we'd like to hear about it at cyrus-bugs@andrew.cmu.edu.