Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Extract loading and saving certificates; certificate caching improvements #516

Merged
merged 3 commits into from
Nov 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/Titanium.Web.Proxy/Network/CachedCertificate.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
using System;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;

namespace Titanium.Web.Proxy.Network
{
/// <summary>
/// An object that holds the cached certificate
/// </summary>
internal class CachedCertificate
internal sealed class CachedCertificate
{
internal CachedCertificate()
{
LastAccess = DateTime.Now;
}

internal X509Certificate2 Certificate { get; set; }

/// <summary>
/// last time this certificate was used
/// Usefull in determining its cache lifetime
/// Certificate creation task.
/// </summary>
internal Task<X509Certificate2> CreationTask { get; set; }

/// <summary>
/// Last time this certificate was used.
/// Useful in determining its cache lifetime.
/// </summary>
internal DateTime LastAccess { get; set; }
}
Expand Down
Loading