CA Integration: Sending observe register/deregister request from client to server...
[platform/upstream/iotivity.git] / resource / csdk / stack / include / ocsecurity.h
1 //******************************************************************
2 //
3 // Copyright 2014 Intel Corporation All Rights Reserved.
4 //
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 //
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
10 //
11 //      http://www.apache.org/licenses/LICENSE-2.0
12 //
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.
18 //
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20
21 #ifndef OC_SECURITY_H
22 #define OC_SECURITY_H
23
24 #include "ocstack.h"
25 #include "ocsecurityconfig.h"
26 #include <stdio.h>
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif // __cplusplus
31
32 /**
33  * Provides the DTLS PSK credetials blob to OC stack.
34  *
35  * @param credInfo
36  *     binary blob containing credentials
37  * @param len
38  *     length of binary blob
39  *
40  * @retval OC_STACK_OK for Success, otherwise some error value
41  */
42 OCStackResult OCSetDtlsPskCredentials(const OCDtlsPskCredsBlob *credInfo,
43                 size_t len);
44
45 #ifdef __cplusplus
46 }
47 #endif // __cplusplus
48
49 #endif //OC_SECURITY_H