Mistake on this page? Email us
pt_certificate_api.h
Go to the documentation of this file.
1 /*
2  * ----------------------------------------------------------------------------
3  * Copyright 2019 ARM Ltd.
4  *
5  * SPDX-License-Identifier: Apache-2.0
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 PT_API_VERSION
22 #define PT_API_VERSION 2
23 #endif
24 #if PT_API_VERSION != 2
25 #error "Including mixed versions of Protocol API"
26 #endif
27 
28 #ifndef PT_CERTIFICATE_API_H_
29 #define PT_CERTIFICATE_API_H_
30 
32 
56 struct pt_certificate_list;
57 typedef struct pt_certificate_list pt_certificate_list_t;
58 
64 typedef void (*pt_certificates_set_response_handler)(const connection_id_t connection_id, void *userdata);
65 
69 typedef void (*pt_certificate_renew_response_handler)(const connection_id_t connection_id, void *userdata);
70 
75 pt_certificate_list_t *pt_certificate_list_create();
76 
81 void pt_certificate_list_destroy(pt_certificate_list_t *list);
82 
90 pt_status_t pt_certificate_list_add(pt_certificate_list_t *list, const char *name);
91 
101 pt_status_t pt_certificate_renewal_list_set(const connection_id_t connection_id,
102  pt_certificate_list_t *list,
103  pt_certificates_set_response_handler success_handler,
104  pt_certificates_set_response_handler failure_handler,
105  void *userdata);
106 
116 pt_status_t pt_certificate_renew(const connection_id_t connection_id,
117  const char *name,
120  void *userdata);
121 
127 #endif /* PT_CERTIFICATE_API_H_ */
128 
void(* pt_certificates_set_response_handler)(const connection_id_t connection_id, void *userdata)
Type definition for pt_certificate_renewal_list_set response success and failure handlers.
Definition: pt_certificate_api.h:64
Contains common structures and definitions for the protocol translator client.
void(* pt_certificate_renew_response_handler)(const connection_id_t connection_id, void *userdata)
Type definition for pt_certificate_renew response success and failure handlers.
Definition: pt_certificate_api.h:69
pt_status_t pt_certificate_list_add(pt_certificate_list_t *list, const char *name)
Adds a certificate to certificate list.
pt_certificate_list_t * pt_certificate_list_create()
Creates a certificate list.
void pt_certificate_list_destroy(pt_certificate_list_t *list)
Destroys the certificate list. Frees all the certificates added to the list.
pt_status_t pt_certificate_renew(const connection_id_t connection_id, const char *name, pt_certificate_renew_response_handler success_handler, pt_certificate_renew_response_handler failure_handler, void *userdata)
Requests the renewal of the certificate specified by the name parameter.
pt_status_t pt_certificate_renewal_list_set(const connection_id_t connection_id, pt_certificate_list_t *list, pt_certificates_set_response_handler success_handler, pt_certificates_set_response_handler failure_handler, void *userdata)
Sends the certificate list to Edge, triggering renewal subscriptions of the certificates in the list...