Commit Graph

171 Commits

Author SHA1 Message Date
Stef Walter
5910155863 Makefile.am Fix build of vala tests
valac is very hard to make happy
2014-03-04 21:20:41 +01:00
Stef Walter
a1036d0053 Makefile.am: Quiet down one last rule 2014-03-04 21:20:25 +01:00
Stef Walter
59a8238971 libsecret: Fix documentation typos 2014-03-04 14:15:43 +01:00
Stef Walter
6b7d643929 libsecret: Add secret_service_encode_dbus_secret() and opposite
Add secret_service_encode_dbus_secret() and
secret_service_decode_dbus_secret() functions for encoding
and decoding the Secret Service API DBus structs that carry
secrets on the wire.

These are not added to the stable or scripting APIs.
2014-03-04 14:15:27 +01: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
Stef Walter
66e8949b7b Remove unstable vapi
Just use the main vapi, and expect people to define the relevant
SECRET_WITH_UNSTABLE preprocessor macro.

https://bugzilla.gnome.org/show_bug.cgi?id=721429
2014-01-04 11:17:18 +01:00
Ryan Lortie
0257a68106 libsecret: more sed portability changes
As per POSIX, a '\' and a newline is expected after the 'i' command.

https://bugzilla.gnome.org/show_bug.cgi?id=720087
2013-12-16 17:35:54 +01:00
Stef Walter
dd6fcf87bb Mark most of unstable API as stable
This is with the exception of the 'path' functions.
2013-12-11 10:57:22 +01:00
Stef Walter
71e2791ea3 secret-prompt: Use string window ids
This is more portable and exposes what's actually in the Secret
Service API. This change was made before going stable with the
prompting functions.
2013-12-11 10:57:22 +01:00
Stef Walter
d743d4dbcc tests: Fix up the javascript and python tests 2013-12-11 10:12:51 +01:00
Stef Walter
37d1b73c25 tests: Stop when either the javascript or python tests fail 2013-12-11 10:12:51 +01:00
Stef Walter
7b7e886288 test-attributes: Remove deprecated use of g_test_trap_fork() 2013-12-11 10:12:51 +01:00
Stef Walter
8d297361de libsecret: Don't use non-portable sed -i shell command
https://bugzilla.gnome.org/show_bug.cgi?id=720087
2013-12-11 10:12:50 +01:00
Stef Walter
482dc34d74 Fix documentation warnings 2013-12-11 08:26:58 +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
5c9001ab6f Clarify documentation for secret_service_clear_xxx()
https://bugzilla.gnome.org/show_bug.cgi?id=705629
2013-08-07 21:08:26 +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
bdbdadf40c Pass return_type to prompt async begin functions, rather than finish
Much like g_dbus_connection_call() we now pass our return_type value
when starting the async operation. This unbreaks vala and various
other bindings that make assumptions about the form of xxx_finish()
async calls.

This is an API/API break, but its to the portion of the library
marked as unstable. Only used by seahorse (in jhbuild) and updated
usage there.
2013-06-21 15:11:14 +02:00
Stef Walter
d6367b1de0 Simpler way to use custom service/collection/item types
The previous way of setting collection_gtype and item_gtype
on SecretServiceClass was not very bindings friendly. Instead
allow per instance virtual functions to return the GTypes.
2013-06-21 15:11:14 +02:00
Stef Walter
143f00ceef collection: Have gobject-introspection and glib-mkenums recognize flags
Recognize flags correctly by putting << in their enum values. This
is pretty ugly and I wish there was an annotation.
2013-06-21 15:11:14 +02:00
Stef Walter
1758194f26 service: Rename secret_service_new() and friends to open()
The _new() suffix confuses vala and gobject introspection thinking
that it's a constructor, and there's no way to tell it otherwise. And
things really get messy because they're async functions.

So while we're still unstable, rename these functions to
secret_service_open() secret_service_open_sync() and
secret_service_open_finish().

This is an API/API break, but its to the portion of the library
marked as unstable. Only used by seahorse (in jhbuild) and updated
usage there.
2013-06-21 15:11:14 +02:00
Stef Walter
cec740fea9 Add secret_value_get_text() function to return NULL terminated secret 2013-06-21 15:11:14 +02:00
Jiří Klimeš
227a5b2904 Fix return types in secret_service_search_finish() on error paths
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=698040
2013-06-21 15:11:14 +02:00
Peter Bloomfield
3cb4f0e178 Do not quote NULL sentinel
https://bugzilla.gnome.org/show_bug.cgi?id=695791
2013-03-14 06:52:42 +01:00
Claudio Saavedra
ab239c7f6b secret-value: allow empty strings
Passwords and other secrets are allowed to be empty strings, therefore
the check for length != 0 is wrong.

Add tests for empty SecretValue contents.

