Commit Graph

833 Commits

Author SHA1 Message Date
Daiki Ueno
a6530135eb Merge branch 'wip/dueno/local-file' into 'master'
secret-backend: Add local-storage backend

See merge request GNOME/libsecret!6
2019-10-13 06:31:41 +00:00
Daiki Ueno
a278adc208 secret-backend: Check if portal is available
Before decising to use the file backend, check if the necessary portal
interface is available on the D-Bus.

Suggested by Patrick Griffis.
2019-10-13 06:21:38 +00:00
Daiki Ueno
8f886f0797 secret-file-backend: Retrieve master password from flatpak portal 2019-10-13 06:21:38 +00:00
Daiki Ueno
f2b7f6d505 secret-tool: Add tests using file backend 2019-10-13 06:21:38 +00:00
Daiki Ueno
8e4317235e autotools: Generate secret-tool executable in tool/
This makes it consistent with meson build.
2019-10-13 06:21:38 +00:00
Daiki Ueno
2d642b5b7d secret-file-backend: New backend for storing secrets in file
This adds a new backend based on locally stored file.
2019-10-13 06:21:38 +00:00
Daiki Ueno
9cfad7c621 egg-testing: Sync with gnome-keyring 2019-10-13 06:21:37 +00:00
Daiki Ueno
29cc14153d Merge branch 'master' into 'master'
libsecret.pc: add Libs.private field for libgcrypt

See merge request GNOME/libsecret!38
2019-10-12 17:08:43 +00:00
Fabrice Fontaine
93b7043b5f libsecret.pc: add Libs.private field for libgcrypt
When libgcrypt is available, libsecret links with it. When dynamic
linking is used, there is no problem: libsecret.so has a NEEDED
pointing to libgcrypt, so linking an application with -lsecret works
fine. However, when doing static linking, you must specify the entire
chain of libraries, otherwise you get unresolved symbols errors, such
as:

host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libsecret-1.a(libsecret_1_la-secret-session.o): In function `request_open_session_aes':
build/libsecret-0.18.3/libsecret/secret-session.c:99: undefined reference to `gcry_mpi_release'
build/libsecret-0.18.3/libsecret/secret-session.c:101: undefined reference to `gcry_mpi_aprint'
build/libsecret-0.18.3/libsecret/secret-session.c:107: undefined reference to `gcry_free'

In order to solve this, we simply need to indicate in the Libs.private
field of the .pc file that we depend on libgcrypt.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/libsecret/0001-libsecret.pc-add-Libs.private-field-for-libgcrypt.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-10-12 16:16:11 +00:00
Daiki Ueno
79e89b2cb2 Merge branch 'wip/dueno/meson-pkgconfig' into 'master'
meson: Use pkgconfig module instead of substitution

See merge request GNOME/libsecret!40
2019-10-12 15:31:23 +00:00
Daiki Ueno
300ddc702e meson: Use pkgconfig module instead of substitution 2019-10-12 02:46:06 +02:00
Daiki Ueno
1b1a7d1e48 meson: Simplify libgcrypt detection
Meson has native support for the libgcrypt-config program if pkgconfig
file is not provided.
2019-10-11 14:33:14 +02:00
Daiki Ueno
4b6d735b82 Merge branch 'wip/dueno/backend' into 'master'
secret-backend: New interface to represent password storage backend

See merge request GNOME/libsecret!34
2019-10-08 08:20:05 +00:00
Rico Tzschichholz
a6317352e8 build: Properly expose backend vfuncs to vapi 2019-10-08 07:55:55 +00:00
Daiki Ueno
060061905a secret-password: Add necessary gir annotations 2019-10-08 07:55:55 +00:00
Daiki Ueno
49e6e0cf60 secret-password: Port to SecretBackend interface 2019-10-08 07:55:55 +00:00
Daiki Ueno
b37d2b8d20 secret-backend: Add a way to uncache singleton instance
This is ugly, but necessary to handle instance uncaching in
SecretBackend when the backend instance is gone.
2019-10-08 07:55:55 +00:00
Daiki Ueno
71a19a95ae secret-service: Implement SecretBackendInterface 2019-10-08 07:55:55 +00:00
Daiki Ueno
a0d10597ee secret-backend: New interface to represent password storage backend
This interface provides a separation between the
frontend (secret_password*) and the backend (SecretService).  That
makes it easier to replace SecretService with a custom backend
implementation.
2019-10-08 07:55:55 +00:00
Daiki Ueno
e6456698ec secret-service: Move parent property setting to constructor
This makes it possible to instantiate a SecretService instance
directly through g_initable_new() or g_async_initable_new_async().
2019-10-08 07:55:55 +00:00
Niels De Graef
616a967e60 Merge branch 'wip/dueno/versioning' into 'master'
README.md: Mention the new versioning scheme [ci skip]

See merge request GNOME/libsecret!39
2019-10-04 14:30:05 +00:00
Daiki Ueno
2651abd4e8 README.md: Mention the new versioning scheme [ci skip] 2019-10-04 10:29:55 +02:00
Daiki Ueno
67680a606e Merge branch 'ftbfs-meson-wo-valgrind' into 'master'
build: Fix FTBFS using meson without valgrind

See merge request GNOME/libsecret!37
2019-09-20 15:44:59 +00:00
Xi Ruoyao
c4fb5f033f build: Fix FTBFS using meson without valgrind
Now with meson build system libsecret FTBFS without valgrind installed.
Two issues: (1) egg-testing.c depends on valgrind/valgrind.h unnecessarily;
(2) we forgot to add "build" directory as a header directory for meson.

