Skip to content

Commit

Permalink
Add a version number in the key file
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaily committed Feb 26, 2019
1 parent 23c52b9 commit b9afa80
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CertificateShortcutProvider/CertificateShortcutProviderKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ namespace CertificateShortcutProvider
[XmlType("CertificateShortcutProviderKey")]
public class CertificateShortcutProviderKey
{
public const int CurrentVersion = 1;

[XmlAttribute]
public int Version { get; set; }

public byte[] Certificate { get; set; }

/// <summary>
Expand All @@ -26,6 +31,8 @@ public class CertificateShortcutProviderKey
public CertificateShortcutProviderKey() { }
public CertificateShortcutProviderKey(X509Certificate2 certificate, byte[] encryptedKey, byte[] iv, byte[] encryptedPassphrase)
{
Version = CurrentVersion;

// public part only
Certificate = certificate.Export(X509ContentType.Cert);

Expand Down

0 comments on commit b9afa80

Please sign in to comment.