Commit bb56ee3c authored by Kishen Maloor's avatar Kishen Maloor

oc_obt:new APIs to RETRIEVE/DELETE ACEs and Creds

Change-Id: Iba8ac93efadd2161f2c2935153c5ced9dffb3d87
Signed-off-by: Kishen Maloor's avatarKishen Maloor <>
parent 5d9dd1df
......@@ -108,6 +108,20 @@ int oc_obt_provision_auth_wildcard_ace(oc_uuid_t *subject,
oc_obt_device_status_cb_t cb,
void *data);
typedef void (*oc_obt_creds_cb_t)(struct oc_sec_creds_t *, void *);
int oc_obt_retrieve_creds(oc_uuid_t *subject, oc_obt_creds_cb_t cb, void *data);
void oc_obt_free_creds(oc_sec_creds_t *creds);
int oc_obt_delete_cred_by_credid(oc_uuid_t *uuid, int credid,
oc_obt_status_cb_t cb, void *data);
typedef void (*oc_obt_acl_cb_t)(oc_sec_acl_t *, void *);
int oc_obt_retrieve_acl(oc_uuid_t *uuid, oc_obt_acl_cb_t cb, void *data);
void oc_obt_free_acl(oc_sec_acl_t *acl);
int oc_obt_delete_ace_by_aceid(oc_uuid_t *uuid, int aceid,
oc_obt_status_cb_t cb, void *data);
#ifdef __cplusplus
This diff is collapsed.
// Copyright (c) 2019 Intel Corporation
// Copyright (c) 2017-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.
......@@ -19,6 +19,7 @@
#include "oc_api.h"
#include "oc_endpoint.h"
#include "oc_obt.h"
#include "oc_uuid.h"
#include "security/oc_pstat.h"
#include "util/oc_list.h"
......@@ -106,6 +107,24 @@ typedef struct oc_credprov_ctx_t
oc_role_t *roles;
} oc_credprov_ctx_t;
/* Context over a RETRIEVE credentials request */
typedef struct oc_credret_ctx_t
struct oc_credret_ctx_t *next;
oc_obt_creds_cb_t cb;
void *data;
} oc_credret_ctx_t;
/* Context over a DELETE credentials request */
typedef struct oc_creddel_ctx_t
struct oc_creddel_ctx_t *next;
oc_status_cb_t cb;
oc_switch_dos_ctx_t *switch_dos;
oc_device_t *device;
int credid;
} oc_creddel_ctx_t;
/* Context to be maintained over ACE provisioning sequence */
typedef struct oc_acl2prov_ctx_t
......@@ -116,6 +135,24 @@ typedef struct oc_acl2prov_ctx_t
oc_switch_dos_ctx_t *switch_dos;
} oc_acl2prov_ctx_t;
/* Context over a RETRIEVE ACL request */
typedef struct oc_aclret_ctx_t
struct oc_aclret_ctx_t *next;
oc_obt_acl_cb_t cb;
void *data;
} oc_aclret_ctx_t;
/* Context over a DELETE ACE request */
typedef struct oc_acedel_ctx_t
struct oc_acedel_ctx_t *next;
oc_status_cb_t cb;
oc_switch_dos_ctx_t *switch_dos;
oc_device_t *device;
int aceid;
} oc_acedel_ctx_t;
typedef enum {
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