This commit resolves both of them.
2019-09-20 23:32:14 +08:00
Daiki Ueno
f576dfbe50 Release 0.19.1 2019-09-06 10:49:35 +02:00
Daiki Ueno
75db38cdcd Merge branch 'fix-hang' into 'master'
service: Fix secret_service_ensure_session_finish error propagation

See merge request GNOME/libsecret!36
2019-09-05 17:57:28 +00:00
Jan Alexander Steffens (heftig)
aae0329ba3
service: Fix secret_service_ensure_session_finish error propagation
The condition checking g_task_is_valid was inverted, resulting in errors
being ignored.

Move the check to a g_return_val_if_fail to be in line with all other
uses of g_task_is_valid.

Fixes https://bugs.archlinux.org/task/63666
2019-09-05 18:42:26 +02:00
Daiki Ueno
be541cf9d4 Release 0.19.0 2019-09-05 09:42:11 +02:00
Daiki Ueno
f4328da39e Merge branch 'wip/dueno/tap' into 'master'
build: Use stock tap-driver from automake

See merge request GNOME/libsecret!5
2019-08-29 10:57:10 +00:00
Daiki Ueno
6ef1ec4722 build: Use stock tap-driver from automake
Previously, we used a custom TAP driver written in Python.  Now that
Automake's TAP driver has sufficient features, the script should be no
longer necessary.
2019-08-29 10:47:32 +00:00
Daiki Ueno
d71663c264 build: Drop TAP wrapper script around GLib tests
The GLib versions we require supports TAP natively when tests are run
with the --tap option.
2019-08-29 10:47:32 +00:00
Daiki Ueno
4d39dd13e0 secret-tool: Fix memleak 2019-08-21 14:48:53 +02:00
Daiki Ueno
e9f811ea41 Merge branch 'wip/dueno/meson' into 'master'
meson: Minor cleanup

See merge request GNOME/libsecret!35
2019-07-26 14:44:09 +00:00
Daiki Ueno
c06c9d2e26 build: Simplify file substitution
Since meson 0.50, configuration_data() can take a dictionary.
2019-07-25 19:59:05 +02:00
Daiki Ueno
a4ea97d6e6 build: Simplify pathname handling
This switches to using relative paths as much as possible, and the "/"
shorthand for join_paths.
2019-07-25 19:59:01 +02:00
Daiki Ueno
555407a448 build: Bump meson_version to 0.50
To suppress the warning:

  WARNING: Project targetting '>= 0.48' but tried to use feature
  introduced in '0.50.0': install arg in configure_file
2019-07-24 06:10:13 +02:00
Daiki Ueno
f7e73bab6d Merge branch 'wip/dueno/simple-item' into 'master'
secret-password: Add necessary functions to migrate from D-Bus based API

See merge request GNOME/libsecret!32
2019-07-22 10:55:30 +00:00
Daiki Ueno
6886aebb04 secret-tool: Switch to using the simple API 2019-07-18 13:54:12 +00:00
Daiki Ueno
e3963efdee secret-password: Mark @schema argument nullable for *v functions
Given these functions take a hash table built from valid attributes,
there is no need to re-validate.  This is also consistent with the
secret_service API.
2019-07-18 13:54:12 +00:00
Daiki Ueno
a5db34dcd5 secret-value: Add secret_value_unref_to_password
This adds the secret_value_unref_to_password function that
unreferences and returns the stored secret in non-pageable memory.
This is supposed to be used with secret_password_lookup_binary*
functions.
2019-07-18 13:54:12 +00:00
Daiki Ueno
2ae6ec89f4 tests: Add tests for binary variant of secret_{lookup,store} 2019-07-18 13:54:12 +00:00
Daiki Ueno
29c1460fd7 secret-password: Add store_binary functions
This adds a set of functions that takes a SecretValue instead of a
text password when storing a secret.  This is useful if the stored
password is not null-terminated.
2019-07-18 13:54:12 +00:00
Daiki Ueno
bac85c00fc secret-password: Add lookup_binary functions
This adds a set of functions that return a SecretValue instead of a
text password when looking up a secret.  This is useful if the stored
password is not null-terminated.
2019-07-18 13:54:12 +00:00
Daiki Ueno
5fedca8ffc secret-password: Add search functions
This adds a set of functions that expose secret_service_search* from
the simple API.
2019-07-18 13:54:12 +00:00
Daiki Ueno
092d4ef47d secret-item: Implement SecretRetrievableInterface 2019-07-18 13:54:12 +00:00
Daiki Ueno
938640ae52 secret-retrievable: New interface to represent read-only item
This is a ground work for adding a local storage backend.  As
SecretItem is derived from GDBusProxy, it cannot be simply exposed to
the application through the secret_password_search() if the item is
not backed by the DBus API.  This adds an abstract interface
representing a read-only view of a secret item for that purpose.
2019-07-18 13:54:12 +00:00
Daiki Ueno
9a8f49f237 Merge branch 'wip/dueno/disable-assert-tests' into 'master'
tests: undef G_DISABLE_ASSERT

Closes #26

See merge request GNOME/libsecret!33
2019-06-29 05:10:05 +00:00
Daiki Ueno
0be63575ff build: Suppress compiler warning if compiled with G_DISABLE_ASSERT 2019-06-29 06:54:40 +02:00
Daiki Ueno
d17e93e696 tests: undef G_DISABLE_ASSERT
Since GLib 2.58, g_test_init started to be no-op if a test is compiled
with G_DISABLE_ASSERT defined.
2019-06-29 06:54:37 +02:00
Daiki Ueno
0e6b542ff5 secret-version: Remove garbage after #endif 2019-06-17 19:32:48 +02:00