Commit Graph

16 Commits

Author SHA1 Message Date
SET
82b8810f62 Allow exporting secret keys.
Requests the passphrase with a popup.

As from GPGME 1.15.0, the loopback pinentry is functional when exporting secret keys. It works fine when the exact passphrase is provided. If it's a wrong passphrase, GPGME does not generate an ::Error, but the app crashes with 'free(): double free detected in tcache 2'.

Hence, this patch cannot be committed to master.

Status : dangerous
Result : works and works not
Reason : a wrong passphrase means a crash
2020-11-20 22:41:29 +01:00
SET
43e1eff221 Add function to revoke a user identity.
Done with Context::revUid, not with UserID::revoke.

Does not remove the identity.

N.B. : if the uid is revoked a second time, Error::code is 0.
2020-11-18 20:48:15 +01:00
SET
98c4fa2b22 Use right uid string.
Correct format :
        name (comment) <email>
Was :
        name <email> (comment)

3ac566fbf was wrong.
2020-11-18 20:40:16 +01:00
SET
da3f5c3516 Add function to add a new user identity to a key.
The email parameter must have a valid email address format here, else
GPGME will refuse to create the identity. This is not the case when
creating a key, where any string is accepted.
2020-11-16 15:58:50 +01:00
SET
3ac566fbfe Format uid string correctly when creating keys.
Correct format :
	name <email> (comment)
Was :
	name <email> comment

Though the 'comment' part was visible with the cli gpg app, it was not
shown in kleopatra and in K7.
2020-11-16 14:39:57 +01:00
SET
7633ef9d60 Add function to export public keys.
Expects a fingerprint to export a single public key in armor mode.
2020-11-15 11:58:07 +01:00
SET
e944da9eda Test export private keys in C++.
Result : fails.
Reason : loopback passphrase provider is never called.

With default pinentry mode, the passphrase is requested normally 
and the private key is exported. But this can't be done on a web server.

Enclosed in #ifdef DEVTIME.
2020-11-15 11:53:03 +01:00
SET
b9b4396b12 Fix key generation functions.
Created key must always be looked for as it is not assigned to the
passed in null key.
Delete local context and loopback passphrase provider.
Parameter expires was ignored in CreateKeyWithEngineDefaultAlgo.
2020-11-12 22:38:10 +01:00
SET
4f8ea18a66 Use fingerprint instead of keyid when importing and deleting keys. 2020-11-11 21:09:43 +01:00
SET
9cce0febdb Add key creation functions.
- create a pair of keys with default engine algorithms
 - create a secret key
 - create a subkey (public) and add it to a secret key.
2020-11-11 14:47:05 +01:00
SET
2bddf29596 Allow to change key expiry date.
Select new date in a popup. Controlled by a specific configuration flag.
2020-11-07 22:25:07 +01:00
SET
ffd9692504 List key certifications
Set context KeyListMode to ::Signatures | ::Validate.
List certification on public key only.
2020-11-07 12:21:49 +01:00
SET
7f8af95d3a Certify key.
In-place editing with a popup if user is allowed in app config file.
User must of course manage at least a private key. User identities of
target key may be selectively chosen. Optionally, certification may be
exportable and non-revocable.
2020-11-03 11:06:25 +01:00
SET
e434315940 Edit owner trust level.
Inplace editing with a combobox if user is allowed. in app config file.
2020-10-25 17:28:47 +01:00
SET
b1ab6ba97d Fix typo 2020-06-05 20:35:11 +02:00
SET
47e78be7e9 Initial commit 2019-10-25 20:16:43 +02:00