Merge "Implement functionality to set PSK credentials for DTLS in OC stack."
authorsudarshan prasad <sudarshan.prasad@intel.com>
Fri, 5 Dec 2014 01:59:58 +0000 (17:59 -0800)
committerGerrit Code Review <gerrit@oicreview.vlan14.01.org>
Fri, 5 Dec 2014 01:59:58 +0000 (17:59 -0800)
1  2 
resource/csdk/libcoap-4.1.1/makefile
resource/csdk/libcoap-4.1.1/sec/netdtls.c
resource/csdk/makefile
resource/csdk/stack/samples/linux/secure/common.cpp
resource/csdk/stack/samples/linux/secure/ocserverbasicops.cpp
resource/csdk/stack/samples/linux/secure/ocserverbasicops.h
resource/csdk/stack/src/ocstack.c

index 32138f6d2cfe33ce02572254d800c3fb13708224,0cdcb0b9a889723a8532bb9a79abdb9078df7d19..ddf4fec04ee7b7154cca2b5512b72b544c90ff33
@@@ -43,10 -43,8 +43,10 @@@ LOGGER_DIR    = $(ROOT_DIR)/logge
  RANDOM_DIR    = $(ROOT_DIR)/ocrandom
  STACK_DIR     = $(ROOT_DIR)/stack
  OCMALLOC_DIR  = $(ROOT_DIR)/ocmalloc
 +EXTLIBS_DIR   = $(ROOT_DIR)/../../extlibs
 +TINYDTLS_DIR  = $(EXTLIBS_DIR)/tinydtls
  INC_DIRS      = -I$(OCSOCK_DIR)/include/ -I$(LOGGER_DIR)/include -I$(RANDOM_DIR)/include \
-                 -I$(OCMALLOC_DIR)/include -I$(OC_LOG_DIR)/include 
+                 -I$(OCMALLOC_DIR)/include -I$(OC_LOG_DIR)/include -I$(STACK_DIR)/include
  
  # Note for Arduino: The CC flag is set to the C++ compiler since Arduino build 
  # includes Time.h header file which has C++ style definitions.
index 3fb7b52987e72280168cc9814afd17925cb8222d,15cbe396173700229e4015eb1172dd4793b385e3..d3cf077cb481451682ee26a6c9a65a4c1148e660
@@@ -133,8 -133,8 +133,9 @@@ OCTBSTACK_SOURCES  := $(OCTBSTACK_SRC)/o
  OCTBSTACK_SOURCES     += $(OCTBSTACK_SRC)/occlientcb.c
  OCTBSTACK_SOURCES     += $(OCTBSTACK_SRC)/ocresource.c
  OCTBSTACK_SOURCES     += $(OCTBSTACK_SRC)/ocobserve.c
 +OCTBSTACK_SOURCES     += $(OCTBSTACK_SRC)/ocserverrequest.c
  OCTBSTACK_SOURCES     += $(OCTBSTACK_SRC)/occollection.c
+ OCTBSTACK_SOURCES     += $(OCTBSTACK_SRC)/ocsecurity.c
  
  SOURCES                       := $(CJSON_SOURCES)
  SOURCES                       += $(OCCOAP_SOURCES)
index 4edbd8ee3d2e884b36eb6d91f8aa5549d2b8f526,5a072d766d8db865974c0dc3a9da97d2278a76e4..4e1f7ebef98bb20a1f670b851b6e62aa027d2df6
@@@ -54,19 -54,10 +54,16 @@@ char* constructJsonResponse (OCEntityHa
  /* Following methods process the PUT, GET, POST
   * requests
   */
 -void ProcessGetRequest (OCEntityHandlerRequest *ehRequest);
 -void ProcessPutRequest (OCEntityHandlerRequest *ehRequest);
 -void ProcessPostRequest (OCEntityHandlerRequest *ehRequest);
 +OCEntityHandlerResult ProcessGetRequest (OCEntityHandlerRequest *ehRequest,
 +                                         char *payload,
 +                                         size_t maxPayloadSize);
 +OCEntityHandlerResult ProcessPutRequest (OCEntityHandlerRequest *ehRequest,
 +                                         char *payload,
 +                                         size_t maxPayloadSize);
 +OCEntityHandlerResult ProcessPostRequest (OCEntityHandlerRequest *ehRequest,
 +                                          char *payload,
 +                                          size_t maxPayloadSize);
  
- /* call getResult in common.cpp to get the result in string format. */
- const char *getResult(OCStackResult result);
  //-----------------------------------------------------------------------------
  // Callback functions
  //-----------------------------------------------------------------------------
index 67bbb6852657c4fcb3487bad7261148696e0eb4b,32a75724094b38279dec83d0f3305d32f23d91a8..2738c962b152f2a67869bb9d0d85840fee1948e8
@@@ -69,8 -68,11 +69,13 @@@ OCDeviceEntityHandler defaultDeviceHand
  #define VERIFY_NON_NULL(arg, logLevel, retVal) { if (!(arg)) { OC_LOG((logLevel), \
               TAG, PCF(#arg " is NULL")); return (retVal); } }
  
 +//TODO: we should allow the server to define this
 +#define MAX_OBSERVE_AGE (0x2FFFFUL)
+ //-----------------------------------------------------------------------------
+ // Externs
+ //-----------------------------------------------------------------------------
+ extern void DeinitOCSecurityInfo();
  //-----------------------------------------------------------------------------
  // Internal API function
  //-----------------------------------------------------------------------------