Commit Graph

55 Commits

Author SHA1 Message Date
Stef Walter
8583ef53dc secret_service_remove() and secret_password_remove() remove multiple
* Remove all items that are not locked that match in a
   secret_service_remove() and secret_password_remove().
2012-07-10 21:38:48 +02:00
Stef Walter
9c2eca05ff Implement per collection search
* Use the SearchItems dbus method on the Collection interface
 * Tweak some issues with the service search code as well
2012-07-09 11:23:36 +02:00
Stef Walter
30d1337a7c Register secret service errors as DBus errors
* and strip remote error codes from error->message so that
   they don't clutter things.
2012-07-09 11:23:36 +02:00
Martyn Russell
8339f296e8 Don't try to build test-vala-lang if !HAVE_INTROSPECTION or !ENABLE_VAPIGEN
* libsecret-@SECRET_MAJOR@.vapi is built only with those 2 defines and these
  were not checked before depending that target for the test case

Found during jhbuild run
2012-07-08 17:03:04 +01:00
Stef Walter
175ae08984 Disconnect the cached default SecretService if service goes away
* Because the session would no longer be valid if the service
   was autostarted for the same SecretService proxy
2012-07-06 10:08:27 +02:00
Stef Walter
7098b856b7 Rename the functions that operate on a dbus item path
* They all contain '_dbus_path' in their name
 * Move secret_service_get_session_path() to the paths functionality
 * Move the secret_collection_new() and secret_item_new() functionality
   to the path based section.
2012-07-06 09:27:05 +02:00
Stef Walter
3cb0d8047d Make sure notifications come in for new objects before waiting
* In tests make sure notifications settle down before waiting
   on new notifications. This fixes random test crashes.
 * Using async here means all signals are delivered by the time
   we get the new object.
2012-07-05 23:33:08 +02:00
Stef Walter
600021a30b Accept NULL as a SecretService parameter for many methods
* We use secret_service_get() to lookup the default
   SecretService in these cases.
 * Use this functionality in the secret_password_xxx()
   functions to greatly simplify them.
2012-07-05 23:33:08 +02:00
Stef Walter
153dfcec5f Add secret_collection_load_items()
* And flags to prevent loading of items when creating a
   SecretCollection object
 * Rename secret_service_ensure_collections() to
   secret_service_load_collections()
2012-07-05 23:33:07 +02:00
Stef Walter
3f0c69d862 secret_service_search() accepts a SecretSchema
* For validation and adding the xdg:schema attribute
2012-07-05 23:33:07 +02:00
Stef Walter
889f6d66b7 Make secret_service_search() able to unlock, load secrets
* Turn secret_service_search() and friends into a more convenient
   API, so that callers can get attributes, unlocking, and secrets
   if so desired.
 * Also support retrieving either one secret, or all of them.
2012-07-05 23:33:07 +02:00
Stef Walter
012ed7d620 Move secret_service_get_secrets() to secret_item_load_secrets()
* And cache the secrets on the items instead of returning
   them in a GHashtable
2012-07-05 23:33:07 +02:00
Stef Walter
f962662b09 Separate path based functionality
* Move the dbus object path based functionality into its
   own file and own section of the documentation.
2012-07-05 23:33:07 +02:00
Stef Walter
49dd623e6e Keep a cached SecretValue on each SecretItem
* This item can be retrieved immediately and loaded asynchronously
 * It can also be loaded during initialization of the SecretItem
   object
2012-07-05 23:33:07 +02:00
Stef Walter
89550876ff Remove varargs SecretService methods
* The SecretService methods aren't used as frequently as the
   password methods, and it's not really necessary to have a whole
   bunch of extra varargs functions.
 * Add varargs functions for building a GHashTable of attributes
2012-06-28 13:15:06 +02:00
Evan Nemerson
d0df587f08 Add Vala bindings.
https://bugzilla.gnome.org/show_bug.cgi?id=678846
2012-06-28 12:38:34 +02:00
Stef Walter
526bba24a4 Fix python tests when libsecret is not installed 2012-06-28 10:38:17 +02:00
Stef Walter
fda131178a Pass service GType to secret_service_new() and friends.
* This allows callers to use a custom SecretService derived
   type with the rest of libsecret
 * The default way to get a SecretService is via secret_service_get()
   which remains simple without the GType parameter
2012-06-27 11:45:09 +02:00
Stef Walter
268f2dfd62 Don't leak extra mock service when running python tests
* Were erroneously starting the mock service when loading
   the python test modules, although already started in setUp()
