44 * @brief libnetconf2 Call Home session client manipulation
55 *
66 * @copyright
7- * Copyright (c) 2015 - 2021 CESNET, z.s.p.o.
7+ * Copyright (c) 2015 - 2023 CESNET, z.s.p.o.
88 *
99 * This source code is licensed under BSD 3-Clause License (the "License").
1010 * You may not use this file except in compliance with the License.
@@ -44,8 +44,10 @@ extern "C" {
4444 * @brief Accept a Call Home connection on any of the listening binds.
4545 *
4646 * @param[in] timeout Timeout for receiving a new connection in milliseconds, 0 for
47- * non-blocking call, -1 for infinite waiting.
48- * @param[in] ctx Session context to use. Can be NULL.
47+ * non-blocking call, -1 for infinite waiting.
48+ * @param[in,out] ctx Optional custom context to use for the session. If not set, a default context is created.
49+ * Any YANG modules not present in the context and supported by the server are loaded using \<get-schema\>
50+ * (if supported) and/or by searching the searchpath (see ::nc_client_set_schema_searchpath()).
4951 * @param[out] session New session.
5052 * @return 1 on success, 0 on timeout, -1 on error.
5153 */
@@ -73,7 +75,7 @@ int nc_accept_callhome(int timeout, struct ly_ctx *ctx, struct nc_session **sess
7375 * nc_client_ssh_ch_get_auth_hostkey_check_clb()).
7476 *
7577 * @param[in] auth_hostkey_check Function to call, returns 0 on success, non-zero in error.
76- * If NULL, the default callback is set.
78+ * If NULL, the default callback is set.
7779 * @param[in] priv Optional private data to be passed to the callback function.
7880 */
7981void nc_client_ssh_ch_set_auth_hostkey_check_clb (int (* auth_hostkey_check )(const char * hostname , ssh_session session , void * priv ),
@@ -97,7 +99,7 @@ void nc_client_ssh_ch_get_auth_hostkey_check_clb(int (**auth_hostkey_check)(cons
9799 * nc_client_ssh_ch_get_auth_password_clb()).
98100 *
99101 * @param[in] auth_password Function to call, returns the password for username\@hostname.
100- * If NULL, the default callback is set.
102+ * If NULL, the default callback is set.
101103 * @param[in] priv Optional private data to be passed to the callback function.
102104 */
103105void nc_client_ssh_ch_set_auth_password_clb (char * (* auth_password )(const char * username , const char * hostname , void * priv ),
@@ -121,8 +123,7 @@ void nc_client_ssh_ch_get_auth_password_clb(char *(**auth_password)(const char *
121123 * nc_client_ssh_ch_get_auth_interactive_clb()).
122124 *
123125 * @param[in] auth_interactive Function to call for every question, returns the answer for
124- * authentication name with instruction and echoing prompt.
125- * If NULL, the default callback is set.
126+ * authentication name with instruction and echoing prompt. If NULL, the default callback is set.
126127 * @param[in] priv Optional private data to be passed to the callback function.
127128 */
128129void nc_client_ssh_ch_set_auth_interactive_clb (char * (* auth_interactive )(const char * auth_name , const char * instruction ,
@@ -147,8 +148,8 @@ void nc_client_ssh_ch_get_auth_interactive_clb(char *(**auth_interactive)(const
147148 * freeing the private data when necessary (the private data can be obtained by
148149 * nc_client_ssh_ch_get_auth_privkey_passphrase_clb()).
149150 *
150- * @param[in] auth_privkey_passphrase Function to call for every question, returns
151- * the passphrase for the specific private key.
151+ * @param[in] auth_privkey_passphrase Function to call for every question, returns the passphrase for the specific
152+ * private key.
152153 * @param[in] priv Optional private data to be passed to the callback function.
153154 */
154155void nc_client_ssh_ch_set_auth_privkey_passphrase_clb (char * (* auth_privkey_passphrase )(const char * privkey_path , void * priv ),
@@ -301,7 +302,7 @@ int nc_client_tls_ch_del_bind(const char *address, uint16_t port);
301302 *
302303 * @param[in] client_cert Path to the file containing the client certificate.
303304 * @param[in] client_key Path to the file containing the private key for the @p client_cert.
304- * If NULL, key is expected to be stored with @p client_cert.
305+ * If NULL, key is expected to be stored with @p client_cert.
305306 * @return 0 on success, -1 on error.
306307 */
307308int nc_client_tls_ch_set_cert_key_paths (const char * client_cert , const char * client_key );
@@ -310,29 +311,26 @@ int nc_client_tls_ch_set_cert_key_paths(const char *client_cert, const char *cli
310311 * @brief Get client Call Home authentication identity - a certificate and a private key.
311312 *
312313 * @param[out] client_cert Path to the file containing the client certificate. Can be NULL.
313- * @param[out] client_key Path to the file containing the private key for the @p client_cert.
314- * Can be NULL.
314+ * @param[out] client_key Path to the file containing the private key for the @p client_cert. Can be NULL.
315315 */
316316void nc_client_tls_ch_get_cert_key_paths (const char * * client_cert , const char * * client_key );
317317
318318/**
319319 * @brief Set client Call Home trusted CA certificates.
320320 *
321321 * @param[in] ca_file Location of the CA certificate file used to verify server certificates.
322- * For more info, see the documentation for SSL_CTX_load_verify_locations() from OpenSSL.
322+ * For more info, see the documentation for SSL_CTX_load_verify_locations() from OpenSSL.
323323 * @param[in] ca_dir Location of the CA certificates directory used to verify the server certificates.
324- * For more info, see the documentation for SSL_CTX_load_verify_locations() from OpenSSL.
324+ * For more info, see the documentation for SSL_CTX_load_verify_locations() from OpenSSL.
325325 * @return 0 on success, -1 on error.
326326 */
327327int nc_client_tls_ch_set_trusted_ca_paths (const char * ca_file , const char * ca_dir );
328328
329329/**
330330 * @brief Get client Call Home trusted CA certificates.
331331 *
332- * @param[out] ca_file Location of the CA certificate file used to verify server certificates.
333- * Can be NULL.
334- * @param[out] ca_dir Location of the CA certificates directory used to verify the server certificates.
335- * Can be NULL.
332+ * @param[out] ca_file Location of the CA certificate file used to verify server certificates. Can be NULL.
333+ * @param[out] ca_dir Location of the CA certificates directory used to verify the server certificates. Can be NULL.
336334 */
337335void nc_client_tls_ch_get_trusted_ca_paths (const char * * ca_file , const char * * ca_dir );
338336
@@ -348,10 +346,8 @@ int nc_client_tls_ch_set_crl_paths(const char *crl_file, const char *crl_dir);
348346/**
349347 * @brief Get client Call Home Certificate Revocation Lists.
350348 *
351- * @param[out] crl_file Location of the CRL certificate file used to check for revocated certificates.
352- * Can be NULL.
353- * @param[out] crl_dir Location of the CRL certificate directory used to check for revocated certificates.
354- * Can be NULL.
349+ * @param[out] crl_file Location of the CRL certificate file used to check for revocated certificates. Can be NULL.
350+ * @param[out] crl_dir Location of the CRL certificate directory used to check for revocated certificates. Can be NULL.
355351 */
356352void nc_client_tls_ch_get_crl_paths (const char * * crl_file , const char * * crl_dir );
357353
0 commit comments