]> git.ipfire.org Git - pakfire.git/commitdiff
key: Remove any assertions after acquiring a gpg context
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Nov 2017 15:00:36 +0000 (16:00 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Nov 2017 15:00:36 +0000 (16:00 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/key.c

index 14a9d2251ce1e39a670df464807b6630d157e8cd..1e1a84feecc599bf18c63ea9fc8b8700c3f6358d 100644 (file)
@@ -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);