Index of /gsasl4win

[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -  
[   ]Makefile11-Sep-2012 05:51 6.5K 
[   ]PGP-KEYS11-Sep-2012 05:51 38K 
[   ]README11-Sep-2012 05:51 3.9K 
[TXT]README.html11-Sep-2012 05:51 18K 
[IMG]gsasl-kfw1.png11-Sep-2012 05:51 192K 
[IMG]gsasl-kfw2.png11-Sep-2012 05:51 200K 
[IMG]gsasl-kfw3.png11-Sep-2012 05:51 24K 
[IMG]gsasl-kfw4.png11-Sep-2012 05:51 25K 

GNU SASL FOR WINDOWS -- Instructions for the Windows port of GNU SASL
Copyright (C) 2010 Simon Josefsson
See the end for copying conditions.

GNU SASL for Windows

This directory contains files that will build ZIP files with Windows binaries of GNU SASL. The following ZIP files are built: Windows x86 32-bit binaries. No external dependencies. Windows x86 64-bit binaries. No external dependencies. Windows x86 32-bit binaries. Requires MIT Kerberos for Windows 3.2.2. Supports GSS-API and GS2.


The core GNU SASL library is available under the LGPLv2+ license. The command line tool gsasl is available under the GPLv3+ license. This documentation and the build scripts (e.g., Makefile) are licensed under the GPLv3+.


If you find this work useful to you, please contribute back! Contributions will help me develop and make future releases of GNU SASL.

If you need customized support, please contact me directly, since I’m available as a consultant.


Download the ZIP file and unpack it, and run the gsasl tool.

For Kerberos testing, configure KfW and then invoke gsasl. The following two screenshots demonstrates this:



For more information see the GNU SASL manual on Kerberos on Windows.

Build Environment

I’m using Debian x86 testing with the MinGW cross-compiler. You will need Wine to run the self tests for "make check".

Building GNU SASL for Windows

$ mkdir mingw-w64
$ wget -q
$ make -f

Put mingw-w64/build/root/bin/ in your PATH.

The next step is to build GNU SASL itself.

$ wget
$ make

This will produce a ZIP file with the binaries.

Using the GnuTLS DLL from your Cygwin or MinGW program

Link with the libgsasl.dll.a file.

$ cat > foo.c
#include <gsasl.h>
int main (void)
  printf ("foo %s\n", gsasl_check_version (NULL));
$ gcc -o foo foo.c -Isomewhere/include somewhere/libgsasl.dll.a

Then run the program.

$ ./foo
foo 1.5.2

Using the GNU SASL DLL from your Visual Studio program

The first step is create an import library. Start a MSVS Command Prompt, and go to the GnuTLS installation directory.

C:\gsasl-1.5.2>lib /def:libgsasl-7.def

This will create a libgsasl-7.lib that can be used as a import library for Visual Studio projects.

Build a sample program to test it as follows:

C:\gsasl-1.5.2>cl foo.c -Iinclude -Dssize_t=long libgsasl-7.lib
foo 1.5.2

These steps are not fully polished yet, but appear to work.

Known problems

None so far!


Ask on for general problems. If you wish to contact me directly, try