Cache only support fingerprint types
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 12 Dec 2014 12:08:40 +0000 (13:08 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 12 Dec 2014 12:08:40 +0000 (13:08 +0100)
src/libstrongswan/plugins/bliss/bliss_public_key.c

index 569ad8d..f97d0f3 100644 (file)
@@ -245,8 +245,10 @@ METHOD(public_key_t, get_fingerprint, bool,
        }
        success = bliss_public_key_fingerprint(this->set->oid, this->A,
                                                                                   this->set, type, fp);
        }
        success = bliss_public_key_fingerprint(this->set->oid, this->A,
                                                                                   this->set, type, fp);
-       lib->encoding->cache(lib->encoding, type, this, *fp);
-
+       if (success)
+       {
+               lib->encoding->cache(lib->encoding, type, this, *fp);
+       }
        return success;
 }
 
        return success;
 }