Commit 803fec91 authored by Kishen Maloor's avatar Kishen Maloor

Minor cleanup

Change-Id: I4e5c96472460ecf9c23c3f03ab7e0d9559f8eaab
Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
parent a33af367
/*
// Copyright (c) 2016 Intel Corporation
// Copyright (c) 2016-2018 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
......@@ -441,6 +441,7 @@ ocf_event_thread(void *data)
printf("pthread_mutex_init failed!\n");
return NULL;
}
oc_set_con_res_announced(false);
oc_set_max_app_data_size(6000);
int init = oc_main_init(&handler);
if (init < 0)
......
/*
// Copyright (c) 2017-2019 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2016 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2016 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2017-2019 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2016 Intel Corporation
// Copyright (c) 2016-2018 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2016 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2016 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
......@@ -130,12 +130,13 @@ endif
OBT = onboarding_tool
ifeq ($(DEBUG),1)
CFLAGS += -DOC_DEBUG -g -O0
EXTRA_CFLAGS += -DOC_DEBUG -g -O0
ifeq ($(DEBUG_TLS),1)
CFLAGS += -DOC_DEBUG_TLS
EXTRA_CFLAGS += -DOC_DEBUG_TLS
endif
else
CFLAGS += -Wl,--gc-sections
CXXFLAGS += -Wl,--gc-sections
endif
ifeq ($(PKI),1)
......
/*
// Copyright (c) 2017-2019 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2017 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......@@ -17,7 +17,7 @@
#ifndef OC_ACL_H
#define OC_ACL_H
#include "oc_obt.h"
#include "oc_acl_common.h"
#include "oc_ri.h"
#include "oc_uuid.h"
#include "port/oc_log.h"
......
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
......@@ -23,7 +23,8 @@
#include "security/oc_cred.h"
#ifdef __cplusplus
extern "C" {
extern "C"
{
#endif
int oc_certs_parse_CN_for_UUID(const mbedtls_x509_crt *cert,
......
/*
// Copyright (c) 2017-2019 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2017-2019 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......@@ -25,7 +25,8 @@
#include "oc_ri.h"
#ifdef __cplusplus
extern "C" {
extern "C"
{
#endif
void get_csr(oc_request_t *request, oc_interface_mask_t iface_mask, void *data);
......
/*
// Copyright (c) 2017 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......@@ -62,7 +62,7 @@ oc_sec_doxm_init(void)
void
oc_sec_doxm_default(size_t device)
{
doxm[device].oxmsel = -1;
doxm[device].oxmsel = 0;
#ifdef OC_PKI
doxm[device].sct = 9;
#else /* OC_PKI */
......
/*
// Copyright (c) 2017 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......@@ -52,7 +52,8 @@ bool oc_sec_decode_doxm(oc_rep_t *rep, bool from_storage, size_t device);
void oc_sec_encode_doxm(size_t device);
oc_sec_doxm_t *oc_sec_get_doxm(size_t device);
void oc_sec_doxm_default(size_t device);
void get_doxm(oc_request_t *request, oc_interface_mask_t iface_mask, void *data);
void get_doxm(oc_request_t *request, oc_interface_mask_t iface_mask,
void *data);
void post_doxm(oc_request_t *request, oc_interface_mask_t iface_mask,
void *data);
......
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......@@ -22,7 +22,8 @@
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
extern "C"
{
#endif
#define OC_KEYPAIR_PUBKEY_SIZE (91)
......
/*
// Copyright (c) 2017-2019 Intel Corporation
// Copyright (c) 2019 Intel Corporation
//
// Li!censed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2017 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2017 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......@@ -22,7 +22,8 @@
#include "security/oc_tls.h"
#ifdef __cplusplus
extern "C" {
extern "C"
{
#endif
/* Used on the server-side for handling role assertions via /oic/sec/roles */
......
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......@@ -21,7 +21,8 @@
#include "oc_pki.h"
#ifdef __cplusplus
extern "C" {
extern "C"
{
#endif
typedef struct
......
/*
// Copyright (c) 2017 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2017 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2017 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2017 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......@@ -139,13 +139,6 @@ static int *ciphers = NULL;
#ifdef OC_PKI
static int selected_mfg_cred = -1;
static int selected_id_cred = -1;
#ifdef OC_CLIENT
static const int psk_priority[2] = {
MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, 0
};
#endif /* OC_CLIENT */
static const int default_priority[8] = {
#else /* OC_PKI */
static const int default_priority[2] = {
......@@ -163,6 +156,10 @@ static const int default_priority[2] = {
};
#ifdef OC_CLIENT
static const int psk_priority[2] = {
MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, 0
};
static const int anon_ecdh_priority[2] = {
MBEDTLS_TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256, 0
};
......@@ -188,6 +185,7 @@ static const int otm_priority[3] = {
#ifdef OC_CLIENT
#ifdef OC_PKI
static const int cloud_priority[3] = {
MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, 0
......
/*
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2016-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment