diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index e67b53334..c90d70712 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,4 @@ Doneness: - [ ] Build is okay - I made sure that this change is building successfully. - [ ] No Bugs - I made sure that this change is working properly as expected. It doesn't have any bugs that you are aware of. -- [ ] Branching - If this is not a hotfix, I am making this request against master branch +- [ ] Branching - If this is not a hotfix, I am making this request against the master branch diff --git a/src/Titanium.Web.Proxy/Network/DefaultCertificateDiskCache.cs b/src/Titanium.Web.Proxy/Network/DefaultCertificateDiskCache.cs index 485b83261..ef0bdbc22 100644 --- a/src/Titanium.Web.Proxy/Network/DefaultCertificateDiskCache.cs +++ b/src/Titanium.Web.Proxy/Network/DefaultCertificateDiskCache.cs @@ -59,6 +59,12 @@ public void Clear() private X509Certificate2 loadCertificate(string path, string password, X509KeyStorageFlags storageFlags) { byte[] exported; + + if (!File.Exists(path)) + { + return null; + } + try { exported = File.ReadAllBytes(path);