From: Michael Tremer Date: Wed, 29 Nov 2017 15:00:36 +0000 (+0100) Subject: key: Remove any assertions after acquiring a gpg context X-Git-Tag: 0.9.28~1285^2~1253 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b3cb5b16ee56661f99e2c56c9bcea2b0b4f9a54f;p=pakfire.git key: Remove any assertions after acquiring a gpg context Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/key.c b/src/libpakfire/key.c index 14a9d2251..1e1a84fee 100644 --- a/src/libpakfire/key.c +++ b/src/libpakfire/key.c @@ -174,7 +174,6 @@ void pakfire_key_unref(PakfireKey key) { PakfireKey pakfire_key_get(Pakfire pakfire, const char* fingerprint) { gpgme_ctx_t gpgctx = pakfire_get_gpgctx(pakfire); - assert(gpgctx); gpgme_key_t gpgkey = NULL; gpgme_error_t error = gpgme_get_key(gpgctx, fingerprint, &gpgkey, 1); @@ -265,7 +264,6 @@ int pakfire_key_is_revoked(PakfireKey key) { PakfireKey pakfire_key_generate(Pakfire pakfire, const char* userid) { gpgme_ctx_t gpgctx = pakfire_get_gpgctx(pakfire); - assert(gpgctx); unsigned int flags = 0; @@ -297,7 +295,6 @@ PakfireKey pakfire_key_generate(Pakfire pakfire, const char* userid) { char* pakfire_key_export(PakfireKey key, pakfire_key_export_mode_t mode) { gpgme_ctx_t gpgctx = pakfire_get_gpgctx(key->pakfire); - assert(gpgctx); gpgme_export_mode_t gpgmode = 0; switch (mode) { @@ -352,7 +349,6 @@ PakfireKey* pakfire_key_import(Pakfire pakfire, const char* data) { gpgme_data_t keydata; gpgme_ctx_t gpgctx = pakfire_get_gpgctx(pakfire); - assert(gpgctx); // Form a data object out of the input without copying data error = gpgme_data_new_from_mem(&keydata, data, strlen(data), 0);