Skip to content

Commit

Permalink
config UPDATE rename config_new and del some funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
Roytak committed Oct 19, 2023
1 parent 0a59fca commit 4b89b62
Show file tree
Hide file tree
Showing 26 changed files with 1,774 additions and 4,327 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,16 @@ set(libsrc
src/session_client.c
src/session_server.c
src/server_config.c
src/config_new.c)
src/server_config_util.c)

if(ENABLE_SSH_TLS)
list(APPEND libsrc
src/session_client_ssh.c
src/session_server_ssh.c
src/config_new_ssh.c
src/server_config_util_ssh.c
src/session_client_tls.c
src/session_server_tls.c
src/config_new_tls.c
src/server_config_util_tls.c
src/server_config_ks.c
src/server_config_ts.c)
set(SSH_TLS_MACRO "#ifndef NC_ENABLED_SSH_TLS\n#define NC_ENABLED_SSH_TLS\n#endif")
Expand Down
282 changes: 126 additions & 156 deletions doc/libnetconf.doc

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions examples/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,19 @@ init(struct ly_ctx **context, struct nc_pollsession **ps, const char *path, NC_T

/* this is where the YANG configuration data gets generated,
* start by creating hostkey configuration data */
rc = nc_server_config_new_ssh_hostkey(*context, "endpt", "hostkey", hostkey_path, NULL, &config);
rc = nc_server_config_add_ssh_hostkey(*context, "endpt", "hostkey", hostkey_path, NULL, &config);
if (rc) {
ERR_MSG_CLEANUP("Error creating new hostkey configuration data.\n");
}

/* create address and port configuration data */
rc = nc_server_config_new_address_port(*context, "endpt", NC_TI_LIBSSH, SSH_ADDRESS, SSH_PORT, &config);
rc = nc_server_config_add_address_port(*context, "endpt", NC_TI_LIBSSH, SSH_ADDRESS, SSH_PORT, &config);
if (rc) {
ERR_MSG_CLEANUP("Error creating new address and port configuration data.\n");
}

/* create client authentication configuration data */
rc = nc_server_config_new_ssh_user_password(*context, "endpt", SSH_USERNAME, SSH_PASSWORD, &config);
rc = nc_server_config_add_ssh_user_password(*context, "endpt", SSH_USERNAME, SSH_PASSWORD, &config);
if (rc) {
ERR_MSG_CLEANUP("Error creating client authentication configuration data.\n");
}
Expand Down
Loading

0 comments on commit 4b89b62

Please sign in to comment.