Commit Graph

194 Commits

Author SHA1 Message Date
Vincent Torri da7d129e2d * remove the inclusion of config.h in Eet_private.h (not needed)
* add config.h in all source file to be consistent, even if it
   is not necessary
 * formatting


SVN revision: 41941
2009-08-23 09:36:43 +00:00
Cedric BAIL fe553249ef * eet: Fix initialization for system that don't support SECMEN.
Note that I don't like this solution, but I didn't see any better one.


SVN revision: 41481
2009-07-23 09:53:44 +00:00
Cedric BAIL 0a6ef8bbde * eet: Reorder gcry init so that it's correctly taken into account by gcry.
SVN revision: 41279
2009-07-08 14:43:20 +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 c392637d27 * eet_lib: Prevent double init of gcry.
SVN revision: 39716
2009-03-25 16:26:46 +00:00
Carsten Haitzler f41991c662 disable fsync
SVN revision: 39542
2009-03-18 01:47:33 +00:00
Gustavo Sverzut Barbieri 3ca2a97471 make sure data is on disk, don't get empty files on ext4/ext3=writeback.
Ok, raster said it would not happen but just crashed my machine and
e.cfg was lost due ext4 being in writeback by default. Accordingly to
Theodore Ts'o
(http://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync/) we
should fsync even on open-write-close+rename case.



SVN revision: 39536
2009-03-17 20:49:36 +00:00
Gustavo Sverzut Barbieri b95c69d2f5 Fix problem reported by clang.
TODO: we should review sign of length attributes and make them
consistent whenever possible.

By: Luis Felipe Strano Moraes



SVN revision: 39258
2009-02-26 22:14:14 +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
Vincent Torri 49f3d0134f Include winsock2.h before time.h. Requested by vc++
SVN revision: 39102
2009-02-19 20:17:14 +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 69f1a6a61e Remove dead assignment and change condition for easier match.
SVN revision: 38344
2008-12-29 10:51:38 +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 0f36b190f1 Add crypto support to eet.
GNUTLS support by Arnaud de Turckheim <quarium@gmail.com>.


SVN revision: 37603
2008-11-13 16:31:13 +00:00
Cedric BAIL 1e13a4aec2 Use eina conversion functions (Remove code from eet).
SVN revision: 36844
2008-10-20 09:44:34 +00:00
Cedric BAIL 6ee6cdeeb3 Correctly use ferror.
SVN revision: 36617
2008-10-13 12:09:31 +00:00
Cedric BAIL 2127e5c551 Remove more compiler warning.
SVN revision: 36614
2008-10-13 11:51:10 +00:00
Cedric BAIL a3b343baa5 Fix memory leak with a proper shutdown of Openssl, thanks to Massimiliano Calamelli help.
SVN revision: 36095
2008-09-19 11:30:42 +00:00
Cedric BAIL ac440b9533 Fix typo in the typo.
SVN revision: 35957
2008-09-11 14:49:47 +00:00
Cedric BAIL be3676ef9a Fix typo.
SVN revision: 35951
2008-09-11 14:07:02 +00:00
Cedric BAIL 1e0d00d4bd Use the right function here.
SVN revision: 35947
2008-09-11 11:25:15 +00:00
Cedric BAIL facaddde1f Ok, the patch didn't apply cleanly and some missed. Last lost change.
SVN revision: 35887
2008-09-08 11:53:59 +00:00
Cedric BAIL bbc107fc31 Another typo.
SVN revision: 35884
2008-09-08 11:17:04 +00:00
Cedric BAIL 114c50a297 Typo.
SVN revision: 35883
2008-09-08 11:11:51 +00:00
Cedric BAIL 46b7796946 Add signature support in eet.
You can use eet -s to sign a eet file and eet -c to check its signature. The
current code doesn't check any certificate trust path, only if the signature
match the certificate and that the certificate could be loaded. If that's not
the case, eet_open will fail. If the file is not signed, eet_open will just
continue to succeed.



SVN revision: 35882
2008-09-08 09:19:57 +00:00
Cedric BAIL 89be633ae4 Add the prototype for this long pending function in eet.
SVN revision: 35811
2008-09-03 13:52:45 +00:00
Cedric BAIL 27042fd8fc Recommit Joerg Sonnenberger patch with more fix.
When writing jpeg scanline, it wouldn't fail with FILE* as an output, but will
with a data buffer. So we need to re run the jpeg routine on this scanline. As I
don't know if the buffer is always preserved during two calls to the jpeg
library, I am copying it again.



SVN revision: 35804
2008-09-03 11:04:37 +00:00
Carsten Haitzler 6ffa97b1f5 roll back eet change (revert patch) as this breaks bsd and seems to cause
other issues for other people too (not me though)...



SVN revision: 35797
2008-09-03 01:34:53 +00:00
Cedric BAIL 8c7b666b6e Little bit modified patch from Joerg Sonnenberger that remove the need for
memfile.

It pass all the image test of the test suite with some little modification.
E seems to run fine with it and my apps also. But if you experience error
with eet and compressed picture, please report them to me.



SVN revision: 35795
2008-09-02 16:12:05 +00:00
Cedric BAIL 89911e0559 Fix two source of memory leak.
SVN revision: 35616
2008-08-22 14:35:21 +00:00
Cedric BAIL e3d6b72073 Fix a typo that prevent some valid file to be loaded.
SVN revision: 35584
2008-08-20 15:35:15 +00:00
Cedric BAIL c35c6bafa3 Delay unlink and reopen as long as possible in read/write mode.
SVN revision: 35462
2008-08-13 16:40:53 +00:00
Cedric BAIL 77bb260256 Improve decode speed by using precomputed hash.
SVN revision: 35140
2008-07-17 15:33:40 +00:00
Gustavo Sverzut Barbieri ed239be74a Check if file was really open before continue.
If we tried to create the new rw file, we must check if it was created
fine before continue, lots of errors are possible there, but mine was
creating the file inside an nonexistent directory.


SVN revision: 34928
2008-06-27 22:05:49 +00:00
Gustavo Sverzut Barbieri 83b37319b9 Initialize ef->writes_pending.
Valgrind just noticed that "writes_pending" was not being initialized,
probably because some old code used calloc() (based on the comment
at the allocation step).


SVN revision: 34777
2008-06-09 03:19:25 +00:00
Carsten Haitzler f153d22daf leak--
SVN revision: 34776
2008-06-09 03:07:35 +00:00
Carsten Haitzler 43821d36e4 * add efreet garbage data check
* remove printfs that clutter output
* add efreet file type check - only parse regular files
* chekc mmap returns correctly for MAP_FAILED results
* edje has some stubs for adding script-only objecvts - but nothing useful
right now


SVN revision: 34689
2008-05-29 02:00:04 +00:00
Cedric BAIL f89bed55e3 Disabling support of old eet file format was broken.
SVN revision: 34681
2008-05-27 13:50:40 +00:00
Cedric BAIL 09e1b5d7da Remove all use of strcpy as we already know the length.
SVN revision: 34617
2008-05-19 15:25:46 +00:00
Cedric BAIL 6226ef6b93 Old eet file format are now marked as deprecated. The plan is to let the
support enable by default for some time, then make desactivate it and finaly
we will remove it completely at some point.


SVN revision: 34616
2008-05-19 15:23:41 +00:00
Cedric BAIL d7cf02c1b5 Add some test around efn->offset and set it properly in all case.
SVN revision: 34590
2008-05-16 14:03:11 +00:00
Cedric BAIL ecda494197 Fix EET_FILE_MODE_READ_WRITE when file doesn't exist.
SVN revision: 34588
2008-05-16 10:00:54 +00:00
Carsten Haitzler 80c1db4f0c bitching--
SVN revision: 34236
2008-04-10 09:12:43 +00:00
doursse 5e7b84a40e cegcc (not mingw32ce) defines same structures, functions etc. in both in.h and winsock2.h. So do not include winsock2.h with that compiler
SVN revision: 34227
2008-04-09 08:27:17 +00:00
Kim Woelders 6b6110104c Add unistd.h for unlink(), comment out unused code.
SVN revision: 34182
2008-04-03 19:30:08 +00:00
doursse 741b44f6e2 remove trailing spaces and factorize Windows detection
SVN revision: 34135
2008-03-29 07:28:18 +00:00
Carsten Haitzler 4efdc2e78d add string.h
SVN revision: 34131
2008-03-28 17:29:22 +00:00
doursse 59a88b9bc8 reorganise header files so that evil is better included. Please test before the release.
SVN revision: 34130
2008-03-28 17:17:43 +00:00
Carsten Haitzler 42d262f5f3 up eet to alpha status. see email to e-devel.
SVN revision: 34127
2008-03-28 14:37:29 +00:00
Carsten Haitzler fcf201dea7 the rest of cedrics patchesfor fixing dictionaries and read_write
SVN revision: 33969
2008-03-09 16:16:40 +00:00
doursse bb32035399 * define EAPI on Windows according to the following scheme:
- if Eet is built:
     . if the shared lib is built, EAPI must be __declspec(dllexport)
     . if the static lib is built, EAPI must be empty
   - otherwise EAPI must be __declspec(dllimport)
 * move config.h from Eet_private.h to source files so that
   EAPI is correctly defined in Eet.h
 * add notes for compilation with cegcc and mingw32ce in INSTALL
 * add support for compilation with cegcc
 * add indentation information for vi
 * remove trailing spaces


SVN revision: 33959
2008-03-08 07:28:12 +00:00
doursse a3b06c3a70 * EAPI_DEF is actually useless. go back to EAPI
before using the correct way to deal with
   dllimport / dllexport on Windows
 * remove some trailing spaces


SVN revision: 33949
2008-03-07 09:59:37 +00:00
Carsten Haitzler b65d63440f add cedrics dict check patch
SVN revision: 33946
2008-03-06 17:52:59 +00:00
doursse c0414ae96c use evil on win32:
* remove all the specific win32 code
 * replace EAPI by EAPI_DEF in front of definitions of funtions
 * no need to check windows.h, winsock2.h
 * sys/mmap.h will be detected automatically (thanks to evil on win32)
 * use AC_CHECK_HEADERS instead of AC_CHECK_HEADERS_ONCE as this macro is too recent (from autoconf 2.59c)


SVN revision: 33896
2008-03-02 06:49:48 +00:00
Carsten Haitzler 20d79e8612 fix ref count issues on file modify while in use. lost handles and
dictionaries we depend on.


SVN revision: 33894
2008-03-02 04:56:57 +00:00
Carsten Haitzler e076a78519 cedric's eet and edje patches to use eet dictionaries for strings.
SVN revision: 33873
2008-03-01 06:38:09 +00:00
Sebastian Dransfeld d610a1bd9a include files in the correct order
SVN revision: 33633
2008-01-27 13:17:22 +00:00
Sebastian Dransfeld cb4cc5b6c1 formatting
SVN revision: 33631
2008-01-27 12:56:44 +00:00
Mike Frysinger 5a351ab3da replace some win32 ifdef hacks with autoconf checks
SVN revision: 33617
2008-01-26 05:50:09 +00:00
doursse 0f79f11a02 [win32] use the correct value for an invalid handle and check results. Remove trailing spaces
SVN revision: 33579
2008-01-24 08:41:23 +00:00
Carsten Haitzler b35e3bd260 cedric's eet race patch
SVN revision: 33544
2008-01-21 01:09:51 +00:00
Carsten Haitzler 0112fdc383 patches, caching fixes, zone dynamic creation/deletion handling, stuff.
SVN revision: 33127
2007-12-14 05:57:16 +00:00
ningerso ed6c28dc16 Only enforce file size in read mode, otherwise this breaks parallel builds of
edje files.


SVN revision: 32925
2007-12-01 21:14:25 +00:00
Carsten Haitzler 22dbedf987 refuse to handle a 0 sized file without an error
SVN revision: 32609
2007-11-12 06:15:08 +00:00
doursse e769f25d10 * Add conversion functions to replace the use of snprintf with %a
* remove useless defines
 * minor cleanups

fixes bugs #181 and #182


SVN revision: 31805
2007-09-25 18:26:49 +00:00
Carsten Haitzler 998bf2b2ef consistency - use old style datatypes.
SVN revision: 31670
2007-09-10 15:26:42 +00:00
Carsten Haitzler 0655006f42 and now we have a small tool that can extract, import, list, decode, encode
etc. data from eet files. just run eet for usage.


SVN revision: 31651
2007-09-08 09:35:41 +00:00
Carsten Haitzler 0c4af24a33 save a few bytes by packing structures better... simple savings :)
SVN revision: 30486
2007-06-28 23:22:20 +00:00
Carsten Haitzler 2818ca982a fix custom file info to be less delicate - not perfectly correct but it wont
lose all your data if e segv's or is kill -9'd anymore. eet handles multiple
writes to the same key now by overwriting the previous data


