From dragonheart at gentoo.org Sun Feb 6 15:13:39 2005 From: dragonheart at gentoo.org (Daniel) Date: Sun Feb 6 17:49:50 2005 Subject: [gnutls-dev] small patch for c++ support for the extra.h against 1.2.0 Message-ID: <200502062343.43169.dragonheart@gentoo.org> Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : /pipermail/attachments/20050206/c9b89cae/attachment.pgp From jas at extundo.com Sun Feb 6 17:58:57 2005 From: jas at extundo.com (Simon Josefsson) Date: Sun Feb 6 17:55:20 2005 Subject: [gnutls-dev] Re: small patch for c++ support for the extra.h against 1.2.0 In-Reply-To: <200502062343.43169.dragonheart@gentoo.org> (Daniel's message of "Sun, 6 Feb 2005 23:43:39 +0930") References: <200502062343.43169.dragonheart@gentoo.org> Message-ID: Daniel writes: > small patch for including extra functionality in c++ Applied. Thanks, Simon From nspring at cs.washington.edu Sun Feb 6 18:09:18 2005 From: nspring at cs.washington.edu (Neil Spring) Date: Sun Feb 6 19:05:25 2005 Subject: [gnutls-dev] prototype shadowing warning Message-ID: Hi, Please avoid using "index", "time" and "exp" as parameter names in function prototypes in header files to avoid -Wshadow warnings. Warnings follow. (yeah, I know the compiler should be a little smarter, but then again, "index" and "time" aren't very descriptive names for parameters.) Sorry I'm so picky. thanks, -neil gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/include -I/sw/include -I/sw/include -I/sw/include -I/sw/include -I/sw/include -I/sw/include -g -O2 -D_GNU_SOURCE -W -Wall -Wshadow -Wpointer-arith -Wwrite-strings -no-cpp-precomp -I/sw/include -I/sw/include -I/sw/include -I/sw/include -I/sw/include -I/sw/include -c `test -f 'tlsComm.c' || echo './'`tlsComm.c In file included from tlsComm.c:24: /sw/include/gnutls/gnutls.h:660: warning: declaration of `exp' shadows a global declaration :0: warning: shadowed declaration is here In file included from tlsComm.c:25: /sw/include/gnutls/x509.h:233: warning: declaration of `index' shadows a global declaration /usr/include/string.h:107: warning: shadowed declaration is here /sw/include/gnutls/x509.h:234: warning: declaration of `time' shadows a global declaration /usr/include/time.h:128: warning: shadowed declaration is here hairshirt:~/sourceforge/wmbiff/wmbiff% gcc --version gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1495) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. hairshirt:~/sourceforge/wmbiff/wmbiff% uname -a Darwin hairshirt.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power Macintosh powerpc hairshirt:~/sourceforge/wmbiff/wmbiff% libgnutls-config --version 1.2.0 hairshirt:~/sourceforge/wmbiff/wmbiff% grep 1.2 /sw/include/gnutls/gnutls.h #define LIBGNUTLS_VERSION "1.2.0" GNUTLS_A_CERTIFICATE_UNOBTAINABLE=111, GNUTLS_A_UNRECOGNIZED_NAME=112, extern const gnutls_datum_t gnutls_srp_1024_group_prime; extern const gnutls_datum_t gnutls_srp_1024_group_generator; From Frediano.Ziglio at vodafone.com Wed Feb 9 16:29:39 2005 From: Frediano.Ziglio at vodafone.com (ZIGLIO, Frediano, VF-IT) Date: Wed Feb 9 17:21:28 2005 Subject: [gnutls-dev] leak using gcrypt Message-ID: Using gcrypt gnutls leak some memory (about 2 Kbi). Following a small program that leak memory #include int main() { gnutls_global_init(); gnutls_global_deinit(); return 0; } gnutls_global_init calls gc_init to initialize gcrypt however gnutls_global_deinit does not call a gc_deinit (which doesn't even exist). Leak appear in the call of gcry_check_version. From Valgrind log: ==18594== ==18594== 2000 bytes in 30 blocks are still reachable in loss record 1 of 1 ==18594== at 0x1B903D48: malloc (vg_replace_malloc.c:131) ==18594== by 0x4F65381A: (within /usr/lib/libgcrypt.so.11.1.1) ==18594== by 0x4F650DC2: (within /usr/lib/libgcrypt.so.11.1.1) ==18594== by 0x4F650DF7: gcry_malloc (in /usr/lib/libgcrypt.so.11.1.1) ==18594== by 0x4F6545C7: (within /usr/lib/libgcrypt.so.11.1.1) ==18594== by 0x4F654EA8: (within /usr/lib/libgcrypt.so.11.1.1) ==18594== by 0x4F656BA6: (within /usr/lib/libgcrypt.so.11.1.1) ==18594== by 0x4F65080F: (within /usr/lib/libgcrypt.so.11.1.1) ==18594== by 0x4F650932: gcry_check_version (in /usr/lib/libgcrypt.so.11.1.1) ==18594== by 0x46AA7D8E: (within /usr/lib/libgnutls.so.12.1.25) ==18594== by 0x46A973D3: gnutls_global_init (in /usr/lib/libgnutls.so.12.1.25) ==18594== by 0x8048500: main (in /home/freddy/cpp/leak) ==18594== ==18594== LEAK SUMMARY: ==18594== definitely lost: 0 bytes in 0 blocks. ==18594== possibly lost: 0 bytes in 0 blocks. ==18594== still reachable: 2000 bytes in 30 blocks. ==18594== suppressed: 0 bytes in 0 blocks. freddy77 From jas at extundo.com Wed Feb 9 18:54:05 2005 From: jas at extundo.com (Simon Josefsson) Date: Wed Feb 9 18:50:39 2005 Subject: [gnutls-dev] Re: leak using gcrypt In-Reply-To: (Frediano ZIGLIO's message of "Wed, 9 Feb 2005 16:29:39 +0100") References: Message-ID: "ZIGLIO, Frediano, VF-IT" writes: > Using gcrypt gnutls leak some memory (about 2 Kbi). > Following a small program that leak memory > > #include > > int main() > { > gnutls_global_init(); > gnutls_global_deinit(); > return 0; > } > > gnutls_global_init calls gc_init to initialize gcrypt however > gnutls_global_deinit does not call a gc_deinit (which doesn't even > exist). > Leak appear in the call of gcry_check_version. From Valgrind log: Thanks, I believe this is a known issue with libgcrypt. The memory should not increase even if you init/deinit several times, as far as I understood, though. One of my goal is to make libgcrypt optional (although preferred), but creating an abstract interface for the public-key operations required some effort, and I don't have any resources to finish it right now. It is possible to use Nettle for non-PK operations (hashing, symmetric ciphers) today, though, but libgcrypt is still required. Thanks, Simon From jas at extundo.com Sat Feb 12 16:51:02 2005 From: jas at extundo.com (Simon Josefsson) Date: Sat Feb 12 16:47:44 2005 Subject: [gnutls-dev] Re: prototype shadowing warning In-Reply-To: (Neil Spring's message of "Sun, 6 Feb 2005 12:09:18 -0500") References: Message-ID: Neil Spring writes: > Hi, Hello! > Please avoid using "index", "time" and "exp" as parameter names in > function prototypes in header files to avoid -Wshadow warnings. > Warnings follow. (yeah, I know the compiler should be a little smarter, > but then again, "index" and "time" aren't very descriptive names for > parameters.) > > Sorry I'm so picky. Not at all, I agree completely. Should be fixed in CVS now, please verify. I have added -Wshadow to the CFLAGS that are added by --enable-developer-mode. Hopefully I (or someone else) will get annoyed at the warnings and fix them eventually, there were quite a few of them. Further, the function prototypes seem to be duplicated in several places in includes/gnutls/ and lib/, I think we should try to only have function prototypes in one place. It is less work to maintain all copies. Thanks, Simon From klchan at citic1616.com Wed Feb 16 04:30:45 2005 From: klchan at citic1616.com (lok) Date: Wed Feb 16 05:04:52 2005 Subject: [gnutls-dev] how to use libtasn1on window platform ? Message-ID: <4212BE65.5000304@citic1616.com> hi, i am going to write a program which get a ASN.1 definition file and then decode binary file and print out the data with well format (indentation, type name is required, etc) can i compile libtans1 with MS VC6 ? regards, lok From jas at extundo.com Wed Feb 16 10:46:22 2005 From: jas at extundo.com (Simon Josefsson) Date: Wed Feb 16 10:42:47 2005 Subject: [gnutls-dev] Re: how to use libtasn1on window platform ? In-Reply-To: <4212BE65.5000304@citic1616.com> (lok's message of "Wed, 16 Feb 2005 11:30:45 +0800") References: <4212BE65.5000304@citic1616.com> Message-ID: lok writes: > hi, > > i am going to write a program which get a ASN.1 definition file and then > decode binary file and print out the data with well format (indentation, > type name is required, etc) Hello. Neat. > can i compile libtans1 with MS VC6 ? Should work. There are some alloca issues in general, but it may work without any changes. If you run into problems, please let us know. If there is anything libtasn1 can do to make it easier to use under MS, I'm interested in adding it. Regards, Simon From klchan at citic1616.com Mon Feb 28 04:18:12 2005 From: klchan at citic1616.com (lok) Date: Mon Feb 28 04:14:24 2005 Subject: [gnutls-dev] Re: how to use libtasn1on window platform ? In-Reply-To: <4212BE65.5000304@citic1616.com> References: <4212BE65.5000304@citic1616.com> Message-ID: <42228D74.1050309@citic1616.com> i executed asn1Decoding.c to test decoding my input argument list: "c asn1Coding_test.asn asn1Coding_test.asg Test" it parsed the asn file successfully but failed on decoding bin file: "Parse: done. Decoding: TAG_ERROR asn1Decoding: :: tag error near element 'ROOT' DECODING RESULT: " why the decode process failed ? can anyone provide other sample asn file and binary file for me to test ? thx regards, lok From klchan at citic1616.com Sat Feb 26 03:35:18 2005 From: klchan at citic1616.com (lok) Date: Mon Feb 28 18:24:01 2005 Subject: [gnutls-dev] Re: how to use libtasn1on window platform ? References: <4212BE65.5000304@citic1616.com> Message-ID: i built the lib successfully and i modified asn1Decoding.c to test the lib asn1_parser2tree return ASN1_SUCCESS on asn file "test\Test_parser.asn" also i tried the asn file "src\asn1Coding_test.asn" and bin file "\src\asn1Coding_test.asg" it parsed the asn file successfully but failed on decoding bin file: "Parse: done. Decoding: TAG_ERROR asn1Decoding: :: tag error near element 'ROOT' DECODING RESULT: " my input argument list: "c asn1Coding_test.asn asn1Coding_test.asg Test" can anyone provide other sample asn file and binary file for me to test ? thx regards, lok