Skip to content

Commit 159b4ad

Browse files
authored
Adding X509Certificate2 Public and Private Key buffer access (#194)
1 parent 590cad6 commit 159b4ad

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

nanoFramework.System.Net/X509Certificates/X509Certificate2.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,18 @@ public bool HasPrivateKey
155155
}
156156
}
157157

158+
/// <summary>
159+
/// Gets the private key, null if no private key
160+
/// </summary>
161+
/// <remarks>This will give you access directly to the raw decoded byte array of the private key</remarks>
162+
public byte[] PrivateKey => _privateKey;
163+
164+
/// <summary>
165+
/// Gets the public key
166+
/// </summary>
167+
/// <remarks>This will give you access directly to the raw decoded byte array of the public key</remarks>
168+
public byte[] PublicKey => RawData;
169+
158170
/// <summary>
159171
/// Gets the date in local time after which a certificate is no longer valid.
160172
/// </summary>

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
3-
"version": "1.6.5-preview.{height}",
3+
"version": "1.7.0-preview.{height}",
44
"assemblyVersion": {
55
"precision": "revision"
66
},

0 commit comments

Comments
 (0)