mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-01-13 07:05:24 +08:00
Add certificate viewer plugin
Introduces QuickLook.Plugin.CertViewer for viewing certificate files (.pfx, .cer, .pem, etc.) in QuickLook. The plugin loads and displays certificate details or raw content, and is integrated into the solution and project files.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace QuickLook.Plugin.CertViewer;
|
||||
|
||||
internal sealed class CertLoadResult
|
||||
{
|
||||
public bool Success { get; }
|
||||
public X509Certificate2 Certificate { get; }
|
||||
public string Message { get; }
|
||||
public string RawContent { get; }
|
||||
|
||||
public CertLoadResult(bool success, X509Certificate2 certificate, string message, string rawContent)
|
||||
{
|
||||
Success = success;
|
||||
Certificate = certificate;
|
||||
Message = message;
|
||||
RawContent = rawContent;
|
||||
}
|
||||
|
||||
public static CertLoadResult From(bool success, X509Certificate2 certificate, string message, string rawContent)
|
||||
=> new CertLoadResult(success, certificate, message, rawContent);
|
||||
}
|
||||
Reference in New Issue
Block a user