SVN revision: 30057
2007-05-23 12:07:14 +00:00
Carsten Haitzler bcbc04daf5 usless if's
SVN revision: 29799
2007-05-02 11:08:41 +00:00
doursse 9373a62203 fix compilation with MinGW
SVN revision: 28080
2007-01-20 15:20:23 +00:00
Sebastian Dransfeld 98b5b625ab Move hash gen func to own file.
SVN revision: 27605
2006-12-28 15:23:47 +00:00
Carsten Haitzler 3d832540ff safe reading of mmap! corupt eet/edje files would segv e!
SVN revision: 26659
2006-10-16 15:02:11 +00:00
Carsten Haitzler 8be34cd07c fix mmap bug
SVN revision: 25871
2006-09-16 05:57:36 +00:00
Carsten Haitzler 31e1675f52 fix segv!
SVN revision: 25177
2006-08-28 13:22:16 +00:00
David Walter Seikel 35d34dee92 The comment does say "Allocate struct for eet file and have it zero'd
out" but using calloc is inefficient since most members of the struct
are written to straight away.  Valgrind complains that the data member
can sometimes be used without being initialised.  Seems to happen when
we can't open it and eet_close tests the value of the data member.

Those that know this code better than me should check this. Probably a
good idea to initialise ALL members at this point.


