Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ set(CMAKE_MACOSX_RPATH TRUE)
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(LIBNETCONF2_MAJOR_VERSION 4)
set(LIBNETCONF2_MINOR_VERSION 0)
set(LIBNETCONF2_MICRO_VERSION 4)
set(LIBNETCONF2_MICRO_VERSION 5)
set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION})

# Version of the library
# Major version is changed with every backward non-compatible API/ABI change in the library, minor version changes
# with backward compatible change and micro version is connected with any internal change of the library.
set(LIBNETCONF2_MAJOR_SOVERSION 5)
set(LIBNETCONF2_MINOR_SOVERSION 0)
set(LIBNETCONF2_MICRO_SOVERSION 4)
set(LIBNETCONF2_MICRO_SOVERSION 5)
set(LIBNETCONF2_SOVERSION_FULL ${LIBNETCONF2_MAJOR_SOVERSION}.${LIBNETCONF2_MINOR_SOVERSION}.${LIBNETCONF2_MICRO_SOVERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_SOVERSION})

Expand Down Expand Up @@ -123,9 +123,7 @@ if(ENABLE_SSH_TLS)
src/server_config_util_ssh.c
src/session_client_tls.c
src/session_server_tls.c
src/server_config_util_tls.c
src/server_config_ks.c
src/server_config_ts.c)
src/server_config_util_tls.c)
set(SSH_TLS_MACRO "#ifndef NC_ENABLED_SSH_TLS\n#define NC_ENABLED_SSH_TLS\n#endif")
endif()

Expand Down
20 changes: 15 additions & 5 deletions examples/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@
"name": "ssh-password-auth-endpt",
"ssh": {
"tcp-server-parameters": {
"local-address": "127.0.0.1",
"local-port": 10000
"local-bind": [
{
"local-address": "127.0.0.1",
"local-port": 10000
}
]
},
"ssh-server-parameters": {
"server-identity": {
Expand All @@ -32,7 +36,9 @@
"user": [
{
"name": "admin",
"password": "$0$admin"
"password": {
"hashed-password": "$0$admin"
}
}
]
}
Expand All @@ -44,8 +50,12 @@
"name": "ssh-pubkey-auth-endpt",
"ssh": {
"tcp-server-parameters": {
"local-address": "127.0.0.1",
"local-port": 10001
"local-bind": [
{
"local-address": "127.0.0.1",
"local-port": 10001
}
]
},
"ssh-server-parameters": {
"server-identity": {
Expand Down
7 changes: 7 additions & 0 deletions examples/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,13 @@ init(const char *unix_socket_path, struct ly_ctx **context, struct nc_pollsessio
}
}

/* since nc_server_config_setup_data() requires all implicit nodes to be present and the example
* configuration data does not contain all of them, we need to add them */
rc = lyd_new_implicit_tree(config, LYD_IMPLICIT_NO_STATE, NULL);
if (rc) {
ERR_MSG_CLEANUP("Adding implicit nodes to the example configuration data failed.\n");
}

/* apply the example configuration data to the server */
rc = nc_server_config_setup_data(config);
if (rc) {
Expand Down
Loading