2012-06-27 07:42:57 +02:00
Stef Walter
79aab9d941 Add secret_service_read_alias() and secret_service_set_alias()
* Wrappers for Secret Service ReadAlias() and SetAlias() methods
   in various permutations.
2012-06-23 14:47:13 +02:00
Stef Walter
279ea1cc10 Add methods which handle prompts for a DBus object path
* Various prompting methods return the prompt result as
   a GVariant.
 * Added new prompt_path methods to SecretService
2012-06-23 14:22:28 +02:00
Kalev Lember
f327460ef5 Fix parallel make
Make doesn't know that 'libmock_service.la' is the same as
'$(top_builddir)/library/tests/libmock_service.la', and fails to
properly order builds when using -jX with parallel make. Fix this by
using 'libmock_service.la' everywhere.

make[4]: *** No rule to make target `../../library/tests/libmock_service.la', needed by `test-value'.  Stop.
2012-03-29 13:58:01 +03:00
Stef Walter
0be598f82c Release version 0.1 2012-03-25 13:54:04 +02:00
Stef Walter
3aa77c6918 Support content type application/octet-stream for passwords
* Older versions of gnome-keyring erroneously set this content type
   for passwords even though they're textual.
 * If we see this content type, then check if the password is textual
   and allow usage as a null-terminated password
2012-03-25 12:23:29 +02:00
Stef Walter
8417d8c98b Fine tune how schemas work
* Handled entirely on the client side.
 * Schema names are stored in an xdg:schema attribute
 * Add option to turn of matching on schema names. So that we can
   lookup items stored by libgnome-keyring and others
 * Change schema 'identifier' to 'name'
 * Fix up tests
2012-03-18 21:58:02 +01:00
Stef Walter
ad9936e3f5 Add python tests 2012-03-18 15:38:29 +01:00
Stef Walter
2bc2140d43 Complete javascript testing of password functionality
* And fix bugs, nullable collection_path
2012-03-11 13:35:43 +01:00
Stef Walter
60f6e8e770 Tons of fixes for introspectable usage
* Schemas can also be created dynamically
 * Correct introspection types for hash tables passed as args
 * Validate argument hash tables
 * Add some predefined schemas
 * Allow allocation of pageable passwords from lookup functions
2012-03-11 09:08:49 +01:00
Stef Walter
06e8436557 Build fixes for 'make distcheck' 2012-02-03 20:44:47 +01:00
Stef Walter
9c20c4d65e Initial gobject-introspection support 2012-02-03 20:44:47 +01:00
Stef Walter
46137f865b Rename gsecret to libsecret
* Fixes the namespacing capitalization issues run into with
   gobject-introspection and glib code tools
2012-02-03 20:44:46 +01:00
Stef Walter
3a6cfa697f Update the mock service to more closely mirror real secret service 2012-02-03 20:44:46 +01:00
Stef Walter
075ca76cc0 Tests for password functionality 2012-02-03 20:44:45 +01: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
f1bd681e8a Split out tests for service and service methods 2012-02-03 20:44:45 +01:00
Stef Walter
1a86e7152d Test storing passwords and fix bugs 2012-02-03 20:44:45 +01:00
Stef Walter
4c80765ef8 More testing, and more bug fixes 2012-02-03 20:44:44 +01:00
Stef Walter
c6c6afa2cc Rework how the initialization work for various proxy objects
* Fix bugs and tests
2012-02-03 20:44:44 +01:00
Stef Walter
f44aae6efa Tests for GSecretItem and GSecretValue
* And fix bugs found in the process
2012-02-03 20:44:37 +01:00
Stef Walter
116447c59e Split out starting/stopping mock service into library
* Later this will be introspectable so we can start it from
   python or javascript based tests
2012-01-23 09:36:36 +01:00
Stef Walter
31d8f1508e Complete most of implementation, thread safety
Not tested or run yet
2012-01-20 17:53:02 +01:00
Stef Walter
72dc330a04 Complete the gsecret_password_xxx() API. 2012-01-16 15:08:29 +01:00
Stef Walter
f2e275f25e Prompting and item deletion 2012-01-13 14:45:55 +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
09a9d856d2 Add more coverage testing for search paths 2011-11-06 22:46:30 +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
38031d943e Add test for async negotiation of encrypted session 2011-11-06 09:00:06 +01:00
Stef Walter
76ae17b24f Add test for GSecretService singleton, and make it work 2011-11-06 08:59:20 +01:00