"Diptikalyan Saha" <[EMAIL PROTECTED]> writes: > I used the official GnuTLS dlls in the GnuTLS/bin directory. Not much > difficulty in building with Visual Studio..I have to include some ifdef > _WIN32 tag to include winsock.h instead of sys/ arpa/ header files...and > changed tcp.c to do include windows socket programming stuff.
Thanks for the information. > There is abolute no change in the credential files. I compiled using > cl.exeand it worked. May be the two executables (made by gcc and vs) > read the > credential files in different fashion maybe - i donno. It is possible that CR/LF issues may be that cause of problems like this. /Simon > Thanks > Dipti. > > > > On 4/26/07, Simon Josefsson <[EMAIL PROTECTED]> wrote: > >> The error message is a bit sub-optimal, I think you'll get this error if >> there a problem with the credentials (e.g., the file is in the wrong >> directory, cannot be read, or bad format or similar). The reasons for >> why that happens is a long story, and probably the examples could be >> improved here.. >> >> Btw, was it difficult to build the examples using VS? Are you using the >> official GnuTLS DLL, or did you build GnuTLS from source too? >> >> /Simon >> >> "Diptikalyan Saha" <[EMAIL PROTECTED]> writes: >> >> > Well I found a workaround to the problem. The same source when compiler >> with >> > Visual Studio works perfectly..I guess the problem of length comes due >> to >> > compilation in cygwin. >> > >> > Thanks >> > Diptikalyan. >> > >> > >> > On 4/25/07, Diptikalyan Saha <[EMAIL PROTECTED]> wrote: >> >> >> >> Hi, >> >> I am new to GnuTLS. I installed GnuTLS 1.7.8 on windows XP, and >> >> tried to compile&run ex-client-srp.c and ex-serv-srp.c in examples >> >> directory and got "handshake failed" error. >> >> >> >> Heres what I did (using cygwin) >> >> >> >> >> >> $srptool --create-conf tpasswd.conf >> >> $srptool --passwd tpasswd --passwd-conf tpasswd.conf -u user >> >> password: pass >> >> $srptool --passwd tpasswd --passwd-conf tpasswd.conf --verify -u user >> >> >> >> $certtool --generate-privkey > x509-ca-key.pem >> >> $echo 'cn = GnuTLS test CA' > ca.tmpl >> >> $echo 'ca' >> ca.tmpl >> >> $echo 'cert_signing_key' >> ca.tmpl >> >> $certtool --generate-self-signed --load-privkey x509-ca-key.pem \ >> >> --template ca.tmpl --outfile x509-ca.pem >> >> $certtool --generate-privkey > x509-server-key.pem >> >> $echo 'organization = GnuTLS test server' > server.tmpl >> >> $echo 'cn = test.gnutls.org' >> server.tmpl >> >> $echo 'tls_www_server' >> server.tmpl >> >> $echo 'encryption_key' >> server.tmpl >> >> $echo 'signing_key' >> server.tmpl >> >> $certtool --generate-certificate --load-privkey x509-server-key.pem \ >> >> --load-ca-certificate x509-ca.pem --load-ca-privkey x509-ca-key.pem \ >> >> --template server.tmpl --outfile x509-server.pem >> >> >> >> Changed the three lines of code in ex-serv-srp.c >> >> to >> >> #define KEYFILE "x509-server-key.pem" >> >> #define CERTFILE "x509-server.pem" >> >> #define CAFILE "x509-ca.pem" >> >> >> >> and >> >> in ex-client-srp.c >> >> #define CAFILE "x509-ca.pem" >> >> >> >> The I compiled both the files and ran it and I got the following error: >> >> >> >> $./srv.exe >> >> cho Server ready. Listening to port '5556'. >> >> connection from 127.0.0.1, port 2076 >> >> ** Handshake has failed (A TLS packet with unexpected length was >> >> received.) >> >> >> >> $ ./cli.exe >> >> *** Handshake failed >> >> >> >> Please help me in this regard. >> >> >> >> >> >> >> >> Thanks >> >> >> >> Dipti. >> >> >> >> >> >> >> > _______________________________________________ >> > Help-gnutls mailing list >> > [email protected] >> > http://lists.gnu.org/mailman/listinfo/help-gnutls >> _______________________________________________ Help-gnutls mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gnutls
