Commit Graph

34 Commits

Author SHA1 Message Date
Marcel Telka
d72c757992 tool: "\|" used for sed in test-secret-tool.sh is not portable 2024-11-23 22:58:35 +01:00
Niels De Graef
a1ceaeed2a secret-tool: Fix memory issues in lock command
There were several issues in `secret_tool_action_lock()`:

- `g_autolist (GList)` isn't a correct type, as the list elements are
  `SecretCollection`s, not `GList`s
- Separately from that, the list didn't take ownership of the elements
  either in all cases
- We were leaking the `locked` and `context` variables

This commits just does away with all the g_auto* usage as it's the only
place in the code we're using it anyway, and just does all the freeing
at the end of the function.

Fixes: 015ea119 ("secret-tool: Add locking capabilities to secret tool")
Fixes: https://gitlab.gnome.org/GNOME/libsecret/-/issues/89
2023-12-12 12:27:12 +01:00
Daiki Ueno
28486191b2 Support GnuTLS as an alternative crypto backend
This turns the `-Dgcrypt` build time option into a more generic
`-Dcrypto` option, which enables user to choose which cryptographic
library to link with.  It currently supports libgcrypt (`libgcrypt`)
and GnuTLS (`gnutls`); for the latter, GnuTLS 3.8.2 is the minimum
required version.

Signed-off-by: Daiki Ueno <dueno@src.gnome.org>
2023-12-04 16:50:49 +09:00
Henry Rovner
b6716c4d30 secret-tool: Verify that the parsed stdin password is vaild UTF-8 2023-11-06 11:17:24 -08:00
Dhanuka Warusadura
ea57d26930 Add TPM2 integration to secret file backend
These changes add TPM2 derived encryption key to secret
file backend.
2021-08-12 21:14:26 +05:30
Nick Montalbano
015ea1194b secret-tool: Add locking capabilities to secret tool
Context, secret tool currently does not have the capability to lock
keyring.

This capability was requested for specific use cases.

Updates have been made to the secret tool to lock keyrings.

Closes https://gitlab.gnome.org/GNOME/libsecret/-/issues/28
2021-06-23 21:27:32 -04:00
Daiki Ueno
9472b0ab39 secret-tool: Fix secret_password_clearv_sync return value check
This was a regression introduced in the rewrite using the simple
API (commit 6886aebb04).

Reported by Chih-Hsuan Yen in:
https://gitlab.gnome.org/GNOME/libsecret/-/issues/56

Signed-off-by: Daiki Ueno <dueno@src.gnome.org>
2021-04-03 07:23:51 +02:00
Dhanuka Warusadura
06931ac755 Fixes a typo
Argument to g_print should be part not path.
2021-03-31 10:59:04 +00:00
Niels De Graef
2147b96c9d Drop autotools-based build
Our official instructions only tell how to build with Meson, our CI is
only done with Meson and I wouldn't be surprised if most developers only
used Meson as well.

In other words, the autotools build is outdated. Let's say our goodbye
and drop it in the next stable release.
2020-11-15 20:37:48 +01:00
Niels De Graef
bfa66f35cc meson: Add tests for GIR-based languages
Also add a test suite argument to more easily distinguish them.
2020-06-17 22:02:15 +02:00
Niels De Graef
9959be81fd meson: Clean up unused variables 2020-06-01 09:08:04 +02:00
Daiki Ueno
f1451c348a tool: Fix TAP output of test-secret-tool.sh 2020-01-13 14:30:46 +01:00
Daiki Ueno
53748c29eb build: Include test-secret-tool.sh in distribution 2020-01-13 14:30:46 +01: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
4d39dd13e0 secret-tool: Fix memleak 2019-08-21 14:48:53 +02:00
Daiki Ueno
6886aebb04 secret-tool: Switch to using the simple API 2019-07-18 13:54:12 +00: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
Niels De Graef
cbea4ce739 Remove useless macro to check GLib version
We already require GLib to have version 2.38 or higher in
`configure.ac`, so no need to check in our code whether we have a
version higher than 2.35
2019-01-19 12:12:32 +01:00
Ville Skyttä
261c0cd969 tool: s/--details/--unlock/ in search usage message 2017-10-15 00:32:33 +03:00
Bastien Nocera
99a2e6ad3e tool: Fix typos in error messages
s/specfy/specify/

https://bugzilla.gnome.org/show_bug.cgi?id=782206
2017-05-08 13:05:57 +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
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
3b84dce476 tool: Add a 'search' command for looking up items and details
The output format is meant to be parseable in the Desktop file format.
Update the documentation as well.

https://bugzilla.gnome.org/show_bug.cgi?id=693881
2013-02-18 15:21:17 +01: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
9544b683f1 secret-tool: Use the correct call to wipe password in memory
* Fixes crash
2012-07-30 11:44:15 +02:00
Stef Walter
54b73f5cb6 Initialize gettext in secret-tool
https://bugzilla.gnome.org/show_bug.cgi?id=680072
2012-07-18 07:40:01 +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
Stef Walter
7816417167 Release version 0.5 2012-07-13 12:48:41 +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
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
Colin Walters
8e68f748c3 secret-tool: Don't read uninitialized variable on error path 2012-06-25 18:22:20 -04: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
3a8b4a36d8 Add secret-tool command
* See usage for details on how to use it
2012-03-25 12:25:22 +02:00