SVN revision: 24848
2006-08-17 20:22:23 +00:00
Carsten Haitzler 5aa07e60c6 eet return ferror right
SVN revision: 24729
2006-08-15 06:45:51 +00:00
ningerso 39f349047f Need sys/types.h before sys/mman.h on OS X, and possibly other BSD based
systems.


SVN revision: 24188
2006-07-25 09:47:47 +00:00
Carsten Haitzler f1316fa8e9 unaligned int access - fix.
SVN revision: 23702
2006-07-03 20:15:54 +00:00
Carsten Haitzler 268c8107f0 clear cache on shutdown
SVN revision: 23536
2006-06-22 19:22:26 +00:00
Carsten Haitzler ba54808ee8 actually close files
SVN revision: 23535
2006-06-22 19:21:31 +00:00
Carsten Haitzler 3a85bfb709 cedric's mmap patch
SVN revision: 23413
2006-06-13 10:20:22 +00:00
sebastid 74681bc617 Return error
SVN revision: 23033
2006-05-31 19:13:51 +00:00
Carsten Haitzler f019dcad07 return write errors on close.
SVN revision: 22758
2006-05-20 02:44:24 +00:00
stffrdhrn 4c5b9e1f24 More cleanups:
* fix more requirements for const


SVN revision: 20985
2006-03-04 02:46:24 +00:00
stffrdhrn e2074460ce Clean ups
* char * -> const char * where needed


