Commit Graph

31 Commits

Author SHA1 Message Date
Lucas De Marchi 5a8a8c9014 Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci

This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:

code before patch               ||code after patch
===============================================================

return a == NULL;                 return !a;

return a != NULL;                 return !!a;

func(a == NULL);                  func(!a);

func(a != NULL);                  func(!!a);

b = a == NULL;                    b = !a;

b = a != NULL;                    b = !!a;

b = a == NULL ? c : d;            b = !a ? c : d;

b = a != NULL ? c : d;            b = a ? c : d;


other cases:

a == NULL                         !a
a != NULL                         a




SVN revision: 51487
2010-08-21 13:52:25 +00:00
Sebastian Dransfeld 1c05469785 fix stupid align of *
SVN revision: 50721
2010-07-31 18:57:35 +00:00
Sebastian Dransfeld 5d1a9f4e0d remove space after *
SVN revision: 50719
2010-07-31 18:54:54 +00:00
Carsten Haitzler f7019f134d formatting. <- uncrustify
SVN revision: 50698
2010-07-31 01:54:48 +00:00
Carsten Haitzler 926db95c54 testing uncrustify on eet. this shall be standard efl formatting from
now on. you may run indent on code and convert to your own formatting
if you want.. but all code MUST be "uncrustified" before being
cxommitted to svn or before generating patches. time to get the
formatting monster under control.



SVN revision: 50563
2010-07-28 01:45:57 +00:00
Lucas De Marchi 2a84379ba9 Remove unneeded code with notnull.cocci script
The notnull.cocci script from Coccinelle finds places where you check if a
variable is NULL, but it's known not to be NULL. The check can be safely
removed. For example, this code would be caught by notnull:

if (!var) return;
if (var && var->fld) { ... }

It's needless to check again if var is not NULL because if it's in fact NULL,
it would have returned on the previous "if". This commit removes all the
trivial places where this pattern happens. Another patch will be generated for
the more complex cases.


SVN revision: 50241
2010-07-14 02:05:47 +00:00
Cedric BAIL 3cf2432589 * eet: Zero cipher material as soon as possible. Prevent information
leak of temporary data in memory, so improve security.



SVN revision: 45630
2010-01-27 17:53:07 +00:00
Vincent Torri 15d7b45c23 eet_cipher.c: Fix arithmetic pointer on void *
SVN revision: 45211
2010-01-16 12:07:18 +00:00
Cedric BAIL e24ddfb0a0 * eet: Correctly detect GNUTLS hability.
SVN revision: 44548
2009-12-18 17:41:43 +00:00
Cedric BAIL 3927d4a74f * eet: Revert back some INF macro to fprintf as this is not for logging purpose.
SVN revision: 42901
2009-10-06 12:07:29 +00:00
Vincent Torri d26955c432 remove useless Eina_Log macros. Patch by Mathieu Taillefumier.
SVN revision: 42850
2009-10-02 03:59:17 +00:00
Gustavo Sverzut Barbieri 183237e348 improve logging messages introduced by Mathieu Taillefumier.
move some to error/critical, remove trailing \n.

NOT doing ChangeLog entry on purpose, it's useless as it's an
intra-release change (changes the previous unlreleased change)



SVN revision: 42547
2009-09-17 14:33:06 +00:00
Cedric BAIL cab54bd121 * eet: Use eina_log.
Patch from Mathieu Taillefumier <mathieu.taillefumier@free.fr>.


SVN revision: 42492
2009-09-15 11:22:11 +00:00
Vincent Torri 5c8b90d23c add alloca() declaration
SVN revision: 41874
2009-08-19 10:58:38 +00:00
Cedric BAIL 0e2a57f8c8 * eet: Fix compilation when disabling signature, with gnutls enabled.
SVN revision: 41256
2009-07-06 13:25:29 +00:00
Cedric BAIL 1ad8971a15 * eet_cipher: Fix memory leak.
SVN revision: 40135
2009-04-17 14:00:31 +00:00
Cedric BAIL 52c7896045 * eet: Add a faster way to compute signature. But currently need my pending patch to GnuTLS
(I need to sign and send this assigment paper) to be usefull.


SVN revision: 40104
2009-04-16 12:15:56 +00:00
Cedric BAIL bd0d413ffe * eet/src/lib/eet_cipher.c: Report size as expected by API.
SVN revision: 39424
2009-03-09 15:52:14 +00:00
Cedric BAIL 970a2eb7bd eet: Including two times the same header is useless in the best case.
SVN revision: 39334
2009-03-02 15:39:10 +00:00
Cedric BAIL 1d1335498c eet: Fix memleak during cipher.
SVN revision: 39331
2009-03-02 14:43:57 +00:00
Vincent Torri ca37104eb5 do not include unistd.h if vc++ is used
SVN revision: 39103
2009-02-19 20:31:21 +00:00
Cedric BAIL 5f0475267c * eet/src/lib/Eet.h,
* eet/src/lib/eet_lib.c,
	* eet/src/lib/eet_cipher.c,
	* eet/src/lib/Eet_private.h: Add a function to retrieve SHA1 of an associated Eet_File.

	Note: Sadly GnuTLS doesn't seem to provide a gnutls_x509_crt_verify_hash function.


SVN revision: 38982
2009-02-09 13:53:20 +00:00
Cedric BAIL fa452d770d * eet/src/lib/eet_cipher.c: Fix a corrupted pointer use.
SVN revision: 38856
2009-01-30 13:50:01 +00:00
Cedric BAIL e678664d12 Remove dead debugging code.
SVN revision: 38352
2008-12-30 11:04:35 +00:00
Cedric BAIL 484f8c1083 Remove useless affectation.
SVN revision: 38349
2008-12-29 16:59:47 +00:00
Cedric BAIL 9c381ceb1f Better error handling with eet identity.
SVN revision: 37937
2008-12-05 09:42:06 +00:00
Cedric BAIL bb9eeaa8f0 Add a function to get the raw signature data.
SVN revision: 37809
2008-11-26 10:45:47 +00:00
Cedric BAIL febbf0ab0f Make password callback work (PKCS8 support), fix minor bugs and add more tests.
SVN revision: 37625
2008-11-14 17:34:51 +00:00
Cedric BAIL 059a224215 Oops, forgot to commit this file. Crypto should now work.
SVN revision: 37614
2008-11-14 09:01:11 +00:00
Gustavo Sverzut Barbieri ca1c7d5bfc fix typo: cypher -> cipher
also reduce scope of ciphered and ciphered_len.


SVN revision: 37609
2008-11-13 20:49:18 +00:00
codewarrior e66c00cad3 rename, build still doesnt work for gnutls.
SVN revision: 37604
2008-11-13 19:26:28 +00:00