Commit c3772a00 authored by George Nash's avatar George Nash Committed by Kishen Maloor

Removed include security/oc_sp.h from oc_pki.h

- Removed #include "security/oc_sp.h"
- Moved oc_sp_type_t enum from oc_sp.h to oc_pki.h
- oc_pki.h is now included in oc_sp.h

The header file oc_sp.h is not part of the public
API by placing it in a public header file we are
inadvertently making it part of the public API since
the only way to build code that included oc_pki.h was
to also include the internal header oc_sp.h.

The only part of oc_sp.h that is need in the public API
is the oc_sp_type_t enum. So this was moved from the internal
header file to the public header file and the include order
was reversed so the privet header no longer shows up in the
public header file.

Change-Id: If5dc7e84dbc574dc251f1d274730c033c4c9cec8
Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/29443Tested-by: default avatarIoTivity Jenkins <jenkins-daemon@iotivity.org>
Reviewed-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
parent 3f01f2bd
...@@ -17,12 +17,17 @@ ...@@ -17,12 +17,17 @@
#ifndef OC_PKI_H #ifndef OC_PKI_H
#define OC_PKI_H #define OC_PKI_H
#include "security/oc_sp.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
typedef enum {
OC_SP_BASELINE = 1 << 1,
OC_SP_BLACK = 1 << 2,
OC_SP_BLUE = 1 << 3,
OC_SP_PURPLE = 1 << 4
} oc_sp_types_t;
int oc_pki_add_mfg_cert(size_t device, const unsigned char *cert, int oc_pki_add_mfg_cert(size_t device, const unsigned char *cert,
size_t cert_size, const unsigned char *key, size_t cert_size, const unsigned char *key,
size_t key_size); size_t key_size);
......
...@@ -18,18 +18,12 @@ ...@@ -18,18 +18,12 @@
#define OC_SP_H #define OC_SP_H
#include "oc_ri.h" #include "oc_ri.h"
#include "oc_pki.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
typedef enum {
OC_SP_BASELINE = 1 << 1,
OC_SP_BLACK = 1 << 2,
OC_SP_BLUE = 1 << 3,
OC_SP_PURPLE = 1 << 4
} oc_sp_types_t;
typedef struct typedef struct
{ {
oc_sp_types_t supported_profiles; oc_sp_types_t supported_profiles;
......
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