1 //******************************************************************
3 // Copyright 2016 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 #ifndef _OXM_MANUFACTURER_CERTIFICATE_H_
22 #define _OXM_MANUFACTURER_CERTIFICATE_H_
25 #include "securevirtualresourcetypes.h"
26 #include "ownershiptransfermanager.h"
34 * Callback implementation to prepare manufacturer certificate based OT.
36 * @param otmCtx Context of OTM, It includes current device information.
38 * @return ::OC_STACK_SUCCESS in case of success and other value otherwise.
40 OCStackResult PrepareMCertificateCallback(OTMContext_t *otmCtx);
43 * Callback implementation to establish a secure channel with RSA cipher suite.
45 * @param otmCtx Context of OTM, It includes current device information.
47 * @return ::OC_STACK_SUCCESS in case of success and other value otherwise.
49 OCStackResult CreateSecureSessionMCertificateCallback(OTMContext_t *otmCtx);
52 * Generate payload for select OxM request.
54 * @param otmCtx Context of OTM, It includes current device information.
55 * @param cborPayload is the DOXM CBOR payload including the selected OxM.
56 * @note Returned memory should be deallocated by caller.
57 * @param cborSize is the size of the cborPayload.
59 * @return ::OC_STACK_SUCCESS in case of success and other value otherwise.
61 OCStackResult CreateMCertificateBasedSelectOxmPayload(OTMContext_t *otmCtx, uint8_t **cborPayload,
65 * Generate payload for select OxM request for confirmed manufactrer certificate method.
67 * @param otmCtx Context of OTM, It includes current device information.
68 * @param cborPayload is the DOXM CBOR payload including the selected OxM.
69 * @note Returned memory should be deallocated by caller.
70 * @param cborSize is the size of the cborPayload.
72 * @return ::OC_STACK_SUCCESS in case of success and other value otherwise.
74 OCStackResult CreateConMCertificateBasedSelectOxmPayload(OTMContext_t *otmCtx, uint8_t **cborPayload,
78 * Generate payload for owner transfer request.
80 * @param otmCtx Context of OTM, It includes current device information.
81 * @param cborPaylaod is the DOXM CBOR payload including the owner information.
82 * @note Returned memory should be deallocated by caller.
83 * @param cborSize is the size of the cborPayload.
85 * @return ::OC_STACK_SUCCESS in case of success and other value otherwise.
87 OCStackResult CreateMCertificateBasedOwnerTransferPayload(OTMContext_t *otmCtx, uint8_t **cborPayload,
93 #endif //_OXM_MANUFACTURER_CERTIFICATE_H_