Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sol-certificate.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Soletta (TM) Project
3  *
4  * Copyright (C) 2015 Intel Corporation. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #pragma once
20 
21 #include <sol-common-buildopts.h>
22 #include <sol-types.h>
23 #include <sol-str-slice.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
47 struct sol_cert;
48 typedef struct sol_cert sol_cert;
49 
64 struct sol_cert *sol_cert_load_from_id(const char *id);
65 
73 struct sol_cert *sol_cert_ref(struct sol_cert *cert);
74 
80 void sol_cert_unref(struct sol_cert *cert);
81 
82 #ifdef SOL_FEATURE_FILESYSTEM
83 
91 const char *sol_cert_get_file_name(const struct sol_cert *cert);
92 
93 #endif /*SOL_FEATURE_FILESYSTEM*/
94 
102 struct sol_blob *sol_cert_get_contents(const struct sol_cert *cert);
103 
117 ssize_t sol_cert_write_contents(const char *file_name, struct sol_str_slice contents);
118 
123 #ifdef __cplusplus
124 }
125 #endif
void sol_cert_unref(struct sol_cert *cert)
Free the resources a sol_cert object and the object itself.
These routines are used for Soletta types' manipulation.
struct sol_cert sol_cert
Certificate handler.
Definition: sol-certificate.h:48
static struct sol_cert * cert
Definition: server-https.c:51
struct sol_cert * sol_cert_load_from_id(const char *id)
Load a certificate from an id.
String slice type.
Definition: sol-str-slice.h:84
struct sol_cert * sol_cert_ref(struct sol_cert *cert)
Increments the reference counter of the given sol_cert.
Data type describing the default blob implementation.
Definition: sol-types.h:468
ssize_t sol_cert_write_contents(const char *file_name, struct sol_str_slice contents)
Write contents to cert.
These are routines that Soletta provides for its string slice implementation.
struct sol_blob * sol_cert_get_contents(const struct sol_cert *cert)
Get the certificate contents.