From a6e3da987caf3d929858b67a337ee03211d8a2a8 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 11 Feb 2020 11:54:43 +0100 Subject: [PATCH] src/client/http_client.rs: do not store fingerprints passed via options in cache --- src/client/http_client.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/http_client.rs b/src/client/http_client.rs index 7e15518e..c15a8eca 100644 --- a/src/client/http_client.rs +++ b/src/client/http_client.rs @@ -250,7 +250,11 @@ impl HttpClient { let verified_fingerprint = Arc::new(Mutex::new(None)); let mut fingerprint = options.fingerprint.take(); - if options.fingerprint_cache && fingerprint.is_none() && options.prefix.is_some() { + + if fingerprint.is_some() { + // do not store fingerprints passed via options in cache + options.fingerprint_cache = false; + } else if options.fingerprint_cache && options.prefix.is_some() { fingerprint = load_fingerprint(options.prefix.as_ref().unwrap(), server); }