Commit Graph

30 Commits

Author SHA1 Message Date
Niels De Graef
929e5c2a3f Stop using g_assert() in unit tests
Apart from having more developer-friendly messages if the assertions go
wrong, it also prevents the assertions not being run if
`G_DISABLE_ASSERT` is defined (e.g. for performance reasons).
2019-05-12 16:31:37 +02:00
Niels De Graef
b19c309096 Add build support for Meson
To build with meson, use the following commands:

```
$ meson build
$ ninja -C build
 # in case you want to install
$ ninja -C build install
```
2019-01-19 21:03:56 +00:00
Daiki Ueno
ea62c2dcda egg: Fix null termination behavior of egg_secure_strndup()
Even if the given string is shorter than n, the result should be null
terminated.  This matches the behavior of strndup().
2018-03-29 11:31:31 +02:00
Tomasz Miąsko
998065599c DH: Ensure that generated secret occupies the same number of bytes as prime.
https://bugzilla.gnome.org/show_bug.cgi?id=778357
2017-02-28 12:40:30 +01:00
Antonio Murdaca
43cac02864 Fix typos
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Signed-off-by: Stef Walter <stefw@redhat.com>
 * Fix one spelling of 'succeeded'

https://bugzilla.gnome.org/show_bug.cgi?id=763143
2016-03-08 13:32:07 +01:00
Christophe Fergeau
20f35bfd92 build-sys: Update valgrind headers
libsecret ships headers from valgrind, but they seem to come from an old
version. Update to the headers from valgrind-3.11.0-1.fc23.x86_64
in order to get VG_DO_ADDED_LEAK_CHECK definition.

https://bugzilla.gnome.org/show_bug.cgi?id=756766
2015-10-19 12:11:19 +02:00
Stef Walter
5e2fe4afaa egg: Accomodate thread-safe libgcrypt 1.6+
libcrypt no longer supports setting our own threading callbacks,
and is thread-safe if we call gcry_check_version() before creating
threads.

Unfortunately we can't guarantee that we call gcry_check_version()
early enough, we try our best. Most of the callers of libsecret either
don't use libgcrypt, or also initialize it appropriately themselves.

Bump libgcrypt dependency to 1.4.5+, and have earlier versions use
the native pthread implementation of locking.
2014-09-09 15:18:33 +02:00
Stef Walter
b72048c920 Makefile.am: Use a single Makefile.am and parallel tests
Allow parallel building and testing by using a single Makefile.am

Implement parallel testing using TAP, with various drivers and
compilers living in the build/ directory.

Fix all sorts of issues that this caused, including builddir != srcdir,
leaks in tests and so on.

It would have been nice to break out all the above into separate
commits ... blush.
2014-03-04 12:57:19 +01:00
Daniel Mustieles
ec89646b1a Updated FSF's address 2014-01-23 13:00:05 +01:00
Stef Walter
9dc2f2c112 More reliable means of checking if object was finalized
Don't try to use G_IS_OBJECT() to see if an object was finalized
as this segfaults in corner cases, even with our crafty check
for a pointer within our memory space.

https://bugzilla.gnome.org/show_bug.cgi?id=705202
2013-08-15 10:04:30 +02:00
Stef Walter
46fa081063 Use AM_CPPFLAGS instead of INCLUDES
automake 1.13 deprecates the latter
2013-06-21 15:11:15 +02:00
Stef Walter
2e8ee7cdb6 egg: Don't use deprecated g_thread_supported() function
Nowadays glib always supports threading.
2013-02-13 17:18:17 +01:00
Stef Walter
3fcb3979d1 Fix for GStaticMutex deprecations in glib 2013-01-25 19:07:10 +01:00
Stef Walter
446648da52 egg-hex: Bring over changes from gnome-keyring and gcr 2012-11-07 23:15:44 +01:00
Stef Walter
e666db528e Remove some unused test code 2012-11-06 13:37:01 +01:00
Stef Walter
7cea18071b Bring over a new version of the secure memory code from gcr
* This allows libraries to share the pool if they have the same
   version of the secure memory code.
2012-10-27 12:23:39 +02:00
Xi Wang
275d314d57 Fix incorrect loop condition in egg_hkdf_perform()
This does not cause a change in behavior (as evidenced by tests,
at least on linux when built with gcc) but is more correct code,
and less likely to be miscompiled.

The condition (i < 256) in the following loop is always false since i
is of type guchar, which is at most 255.

	guchar i;
	...
	for (i = 1; i < 256; ++i) { ... }

This patch changes i to a larger type gint.

Also in the loop we have:

	gcry_md_write (md2, &i, 1);

change it to use gcry_md_putc().
2012-10-23 21:41:38 +02:00
Stef Walter
125289ae45 Fix license header issues
* Update to LGPL 2.1
 * Fix typos in license comments
 * Update FSF address

https://bugzilla.gnome.org/show_bug.cgi?id=673194
2012-03-31 15:33:25 +02:00
Stef Walter
dd83ac0db3 Only copy the correct amount of bytes from SecretValue
* When transferring to a null-terminated password
2012-03-25 12:17:03 +02:00
Stef Walter
d797ef2ba3 Testing item stuff, and fixing bugs 2012-02-03 20:44:45 +01:00
Stef Walter
dea9a3a043 Test creating items and collections 2012-02-03 20:44:45 +01:00
Stef Walter
f2e275f25e Prompting and item deletion 2012-01-13 14:45:55 +01:00
Stef Walter
a075105bf4 Fix problem when compiling without valgrind 2011-11-19 08:04:28 +01:00
Stef Walter
17fade3173 Implement gsecret_service_get_secrets_for_paths() and friends
* Lots of testing, fine tuning and other bits too.
2011-11-12 08:08:12 +01:00
Stef Walter
4893c73c5b Valgrind integration, refactor build process
* Cleanup secure memory allocator for valgrind.
 * Bring valgrind headers in.
 * Add lots of suppressions for glib, gdbus, gcrypt
 * Fix up a bunch of bugs where things weren't getting freed
 * Add new 'make check-memory' target
2011-11-06 13:41:21 +01:00
Stef Walter
e670fe5645 Fix for deprecations in glib 2.31.0 2011-11-06 13:38:51 +01:00
Stef Walter
51896081f0 Add --enable-debug and --enable-coverage, egg tests etc 2011-09-25 21:20:21 +02:00
Stef Walter
ef85c4ff45 Add dependency on libgcrypt
* This can be disabled using --disable-libgcrypt, which then disables
   encryption of secrets in transit to the secret service
2011-09-25 10:03:48 +02:00
Stef Walter
b1b54f525d More Implementation of GSecretService session related code. 2011-09-25 08:22:36 +02:00
Stef Walter
3dfd7aa70f Initial module setup. Implement GSecretData 2011-08-08 17:43:47 +02:00