2020-08-18 00:15:20 +08:00
|
|
|
#ifndef _KUBE_CONFIG_UTIL_H
|
|
|
|
|
#define _KUBE_CONFIG_UTIL_H
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* kubeconfig_mk_cert_key_tempfile
|
|
|
|
|
*
|
|
|
|
|
* Description:
|
|
|
|
|
*
|
|
|
|
|
* Create a temporary file to persist SSL/TLS certificate or key
|
|
|
|
|
*
|
|
|
|
|
* Return:
|
|
|
|
|
*
|
|
|
|
|
* char * : File name of created temporary file
|
|
|
|
|
* NULL : Failed to create temporary file
|
|
|
|
|
*
|
|
|
|
|
* Parameter:
|
|
|
|
|
*
|
|
|
|
|
* IN:
|
|
|
|
|
* data: raw data of SSL/TLS certificate or key
|
|
|
|
|
*
|
|
|
|
|
* OUT:
|
|
|
|
|
* None
|
|
|
|
|
*
|
|
|
|
|
*/
|
2020-09-26 13:08:37 +08:00
|
|
|
char *kubeconfig_mk_cert_key_tempfile(const char *data);
|
2020-08-18 00:15:20 +08:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* unsetSslConfig
|
|
|
|
|
*
|
|
|
|
|
* Description:
|
|
|
|
|
*
|
|
|
|
|
* unset the SSL configuration
|
|
|
|
|
*
|
|
|
|
|
* Return:
|
|
|
|
|
*
|
|
|
|
|
* None
|
|
|
|
|
*
|
|
|
|
|
* Parameter:
|
|
|
|
|
*
|
|
|
|
|
* IN:
|
|
|
|
|
* sslConfig: The SSL configuration
|
|
|
|
|
*
|
|
|
|
|
* OUT:
|
|
|
|
|
* None
|
|
|
|
|
*
|
|
|
|
|
*/
|
2020-09-26 13:08:37 +08:00
|
|
|
void unsetSslConfig(sslConfig_t * sslConfig);
|
2020-08-18 00:15:20 +08:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* clear_and_free_string_pair_list
|
|
|
|
|
*
|
|
|
|
|
* Description:
|
|
|
|
|
*
|
|
|
|
|
* clear the content and free the memory for a string pair list
|
|
|
|
|
*
|
|
|
|
|
* Return:
|
|
|
|
|
*
|
|
|
|
|
* None
|
|
|
|
|
*
|
|
|
|
|
* Parameter:
|
|
|
|
|
*
|
|
|
|
|
* IN:
|
|
|
|
|
* list: The string pair list needs to clear and free
|
|
|
|
|
*
|
|
|
|
|
* OUT:
|
|
|
|
|
* None
|
|
|
|
|
*
|
|
|
|
|
*/
|
2020-09-26 13:08:37 +08:00
|
|
|
void clear_and_free_string_pair_list(list_t * list);
|
2020-08-18 00:15:20 +08:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#endif /* _KUBE_CONFIG_UTIL_H */
|