home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / doc / libsasl2 / testing.txt < prev    next >
Encoding:
Text File  |  2001-12-03  |  3.2 KB  |  85 lines

  1. ** This document is mainly useful for people doing libsasl development
  2.    or users having a lot of difficulty getting libsasl to work.
  3.  
  4. Testing the CMU SASL Library with the included sample applications
  5. ##################################################################
  6.  
  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
  11. the server.
  12.  
  13. This makes it fairly straightforward to test mechanisms; simply run
  14. the sample-client on the "client" machine, and sample-server on the
  15. "server" machine.
  16.  
  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.
  22.  
  23. Example:
  24.  
  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):
  31.  
  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
  37. Preparing initial.
  38. Sending initial response...
  39. C: S0VSQkVST1NfVjQA
  40. Waiting for server reply...
  41. S: hVQFjA==
  42. Sending response...
  43. C: BAYCQU5EUkVXLkNNVS5FRFUAOCDnIsZLQRdjLHXvzPNgpURYVj1iMqBIcTRaMpEQ8vWeYnfB+mTCVEa2URpkVgpzS1161MAX7ERzFV/EfGKlrAhGJCdN56mQ3eL2PzJlK7Z9ctKv4gKErcmV
  44. Waiting for server reply...
  45. S: BgcvFb63CLs=
  46. Sending response...
  47. C: ohBT+Jqab9zmDzclN7GSTw==
  48. Negotiation complete
  49. >
  50.  
  51.  
  52. Here's the server side of the same dialog:
  53.  
  54.  
  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...
  60. C: S0VSQkVST1NfVjQA
  61. Sending response...
  62. S: hVQFjA==
  63. Waiting for client reply...
  64. C: BAYCQU5EUkVXLkNNVS5FRFUAOCDnIsZLQRdjLHXvzPNgpURYVj1iMqBIcTRaMpEQ8vWeYnfB+mTCVEa2URpkVgpzS1161MAX7ERzFV/EfGKlrAhGJCdN56mQ3eL2PzJlK7Z9ctKv4gKErcmV
  65. Sending response...
  66. S: BgcvFb63CLs=
  67. Waiting for client reply...
  68. C: ohBT+Jqab9zmDzclN7GSTw==
  69. Negotiation complete
  70. Username: rob
  71. Realm: ANDREW.CMU.EDU
  72. SSF: 56
  73.  
  74.  
  75. Running the Testsuite application
  76. #################################
  77.  
  78. The Testsuite application in the utils directory trys out all the
  79. functionality of libsasl against itself. When you run the application
  80. it displays some requirments for running, such as being able to read
  81. and write to the sasldb file. If this program is set up correctly and
  82. still fails we'd like to hear about it at cyrus-bugs@andrew.cmu.edu.
  83.  
  84.