From d2766e17e42c8d586d48488f84ec3517c3e0713b Mon Sep 17 00:00:00 2001 From: Jim Schaad Date: Mon, 16 Jan 2017 11:23:19 -0800 Subject: [PATCH 1/3] Initial Cut for review purposes This gets basic OSCOAP working, but there is still alot to look at before it is finalized --- CoAP.NET/CoAP.NET40.csproj | 28 +- CoAP.NET/CoapConfig.cs | 57 ++ CoAP.NET/ICoapConfig.cs | 6 + CoAP.NET/Message.cs | 12 + CoAP.NET/Net/Exchange.cs | 46 ++ CoAP.NET/OSCOAP/HKDF.cs | 256 +++++++++ CoAP.NET/OSCOAP/OscoapLayer.cs | 422 +++++++++++++++ CoAP.NET/OSCOAP/OscoapOption.cs | 27 + CoAP.NET/OSCOAP/SecureBlockwiseLayer.cs | 675 ++++++++++++++++++++++++ CoAP.NET/OSCOAP/SecurityContext.cs | 139 +++++ CoAP.NET/OSCOAP/SecurityContextSet.cs | 26 + CoAP.NET/Option.cs | 4 + CoAP.NET/OptionType.cs | 7 +- CoAP.NET/Request.cs | 11 + CoAP.NET/Server/Resources/Resource.cs | 34 ++ CoAP.NET/Stack/CoapStack.cs | 4 + CoAP.NET/Util/Utils.cs | 4 + CoAP.NET/project.json | 29 +- 18 files changed, 1771 insertions(+), 16 deletions(-) create mode 100644 CoAP.NET/OSCOAP/HKDF.cs create mode 100644 CoAP.NET/OSCOAP/OscoapLayer.cs create mode 100644 CoAP.NET/OSCOAP/OscoapOption.cs create mode 100644 CoAP.NET/OSCOAP/SecureBlockwiseLayer.cs create mode 100644 CoAP.NET/OSCOAP/SecurityContext.cs create mode 100644 CoAP.NET/OSCOAP/SecurityContextSet.cs diff --git a/CoAP.NET/CoAP.NET40.csproj b/CoAP.NET/CoAP.NET40.csproj index 7333e40..ec1f262 100644 --- a/CoAP.NET/CoAP.NET40.csproj +++ b/CoAP.NET/CoAP.NET40.csproj @@ -19,7 +19,7 @@ full false bin\Debug\NET40\ - TRACE;DEBUG;COAPALL + TRACE;DEBUG;COAPALL;INCLUDE_OSCOAP prompt 4 @@ -27,24 +27,18 @@ pdbonly true bin\Release\NET40\ - TRACE;COAPALL + TRACE;COAPALL;INCLUDE_OSCOAP prompt 4 bin\Release\NET40\CoAP.NET.XML - true + false coapnet.snk - - ..\packages\Common.Logging.3.0.0\lib\net40\Common.Logging.dll - - - ..\packages\Common.Logging.Core.3.0.0\lib\net40\Common.Logging.Core.dll - @@ -102,6 +96,12 @@ + + + + + + @@ -146,6 +146,16 @@ + + + {4c235092-820c-4deb-9074-d356fb797d8b} + BouncyCastle + + + {d02f476f-bc2c-4d01-bede-eb8e79dd050e} + COSE.Net40 + +