-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Improve Monitor_UpdateConfiguration command to handle configuration blocks larger then the WP buffer size. - Add new configuration block to store X509 certificates. Signed-off-by: José Simões <jose.simoes@eclo.solutions>
- Loading branch information
1 parent
d0919cf
commit a6fec93
Showing
9 changed files
with
334 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
source/nanoFramework.Tools.DebugLibrary.Shared/DeviceConfiguration/X509CertificateBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// Copyright (c) 2018 The nanoFramework project contributors | ||
// See LICENSE file in the project root for full license information. | ||
// | ||
|
||
namespace nanoFramework.Tools.Debugger | ||
{ | ||
public class X509CertificateBase | ||
{ | ||
/// <summary> | ||
/// This is the marker placeholder for this configuration block | ||
/// 4 bytes length. | ||
/// </summary> | ||
public byte[] Marker; | ||
|
||
/// <summary> | ||
/// Size of the certificate. | ||
/// </summary> | ||
public uint CertificateSize; | ||
|
||
/// <summary> | ||
/// Certificate | ||
/// </summary> | ||
public byte[] Certificate; | ||
|
||
public X509CertificateBase() | ||
{ | ||
// need to init these here to match the expected size on the struct to be sent to the device | ||
Marker = new byte[4]; | ||
Certificate = new byte[64]; | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
...oFramework.Tools.DebugLibrary.Shared/DeviceConfiguration/X509CertificatePropertiesBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// Copyright (c) 2018 The nanoFramework project contributors | ||
// See LICENSE file in the project root for full license information. | ||
// | ||
|
||
using PropertyChanged; | ||
|
||
namespace nanoFramework.Tools.Debugger | ||
{ | ||
[AddINotifyPropertyChangedInterface] | ||
public class X509CertificatePropertiesBase | ||
{ | ||
private byte[] _certificate; | ||
|
||
public uint CertificateSize { get; set; } | ||
|
||
public byte[] Certificate | ||
{ | ||
get => _certificate; | ||
set | ||
{ | ||
_certificate = value; | ||
CertificateSize = (uint)value.Length; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.