Cache only support fingerprint types
[strongswan.git] / 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);
-       lib->encoding->cache(lib->encoding, type, this, *fp);
-
+       if (success)
+       {
+               lib->encoding->cache(lib->encoding, type, this, *fp);
+       }
        return success;
 }