File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 11
11
12
12
////////////////////////////////////////////////////////////////
13
13
// update this whenever the native assembly signature changes //
14
- [ assembly: AssemblyNativeVersion ( "100.1.5.0 " ) ]
14
+ [ assembly: AssemblyNativeVersion ( "100.1.5.1 " ) ]
15
15
////////////////////////////////////////////////////////////////
16
16
17
17
// Setting ComVisible to false makes the types in this assembly not visible
Original file line number Diff line number Diff line change @@ -74,5 +74,27 @@ public static bool AddCaCertificateBundle(string ca)
74
74
/// </remarks>
75
75
[ MethodImpl ( MethodImplOptions . InternalCall ) ]
76
76
public static extern bool AddCaCertificateBundle ( byte [ ] ca ) ;
77
+
78
+ /// <summary>
79
+ /// Loads the device public key from the device certificate store.
80
+ /// If public key was found, initializes a new instance of the <see cref="X509Certificate"/>.
81
+ /// </summary>
82
+ /// <returns>The certificate that was loaded from the certificate store.</returns>
83
+ /// <remarks>
84
+ /// This method is exclusive of nanoFramework. There is no equivalent in .NET framework.
85
+ /// </remarks>
86
+ public static X509Certificate GetDevicePublicKey ( )
87
+ {
88
+ byte [ ] certificate = GetDevicePublicKeyRaw ( ) ;
89
+ if ( certificate is not null )
90
+ {
91
+ return new X509Certificate ( certificate ) ;
92
+ }
93
+
94
+ return null ;
95
+ }
96
+
97
+ [ MethodImpl ( MethodImplOptions . InternalCall ) ]
98
+ private static extern byte [ ] GetDevicePublicKeyRaw ( ) ;
77
99
}
78
100
}
You can’t perform that action at this time.
0 commit comments