Commit Graph

510 Commits

Author SHA1 Message Date
Daiki Ueno
e22eb7d540 secret-tool: Add tests for secret-tool using file backend 2019-08-19 17:22:02 +02:00
Daiki Ueno
baedede55c secret-file-backend: New backend for storing secrets in file
This adds a new backend based on locally stored file.
2019-08-19 14:12:13 +02:00
Daiki Ueno
13a220be84 egg-testing: Sync with gnome-keyring 2019-08-19 07:26:28 +02:00
Daiki Ueno
ef947b9988 secret-password: Add necessary gir annotations 2019-08-19 07:22:55 +02:00
Daiki Ueno
4ae7f8b7db secret-password: Port to SecretBackend interface 2019-08-13 14:14:02 +02:00
Daiki Ueno
d75c82ed8d 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-08-13 14:14:02 +02:00
Daiki Ueno
642e0e7d2e secret-service: Implement SecretBackendInterface 2019-08-13 14:14:02 +02:00
Daiki Ueno
7e4202913e 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-08-13 14:14:02 +02:00
Daiki Ueno
013aae460f 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-08-13 14:14:02 +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
Michael Catanzaro
2b4adfb9f4 Fix -Wunknown-pragmas triggered by secret-version.h
In file included from /usr/include/libsecret-1/libsecret/secret.h:33,
                 from ../lib/sync/../ephy-sync-utils.h:24,
                 from ../lib/sync/ephy-history-manager.c:25:
/usr/include/libsecret-1/libsecret/secret-version.h:19: error: ignoring #pragma __once__  [-Werror=unknown-pragmas]
 #pragma __once__

It should be #pragma once, not #pragma __once__.

But let's follow the other public headers here instead.
2019-06-13 15:00:20 +00:00
Sutou Kouhei
c00283ebd0 Add version macros
Added macros:

  * SECRET_VERSION_MAJOR
  * SECRET_VERSION_MINOR
  * SECRET_VERSION_MICRO
  * SECRET_CHECK_VERSION

These macros are widely defined in GLib based library. For example,
GLib, GTK, poppler GLib and so on define them.

These macros are useful to detect libsecret version on build type and
from GObject Introspection based bindings.
2019-06-09 16:38:39 +02:00
Daiki Ueno
31685e0608 gitlab-ci: Allow pages target to fail 2019-06-09 10:16:50 +02:00
Daiki Ueno
9085c8a6c1 gitlab-ci: Fix the previous change
Don't error out on deploy, if coverage report is not successfully
generated.
2019-06-09 09:08:26 +02:00
Daiki Ueno
5f5e560f0b gitlab-ci: Work around lcov incompatibility with gcc-9 2019-06-09 08:27:23 +02:00
Niels De Graef
61f5569baf Merge branch 'wip/dueno/meson-ci' into 'master'
gitlab-ci: Use meson instead of autotools

See merge request GNOME/libsecret!31
2019-06-05 14:08:12 +00:00
Daiki Ueno
339c19e7ed gitlab-ci: Use meson instead of autotools 2019-06-05 13:57:52 +00:00
Daiki Ueno
b4c909b8bf gitlab-ci: Switch to fedora:28 to fedora:latest 2019-06-05 13:57:52 +00:00
Daiki Ueno
7844baa78e Merge branch 'wip/dueno/madvice' into 'master'
egg: Request that secure memory not be dumped to disk

See merge request GNOME/libsecret!30
2019-06-05 10:51:49 +00:00
Matthew Garrett
fb813abe5c egg: Request that secure memory not be dumped to disk
Linux 3.4 added support for the MADV_DONTDUMP option to madvise(), which
requests that the covered memory not be included in coredumps. It makes
sense to use this to prevent cases where application crashes could
result in secrets being persisted to disk or included in dumps that are
uploaded to remote servers for analysis. I've avoided making this fatal
since there's a chance this code could be built on systems that have
MADV_DONTDUMP but run on systems that don't.
2019-06-02 14:46:54 +02:00
Niels De Graef
529758c153 Update README
Use markdown formatting (which displays more nicely in GitLab now that
we migrated) and give a bit of context to users.
2019-05-26 09:54:59 +02:00
Niels De Graef
d92265370c Include meson.build files in autotools release
Fixes https://gitlab.gnome.org/GNOME/libsecret/issues/25
2019-05-26 09:37:30 +02:00
Niels De Graef
e328e2fd57 doap: Add myself as maintainer
With the approval of Daiki Ueno.
2019-05-26 00:38:26 +02:00
Niels De Graef
7a919d3401 Merge branch 'wip/nielsdg/more-gtask' into 'master'
paths: Port from GSimpleAsyncResult to GTask

See merge request GNOME/libsecret!26
2019-05-19 08:48:36 +00:00
Niels De Graef
1f61ecb911 util: Port from GSimpleAsyncResult to GTask 2019-05-18 20:26:20 +02:00
Niels De Graef
9087c668c7 paths: Port from GSimpleAsyncResult to GTask 2019-05-18 19:02:18 +02:00
Niels De Graef
b87c3913b4 Merge branch 'wip/nielsdg/gtask-secret-service' into 'master'
Port Service and Session to GTask

See merge request GNOME/libsecret!25
2019-05-16 19:56:38 +00:00
Niels De Graef
f165f721d8 Port Service and Session to GTask
GSimpleAsyncResult is deprecated in favor of the simpler GTask, so use
that instead. This cuts down on the deprecation warnings.

I wanted to do both separately, but porting one without the other led to
some faulty casts from GSimpleAsyncResult to GTask (and vice versa).
2019-05-15 18:21:34 +02:00
Daiki Ueno
103ff88f6d Merge branch 'wip/nielsdg/fix-disabled-gcrypt' into 'master'
Fix the meson build on -Dgcrypt=false

Closes #20

See merge request GNOME/libsecret!23
2019-05-13 20:26:44 +00:00
Niels De Graef
f5a1f47f37 Fix the meson build on -Dgcrypt=false
Fixes https://gitlab.gnome.org/GNOME/libsecret/issues/20
2019-05-13 20:17:15 +00:00
Daiki Ueno
afdb92654c Merge branch 'wip/nielsdg/fix-mlock-check-meson' into 'master'
Ensure the Meson build also supports private memory

Closes #23

See merge request GNOME/libsecret!22
2019-05-13 19:53:06 +00:00
Niels De Graef
b7d593784c Ensure the Meson build also supports private memory
The meson build does not check for `mlock()` and define `HAVE_MLOCK`.

Fixes https://gitlab.gnome.org/GNOME/libsecret/issues/23
2019-05-13 19:41:48 +00:00
Daiki Ueno
c4b313b5ed Merge branch 'wip/nielsdg/g-assert' into 'master'
Stop using g_assert() in unit tests

See merge request GNOME/libsecret!21
2019-05-13 19:40:52 +00:00