https://bugzilla.gnome.org/show_bug.cgi?id=694787
2013-03-04 09:33:26 +02:00
Claudio Saavedra
261749ec77 secret-attributes: improve validation of attributes table
Attributes table that are built by the library itself contain
the xdg:schema meta-attribute. Additionally,
secrets with a SECRET_SCHEMA_COMPAT_NETWORK schema might also have
libgnomekeyring specific meta-attributes (prefixed 'gkr'). During
validation, ensure that the former is consistent with the name
of the schema and ignore the latter.

Add tests for these changes

https://bugzilla.gnome.org/show_bug.cgi?id=694107
2013-02-26 19:30:33 +01:00
Stef Walter
ddd9bdd2e9 Fix introspection for secret_value_get() to return a uint8
This works around a crash in pygobject.

https://bugzilla.gnome.org/show_bug.cgi?id=694448
2013-02-26 15:55:49 +01:00
Stef Walter
0e9870bd35 Try to unlock locked collection when storing an item
And add tests to verify this behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=693723
2013-02-19 07:08:57 +01:00
Stef Walter
c2d6affadd Use correct annotations for Gio.DBusProxy 2013-02-13 17:19:02 +01:00
Stef Walter
f4e4ed10da Release version 0.12 2012-11-21 17:54:08 +01:00
Stef Walter
fb5f66296f Don't print messages when creating default collection
* This is expected behavior, so don't complain.

https://bugzilla.gnome.org/show_bug.cgi?id=688165
2012-11-14 11:11:23 +01:00
Stef Walter
a23ee598c7 Rework how we strip remote DBus errors
* This is necessary because sometimes we don't want to complain,
   for expected errors, when running nested operations.
 * The fact that we have to do this is silly, and soon there
   will be a solution in glib itself.

https://bugzilla.gnome.org/show_bug.cgi?id=688165
2012-11-14 11:11:23 +01:00
Stef Walter
430b217e3e Translated label for automatically created default keyrings
https://bugzilla.gnome.org/show_bug.cgi?id=688165
2012-11-14 11:11:23 +01:00
Stef Walter
afc1d65679 When storing a secret, create default keyring if necessary
* If the default keyring does not exist when storing a secret
   try and create it.
 * We handle both secrets that correctly return NoSuchObject
   and ones that just return the silly DBus UnknownMethod error.

https://bugzilla.gnome.org/show_bug.cgi?id=688165
2012-11-14 11:11:23 +01:00
Stef Walter
4eb3c4577e Fix collection creation bugs in mock service
* Guarantee that collections have unique paths
 * Set the alias of new collections correctly

https://bugzilla.gnome.org/show_bug.cgi?id=688165
2012-11-14 11:11:23 +01:00
Stef Walter
21f2ccea31 Share the memory pool with the gcr or libgnome-keyring library. 2012-10-27 12:46:59 +02: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
Stef Walter
24cc1e118f Fix for glib deprecations
* g_type_init() was deprecated in glib 2.35.0
2012-10-22 20:50:48 +02:00
Stef Walter
7e02a594a7 Better critical preconditions for invalid attributes
* When passing NULL for a string vararg attribute print
   a critical warning.
 * Make all attribute warnings critical
 * Add tests for the various critical warnings

https://bugzilla.gnome.org/show_bug.cgi?id=686015
2012-10-12 18:28:14 +02:00
Stef Walter
131f2b209d Fix gcc warning about uninitialized warning 2012-08-20 15:58:26 +02:00
Evan Nemerson
8f3387cacc vala: use nodist sources for vala test cases
https://bugzilla.gnome.org/show_bug.cgi?id=681330
2012-08-16 11:30:14 +02:00
Stef Walter
4001cdf871 Don't link to secure memory code twice
* This leads to problems with the tests not being able to free
   non-pageable memory returned from libsecret-testable.so
2012-08-06 16:08:13 +02:00
Stef Walter
18e125d462 More licensing tweaks
* Actually include in the tarball the other licenses for test code
 * Refer to COPYING.TESTS not COPYING.GPL

https://bugzilla.gnome.org/show_bug.cgi?id=681302
2012-08-06 16:08:13 +02:00
Matthias Clasen
9011932730 Actually export SECRET_SCHEMA_NOTE
The regex for exported symbols was keeping the predefined
schemas from being available to outside users of the library.
This was showing up as a link error for seahorse, which is
trying to use SECRET_SCHEMA_NOTE.

https://bugzilla.gnome.org/show_bug.cgi?id=681255
2012-08-06 08:31:14 -04:00
Stef Walter
e43cba8174 Fix up libsecret licensing
* License libsecret under LGPL2.1+. We can do this because the
   files that make up the library are either LGPL2.0+ or LGPL2.1+
 * Correctly include a file which contains the full texts of the
   various licenses used in the tests.
 * Include license headers in some files that contained no license
   headers.

