Commit Graph

10 Commits

Author SHA1 Message Date
Daiki Ueno
ac1367056d session: Tolerate non-approved DH parameter usage in FIPS mode
The SecretSession protocol uses a weak Diffie-Hellman parameters which
are not approved by FIPS. While this is not ideal, the protocol is not
designed as a general protection mechanism of data in transit, but
just as a safety net against when the dbus-daemon (or dbus-broker)
crashes and dumps a core, and thus bumping the protocol to use a
larger DH group would be overkill.

This patch temporarily disables the FIPS check around the GnuTLS DH
API calls to avoid errors.

Signed-off-by: Daiki Ueno <dueno@src.gnome.org>
2024-07-23 06:00:10 +09:00
Dhanuka Warusadura
9cfa77f967 pam: port PAM module egg helper functions from gnome-keyring
This change is a part of the port PAM module from gnome-keyring
patch set.
These changes port gnome-keyring/egg/egg-unix-credentials.c to
libsecret/egg
Furthermore ports gnome-keyring/egg/egg-buffer.c to libsecret/egg

Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
2023-12-10 22:35:55 +05:30
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
Daiki Ueno
564874beb0 file-collection: Move low-level crypto functions to egg
This moves low-level cryptographic functions into egg/egg-keyring1.c,
to make it easy to support multiple crypto backend libraries.

Signed-off-by: Daiki Ueno <dueno@src.gnome.org>
2023-12-04 16:50:10 +09:00
Dhanuka Warusadura
63907d907e Add TPM2 API and its implementations to egg
These changes define the TPM2 API and add its implementations
to the incubation area (egg/).

Summary of the public API:
`egg_tpm2_initialize`: Start a TPM context.
`egg_tpm2_finalize`: End a TPM context.
`egg_tpm2_generate_master_password`: Generate and returns an
encrypted master password in `GBytes` format. TSS Marshaling,
GVariant serialization is used.
`egg_tpm2_decrypt_master_password`: Decrypts a master password
generated from `egg_tpm2_generate_master_password`. TSS
Unmarshaling, GVariant deserialization is used.

TPM2 API: TSS Enhanced System API (ESAPI)

Proposal: [extend file backend to use TPM2 derived encryption keys](https://gitlab.gnome.org/Teams/Engagement/gsoc-2021/-/issues/13)

Related MRs: [#86](https://gitlab.gnome.org/GNOME/libsecret/-/merge_requests/86)

Related Issues: [#63](https://gitlab.gnome.org/GNOME/libsecret/-/issues/63)
2021-08-04 14:42:55 +05:30
Daiki Ueno
7407a261b7 meson: Run tests for libegg 2021-07-03 18:54:04 +02:00
Niels De Graef
9959be81fd meson: Clean up unused variables 2020-06-01 09:08:04 +02: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
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
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