SVN revision: 20984
2006-03-04 02:11:03 +00:00
Carsten Haitzler d08bfbb6c6 ok- visibility disabled for now - works on x86 32bit. amd64 is broken (gcc
bug it seems) need to explore this more.


SVN revision: 19680
2006-01-10 07:32:56 +00:00
Carsten Haitzler 7554f8ee36 actually make symbol hiding work!
SVN revision: 19314
2005-12-27 17:17:31 +00:00
tsauerbeck 8176b2c5fa more code cleanup
SVN revision: 18714
2005-11-29 18:49:30 +00:00
tsauerbeck e2aff84f25 code cleanup
SVN revision: 18702
2005-11-29 11:44:51 +00:00
Carsten Haitzler 889accc343 LEAK! fix.
SVN revision: 18357
2005-11-07 06:16:26 +00:00
Carsten Haitzler 09e699d360 avoid fd overflow.
SVN revision: 18356
2005-11-07 03:15:22 +00:00
sebastid 2ea1cbcc22 remove strdup
SVN revision: 18288
2005-11-04 18:29:02 +00:00
sebastid fb95ab1814 Delay string duplication until necessary.
Fix leak.


SVN revision: 18287
2005-11-04 17:44:01 +00:00
Carsten Haitzler 4c88b00112 reduce some allocs
SVN revision: 18260
2005-11-04 03:22:22 +00:00
Carsten Haitzler 51a616eda7 cacheburst works again
SVN revision: 18251
2005-11-03 15:05:21 +00:00
Carsten Haitzler e114a02062 add a cache burst mode
SVN revision: 18248
2005-11-03 13:05:52 +00:00
Carsten Haitzler 234beef243 dont double free IF we happen to ref < 0 (not really possible tho)
SVN revision: 15986
2005-08-01 13:53:17 +00:00
tsauerbeck 216c51ea31 added eet_num_entries()
SVN revision: 15785
2005-07-15 20:37:29 +00:00