https://bugzilla.gnome.org/show_bug.cgi?id=680781
2012-08-06 11:25:08 +02:00
Stef Walter
66a7a81216 Fix introspection tests
* Regressed due to hiding of internal symbols in libsecret.so and
   creation of a separate libsecret-testable.so library
2012-07-31 14:56:52 +02:00
Stef Walter
e34381276e Set correct module flags on libsecret
* Pointed out by Robert Ancell

https://bugzilla.gnome.org/show_bug.cgi?id=680207
2012-07-24 06:24:05 +02:00
Stef Walter
45e01e6600 Match schema names for notes and network passwords
* These are old item types from libgnome-keyring, and
   gnome-keyring-daemon has special code to generate the
   schema for these types of items.
2012-07-14 13:25:39 +02:00
Stef Walter
ebc65dba98 Remove multiple definitions of SecretCollection
https://bugzilla.gnome.org/show_bug.cgi?id=679913
2012-07-14 13:23:16 +02:00
Stef Walter
ce03e082a2 Remove empty secret-unstable.h file 2012-07-14 12:11:02 +02:00
Stef Walter
f4d8fc4751 Add flags argument to secret_collection_for_alias()
* Can control whether items are loaded or not.
2012-07-14 12:09:38 +02:00
Stef Walter
56ece9eff0 Correct flags for SecretCollection
* The SECRET_COLLECTION_LOAD_ITEMS flag was always set
2012-07-14 12:09:10 +02:00
Stef Walter
49cdaf5df8 Release version 0.6 2012-07-14 09:07:20 +02:00
Stef Walter
e0ba10ee09 Rename secret_password_remove() to secret_password_clear()
* It's clearer what happens here: we try to remove as many matching
   passwords as possible.
 * Also rename secret_service_remove() to secret_service_clear()
 * Rename secret_password_clear() which used to wipe password memory
   to secret_password_wipe().
2012-07-14 08:20:32 +02:00
Colin Walters
7efb4d5073 build: Disable parallelism in tests 2012-07-13 17:54:25 -04:00
Colin Walters
19eb104158 build: Fix parallel make issue
SecretUnstable.gir depends on Secret.gir, which in turn depends
on the stuff that was previously listed.
2012-07-13 17:50:22 -04:00
Stef Walter
69fd67ae19 Properly refer to the fact that multiple passwords may be removed. 2012-07-13 16:08:36 +02:00
Colin Walters
6422acd085 build: Various introspection-related build fixes
Don't set PKG_CONFIG_PATH, this breaks jhbuild; instead, use
--include-uninstalled to tell the scanner where to find internal
libraries.

Don't set _PACKAGES = gio-2.0; we already pick that up from the
Gio-2.0.gir.

https://bugzilla.gnome.org/show_bug.cgi?id=679852
2012-07-13 15:26:28 +02:00
Stef Walter
5d725daf29 Clearer warning when using unstable parts of API 2012-07-13 14:03:04 +02:00
Stef Walter
79d1f4b718 The secret_attribute_build() functions are stable 2012-07-13 14:02:50 +02:00
Stef Walter
561e5c72ba The predefined secret schemas are stable 2012-07-13 14:02:19 +02:00
Stef Walter
4fc7d144bb Search for mock-service-0.vapi in the right directory 2012-07-13 13:33:36 +02:00
Stef Walter
772eef69e6 Documentation fix for SecretItem:flags 2012-07-13 13:33:23 +02:00
Stef Walter
77f8368a3a Install headers to libsecret-1 instead of secret-1
* Clearer and more consistent
2012-07-13 13:24:34 +02:00
Stef Walter
83c8674a03 Update documentation for to have correct headers
* Add add more warnings to unstable API documentation
2012-07-13 13:04:26 +02:00
Stef Walter
7816417167 Release version 0.5 2012-07-13 12:48:41 +02:00
Stef Walter
1b84a1ad42 More fixes for broken vapi and gir generation
* Man this is brittle
2012-07-13 12:25:10 +02:00
Stef Walter
234855ea7d Bump the library major version number
* We want to settle on 1 after first stable release
 * Since we're going to start patching projects we want this to have
   the pkg-config file be libsecret-1
2012-07-13 12:24:35 +02:00
Stef Walter
a1c3e9bb09 Document how to build with or use libsecret 2012-07-13 12:01:06 +02:00
Stef Walter
994ae44a77 Split the pkg-config files, gir, and vapi into stable/unstable
* C callers need to use libsecret-0 pkg-config file for stable and
   libsecret-unstable for unstable stuff.
 * Vala callers need to '--pkg libsecret-unstable' for unstable
 * GObject Introspection callers need to use the SecretUnstable package
2012-07-13 11:14:34 +02:00
Stef Walter
5cc30b2b68 Rename the library subdirectory to libsecret
* Death by a thousand paper cuts from gir and vapi not liking
   the fact that the secret.h file was not usable uninstalled
   and installed in the same way.
2012-07-13 10:40:25 +02:00