]> git.ipfire.org Git - pakfire.git/commitdiff
libpakfire: Choose a good default key size
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 24 Nov 2017 12:00:06 +0000 (13:00 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 24 Nov 2017 12:00:06 +0000 (13:00 +0100)
The short keys have just been around for testing

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/key.c

index d9b3152c33cd152a9e9f8a1dd71aefadcecc543e..2a7725def5d6565ad18f668da07ae1613a11097d 100644 (file)
@@ -29,6 +29,8 @@
 #include <pakfire/pakfire.h>
 #include <pakfire/util.h>
 
+#define DEFAULT_KEY_SIZE "rsa4096"
+
 static gpgme_ctx_t pakfire_get_gpgctx(Pakfire pakfire) {
        static int gpg_initialized = 0;
        gpgme_error_t error;
@@ -241,7 +243,7 @@ PakfireKey pakfire_key_generate(Pakfire pakfire, const char* userid) {
 
        // Generate the key
        gpgme_error_t error = gpgme_op_createkey(gpgctx, userid,
-               "rsa512", 0, 0, NULL, flags);
+               DEFAULT_KEY_SIZE, 0, 0, NULL, flags);
 
        if (error != GPG_ERR_NO_ERROR) {
                printf("ERROR: %s\n", gpgme_strerror(error));