Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libnetconf4 #442

Merged
merged 134 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
a19f91b
libnetconf UPDATE YANG data configuration
Feb 2, 2023
b9f25d3
keystore UPDATE use keys stored in keystore module
Feb 17, 2023
cbe5d4c
test_client_ssh BUGFIX memory leaks
Feb 17, 2023
3d6fdc0
UNIX socket UPDATE configurable with YANG data
Feb 24, 2023
eb9f1d9
configuration UPDATE file and func names unified
Feb 24, 2023
4fab716
configuration UPDATE new config YANG data creation
Mar 10, 2023
751dbad
configuration UPDATE auth user YANG data creation
Mar 24, 2023
cb93834
configuration UPDATE password, none & interactive
Mar 24, 2023
1a5dc4f
server ssh UPDATE require all set auth methods
Mar 24, 2023
dc388af
configuration UPDATE headers reorganized
Mar 31, 2023
68a8cda
configuration REFACTOR struct names and defs + doc
Mar 31, 2023
3293055
configuration UPDATE truststore support added
Apr 5, 2023
8c5ddd2
examples UPDATE use new api
Apr 5, 2023
ac44c17
server ssh UPDATE print more informative err msg
Roytak Apr 14, 2023
fc8bd7d
tests UPDATE add test for ECDSA hostkey
Roytak Apr 14, 2023
d4db2c1
client UPDATE set known_hosts file/mode
Apr 24, 2023
f2db560
tests UPDATE use new known_hosts API
Apr 24, 2023
7407345
server ssh UPDATE authentication with ECDSA keys
Apr 27, 2023
d5f61cb
ci UPDATE add workflow for libnetconf3 branch
Apr 28, 2023
efdbb2a
configuration UPDATE add transport ifdefs
Apr 28, 2023
3fc551c
server ssh UPDATE client auth with ED25519 keys
Apr 28, 2023
7903e4f
log UPDATE partially replace ERRARG macro
May 4, 2023
4d3420f
ssh UPDATE add new private key identities
May 5, 2023
64410bc
configuration UPDATE new YANG data config API
May 22, 2023
c2f4c00
config UPDATE diff trustore and keystore
May 25, 2023
40df9f4
config REFACTOR unify func names to server_config
May 25, 2023
f45462f
config UPDATE add config replace test
May 25, 2023
6db6b2f
config UPDATE share clients between endpoints
May 26, 2023
b16b2e7
config UPDATE add support for libssh params
May 26, 2023
9290a6f
config UPDATE add support for TLS
Jun 5, 2023
1ff3cf5
libnetconf2 UPDATE merge SSH and TLS req into one
Jun 6, 2023
51d3a8e
ci UPDATE changed CI to use both SSH,TLS and none
Jun 6, 2023
776cb7b
config UPDATE update all models to newest versions
Jun 6, 2023
0d15a62
config UPDATE support for TLS verions and ciphers
Jun 8, 2023
3f562cc
config BUGFIX fix sprintf and va undef behaviour
Jun 8, 2023
c2983f3
config UPDATE implemented CRL for TLS
Jun 15, 2023
357f632
config_new REFACTOR update API calls code
Jun 16, 2023
914e86f
config UPDATE add sharing TLS endpts client certs
Jun 19, 2023
7dedeea
config UPDATE add basic SSH call-home
Jun 22, 2023
d75afa3
config UPDATE add keystore new data API
Jun 29, 2023
d301202
config REFACTOR getting list instances
Jun 29, 2023
6e7466e
config UPDATE Call Home over TLS
Jun 30, 2023
be3bc5b
config UPDATE fix deleting list instances
Jul 8, 2023
cea3741
config UPDATE add docs and refactor some API
Jul 12, 2023
b23eb05
config UPDATE add more CH SSH & TLS APIs
Jul 14, 2023
e24ad0b
config BUGFIX node name possible segfault
Jul 18, 2023
d9b30ed
config UPDATE Call Home synchronization
Jul 18, 2023
0ca981b
examples BUGFIX change diff to data
Jul 24, 2023
88663ce
config UPDATE add auth attempts and timeout
Jul 24, 2023
b3324d4
config UPDATE add missing CH augments to module
Jul 24, 2023
e51a483
config UPDATE add TLS keystore and truststore
Jul 26, 2023
ecab07f
config UPDATE CH TLS keystore and truststore
Jul 27, 2023
b1cf22d
config UPDATE delete choice trees on data creation
Jul 27, 2023
dcd89a8
config BUGFIX fix inserting CTNs
Aug 1, 2023
45532c4
docs UPDATE use only 'Call Home'
Aug 2, 2023
6b29c92
docs UPDATE add missing in,out param
Aug 2, 2023
183aa73
doc UPDATE add correct links to docs
Aug 7, 2023
8dafbfc
config tls REFACTOR change server cert param order
Aug 8, 2023
b508bd4
docs UPDATE new docs grouping, fix typos
Aug 8, 2023
bf0c59c
config REFACTOR change reference to ref
Aug 8, 2023
0df3006
config UPDATE use correct public key types
Aug 17, 2023
0c5ea9f
config BUGFIX avoid passing NULL to lyd_find_path
Aug 18, 2023
326fa6f
tests UPDATE add test for runtime config changes
Aug 18, 2023
d8b75b9
cmake BUGFIX expand macro correctly
Sep 4, 2023
7ca491e
cmake UPDATE cmake version to 3.5 & fix var name
Sep 14, 2023
443f7ee
ietf-crypto-types UPDATE remove mandatory from pub
Sep 14, 2023
67612a4
modules UPDATE add revision to file names
Sep 14, 2023
8fa3100
nc_server BUGFIX add missing header include
Sep 14, 2023
7810bc5
config UPDATE new unix socket API
Sep 14, 2023
851f779
session BUGFIX add bind lock for accepting
Sep 14, 2023
7b7f4f3
tests UPDATE add nc_client_init
Sep 14, 2023
84317ba
session server UPDATE move and rename PK fmt check
Sep 14, 2023
700ef1d
session server UPDATE access keystore dynamically
Sep 14, 2023
5005c51
config UPDATE remove unsupported features
Sep 14, 2023
ef0df41
config UPDATE make netconf-server subtree optional
Sep 14, 2023
2bb6c66
headers UPDATE remove obsolete functions
Sep 29, 2023
ecb64e6
doc UPDATE update obsolete doc with new
Sep 29, 2023
27274a2
log UPDATE increase arg check macro to 7 args
Oct 4, 2023
60ea5fe
config_new REFACTOR code review
Oct 4, 2023
d6dad2c
config_new_ssh REFACTOR code review
Oct 5, 2023
114f22f
config_new_tls REFACTOR code review
Oct 5, 2023
dadee52
server_config REFACTOR rename client_auth struct
Oct 6, 2023
e14cd2a
session server UPDATE dynamically search ts and ks
Oct 12, 2023
4f64514
server_config REFACTOR code review
Oct 12, 2023
d2116be
server_config_ks REFACTOR code review
Oct 12, 2023
6508f0d
server_config_ts REFACTOR code review
Oct 12, 2023
df3734f
session server tls BUGFIX ctn endpt reference fix
Oct 12, 2023
4d2e686
config UPDATE rename config_new and del some funcs
Oct 18, 2023
abee710
config UPDATE rename and doc
Oct 13, 2023
2b22565
session server ssh UPDATE add ssh_sess param to cb
Oct 19, 2023
af56da5
readme UPDATE update readme
Oct 19, 2023
c667696
SOVERSION bump to version 4.0.0
Oct 19, 2023
ebc29d6
VERSION bump to version 3.0.0
Oct 19, 2023
a97f7fb
workflow UPDATE delete libnetconf3 yml
Oct 19, 2023
e4c69f6
readme UPDATE add/update versions
Oct 19, 2023
3cda245
config UPDATE add hello/idle timeouts leaves
Oct 19, 2023
27b81b0
config UPDATE remove nonessential api functions
Oct 19, 2023
b0cc421
session server ssh UPDATE support cleartext pw
Oct 19, 2023
5b209ef
messages_server UPDATE unify err arg print
Oct 25, 2023
4830ea7
server_config UPDATE minor fixes
Oct 25, 2023
f0f1aa3
server_config UPDATE access numbers directly
Oct 25, 2023
92b6d6d
server_config UPDATE add delete substring func
Oct 25, 2023
ec3eab8
server_config BUGFIX use correct node for ctn id
Oct 25, 2023
c39a922
log UPDATE add ERRMEM check macros
Oct 26, 2023
01d5ede
server_config UPDATE access time value directly
Oct 26, 2023
db01249
server_config_p UPDATE remove cpp from priv header
Oct 26, 2023
86ffb2d
server_config_util UPDATE print uint correctly
Oct 26, 2023
5bf8d55
session_client_ssh REFACTOR shorten knownhosts err
Oct 26, 2023
6c9d7fc
session_server_ssh REFACTOR remove redundant ()
Oct 26, 2023
c8629ea
compat UPDATE define crypt_r
Oct 26, 2023
0829840
tests UPDATE add back client tests
Oct 26, 2023
252ea54
client REFACTOR move param check & delete func def
Oct 26, 2023
038bb96
ln2 yang module UPDATE create groupings
Oct 26, 2023
502fe0e
examples UPDATE fix readme, add new line to config
Oct 26, 2023
7ae0ffe
log UPDATE replace ; with whitespace in new macro
Oct 26, 2023
16b8fcf
messages_client REFACTOR add missing parentheses
Oct 26, 2023
97d1a86
ci UPDATE add missing curl dependency
Oct 26, 2023
638ed06
cmake UPDATE remove client test folder from format
Oct 26, 2023
0dbeb43
ci UPDATE fix ci
Oct 26, 2023
ff4bf85
cmake BUGFIX move compiling ssh/tls client tests
Oct 26, 2023
7c50ab6
session server ch UPDATE ch threads creation
Nov 2, 2023
b1fc153
server config UPDATE dynamic endpt references
Nov 2, 2023
663588e
session server ch BUGFIX add ssh_tls macros
Nov 2, 2023
a9a1f8c
server config BUGFIX fix memory leaks
Nov 2, 2023
8dce938
doc UPDATE update docs
Nov 2, 2023
62c098a
compat UPDATE move crypt to compat
Nov 2, 2023
1f4144f
pkg UPDATE create updated package
Nov 3, 2023
0b5b51a
log UPDATE remove deprecated nc_set_print_clb
Nov 3, 2023
f60c87e
session server UPDATE remove pubkey and pw cbs
Nov 3, 2023
ca3c9dd
session server UPDATE set start time to timespec
Nov 3, 2023
f790ea1
session server UPDATE remove obsolete funcions
Nov 3, 2023
4842c08
doc UPDATE ch
Nov 3, 2023
d88e811
examples UPDATE add keys to examples
Nov 3, 2023
29870fe
gitignore UPDATE
Nov 3, 2023
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
28 changes: 2 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- devel

env:
DEFAULT_PACKAGES: libcmocka-dev zlib1g-dev libssh-dev libssl-dev libpam0g-dev
DEFAULT_PACKAGES: libcmocka-dev zlib1g-dev libssh-dev libssl-dev libpam0g-dev libcurl4-openssl-dev

jobs:
git-branch:
Expand Down Expand Up @@ -85,37 +85,13 @@ jobs:
make-prepend: "",
make-target: ""
}
- {
name: "SSH Only",
os: "ubuntu-22.04",
build-type: "Debug",
dep-build-type: "Release",
cc: "gcc",
options: "-DENABLE_TLS=OFF -DENABLE_SSH=ON",
packages: "valgrind",
snaps: "",
make-prepend: "",
make-target: ""
}
- {
name: "TLS Only",
os: "ubuntu-22.04",
build-type: "Debug",
dep-build-type: "Release",
cc: "gcc",
options: "-DENABLE_TLS=ON -DENABLE_SSH=OFF",
packages: "valgrind",
snaps: "",
make-prepend: "",
make-target: ""
}
- {
name: "No SSH nor TLS",
os: "ubuntu-22.04",
build-type: "Debug",
dep-build-type: "Release",
cc: "gcc",
options: "-DENABLE_TLS=OFF -DENABLE_SSH=OFF",
options: "-DENABLE_SSH_TLS=OFF",
packages: "valgrind",
snaps: "",
make-prepend: "",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ "devel" ]

env:
DEFAULT_PACKAGES: libcmocka-dev zlib1g-dev libssh-dev libssl-dev libpam0g-dev
DEFAULT_PACKAGES: libcmocka-dev zlib1g-dev libssh-dev libssl-dev libpam0g-dev libcurl4-openssl-dev

jobs:
git-branch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/devel-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- devel

env:
DEFAULT_PACKAGES: libcmocka-dev zlib1g-dev libssh-dev libssl-dev libpam0g-dev
DEFAULT_PACKAGES: libcmocka-dev zlib1g-dev libssh-dev libssl-dev libpam0g-dev libcurl4-openssl-dev
COVERITY_PROJECT: CESNET%2Flibnetconf2

jobs:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/pkg
/build
/doc/html
90 changes: 39 additions & 51 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)

project(libnetconf2 C)

Expand Down Expand Up @@ -57,17 +57,17 @@ endif()
# Generic version of not only the library. Major version is reserved for really big changes of the project,
# minor version changes with added functionality (new tool, functionality of the tool or library, ...) and
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(LIBNETCONF2_MAJOR_VERSION 2)
set(LIBNETCONF2_MINOR_VERSION 1)
set(LIBNETCONF2_MICRO_VERSION 40)
set(LIBNETCONF2_MAJOR_VERSION 3)
set(LIBNETCONF2_MINOR_VERSION 0)
set(LIBNETCONF2_MICRO_VERSION 0)
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 libyang, minor version changes
# with backward compatible change and micro version is connected with any internal change of the library.
set(LIBNETCONF2_MAJOR_SOVERSION 3)
set(LIBNETCONF2_MINOR_SOVERSION 7)
set(LIBNETCONF2_MICRO_SOVERSION 1)
set(LIBNETCONF2_MAJOR_SOVERSION 4)
set(LIBNETCONF2_MINOR_SOVERSION 0)
set(LIBNETCONF2_MICRO_SOVERSION 0)
set(LIBNETCONF2_SOVERSION_FULL ${LIBNETCONF2_MAJOR_SOVERSION}.${LIBNETCONF2_MINOR_SOVERSION}.${LIBNETCONF2_MICRO_SOVERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_SOVERSION})

Expand All @@ -90,16 +90,14 @@ else()
endif()
option(ENABLE_EXAMPLES "Build examples" ON)
option(ENABLE_COVERAGE "Build code coverage report from tests" OFF)
option(ENABLE_SSH "Enable NETCONF over SSH support (via libssh)" ON)
option(ENABLE_TLS "Enable NETCONF over TLS support (via OpenSSL)" ON)
option(ENABLE_SSH_TLS "Enable NETCONF over SSH and TLS support (via libssh and OpenSSL)" ON)
option(ENABLE_DNSSEC "Enable support for SSHFP retrieval using DNSSEC for SSH (requires OpenSSL and libval)" OFF)
set(READ_INACTIVE_TIMEOUT 20 CACHE STRING "Maximum number of seconds waiting for new data once some data have arrived")
set(READ_ACTIVE_TIMEOUT 300 CACHE STRING "Maximum number of seconds for receiving a full message")
set(MAX_PSPOLL_THREAD_COUNT 6 CACHE STRING "Maximum number of threads that could simultaneously access a ps_poll structure")
set(TIMEOUT_STEP 100 CACHE STRING "Number of microseconds tasks are repeated until timeout elapses")
set(YANG_MODULE_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/yang/modules/libnetconf2" CACHE STRING "Directory where to copy the YANG modules to")
set(CLIENT_SEARCH_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/yang/modules" CACHE STRING "Default NC client YANG module search directory")
set(CALL_HOME_BACKOFF_WAIT 2 CACHE STRING "Number of seconds to wait between Call Home connection attempts")

#
# sources
Expand All @@ -111,20 +109,21 @@ set(libsrc
src/messages_server.c
src/session.c
src/session_client.c
src/session_server.c)
src/session_server.c
src/server_config.c
src/server_config_util.c)

if(ENABLE_SSH)
if(ENABLE_SSH_TLS)
list(APPEND libsrc
src/session_client_ssh.c
src/session_server_ssh.c)
set(SSH_MACRO "#ifndef NC_ENABLED_SSH\n#define NC_ENABLED_SSH\n#endif")
endif()

if(ENABLE_TLS)
list(APPEND libsrc
src/session_server_ssh.c
src/server_config_util_ssh.c
src/session_client_tls.c
src/session_server_tls.c)
set(TLS_MACRO "#ifndef NC_ENABLED_TLS\n#define NC_ENABLED_TLS\n#endif")
src/session_server_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")
endif()

set(headers
Expand All @@ -136,11 +135,12 @@ set(headers
src/session_client.h
src/session_client_ch.h
src/session_server.h
src/session_server_ch.h)
src/session_server_ch.h
src/server_config.h)

# files to generate doxygen from
set(doxy_files
src/libnetconf.h
doc/libnetconf.doc
src/log.h
src/netconf.h
src/session.h
Expand All @@ -149,7 +149,8 @@ set(doxy_files
src/session_client.h
src/session_client_ch.h
src/session_server.h
src/session_server_ch.h)
src/session_server_ch.h
src/server_config.h)

# source files to be covered by the 'format' target
set(format_sources
Expand All @@ -160,13 +161,12 @@ set(format_sources
src/*.c
src/*.h
tests/*.c
tests/client/*.c
tests/pam/*.c)

#
# checks
#
if(ENABLE_DNSSEC AND NOT ENABLE_SSH)
if(ENABLE_DNSSEC AND NOT ENABLE_SSH_TLS)
message(WARNING "DNSSEC SSHFP retrieval cannot be used without SSH support.")
set(ENABLE_DNSSEC OFF)
endif()
Expand Down Expand Up @@ -225,32 +225,21 @@ target_link_libraries(netconf2 ${CMAKE_THREAD_LIBS_INIT})
set(CMAKE_REQUIRED_LIBRARIES pthread)
check_function_exists(pthread_rwlockattr_setkind_np HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP)

# dependencies - openssl
if(ENABLE_TLS OR ENABLE_DNSSEC OR ENABLE_SSH)
find_package(OpenSSL REQUIRED)
if(ENABLE_TLS)
message(STATUS "OpenSSL found, required for TLS")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNC_ENABLED_TLS")
endif()
if(OPENSSL_VERSION VERSION_LESS 1.1.1)
message(WARNING "OpenSSL version ${OPENSSL_VERSION} is no longer maintained, consider an update.")
endif()

if(ENABLE_SSH_TLS)
# dependencies - openssl
find_package(OpenSSL 3.0.0 REQUIRED)
target_link_libraries(netconf2 ${OPENSSL_LIBRARIES})
include_directories(${OPENSSL_INCLUDE_DIR})
endif()

# dependencies - libssh
if(ENABLE_SSH)
find_package(LibSSH 0.7.1 REQUIRED)
if(LIBSSH_VERSION VERSION_EQUAL 0.9.3 OR LIBSSH_VERSION VERSION_EQUAL 0.9.4)
message(FATAL_ERROR "LibSSH ${LIBSSH_VERSION} includes regression bugs and libnetconf2 will NOT work properly, try to use another version")
endif()

# dependencies - libssh
find_package(LibSSH 0.9.5 REQUIRED)
target_link_libraries(netconf2 ${LIBSSH_LIBRARIES})
list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBSSH_LIBRARIES})
include_directories(${LIBSSH_INCLUDE_DIRS})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNC_ENABLED_SSH")

# dependencies - libcurl
find_package(CURL 7.30.0 REQUIRED)
target_link_libraries(netconf2 CURL::libcurl)

# crypt
if(${CMAKE_SYSTEM_NAME} MATCHES "QNX")
Expand Down Expand Up @@ -279,6 +268,9 @@ if(ENABLE_SSH)
else()
message(WARNING "LibPAM not found, PAM-based keyboard-interactive SSH server authentication method is disabled")
endif()

# set compiler flag
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNC_ENABLED_SSH_TLS")
endif()

# dependencies - libval
Expand All @@ -294,10 +286,6 @@ find_package(LibYANG ${LIBYANG_DEP_SOVERSION} REQUIRED)
target_link_libraries(netconf2 ${LIBYANG_LIBRARIES})
include_directories(${LIBYANG_INCLUDE_DIRS})

# header file compatibility - shadow.h and crypt.h
check_include_file("shadow.h" HAVE_SHADOW)
check_include_file("crypt.h" HAVE_CRYPT)

# function compatibility - getpeereid on QNX
if(${CMAKE_SYSTEM_NAME} MATCHES "QNX")
target_link_libraries(netconf2 -lsocket)
Expand Down Expand Up @@ -344,8 +332,8 @@ endif()

# examples
if(ENABLE_EXAMPLES)
if(NOT ENABLE_SSH)
message(WARNING "Examples will not be compiled because SSH is disabled.")
if(NOT ENABLE_SSH_TLS)
message(WARNING "Examples will not be compiled because SSH and TLS are disabled.")
else()
add_subdirectory(examples)
endif()
Expand Down
10 changes: 10 additions & 0 deletions CMakeModules/UseCompat.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ macro(USE_COMPAT)

check_symbol_exists(get_current_dir_name "unistd.h" HAVE_GET_CURRENT_DIR_NAME)

# crypt
check_include_file("crypt.h" HAVE_CRYPT_H)

if(${CMAKE_SYSTEM_NAME} MATCHES "QNX")
list(APPEND CMAKE_REQUIRED_LIBRARIES -llogin)
elseif(NOT APPLE)
list(APPEND CMAKE_REQUIRED_LIBRARIES -lcrypt)
endif()
check_symbol_exists(crypt_r "crypt.h" HAVE_CRYPT_R)

TEST_BIG_ENDIAN(IS_BIG_ENDIAN)

check_include_file("stdatomic.h" HAVE_STDATOMIC)
Expand Down
6 changes: 3 additions & 3 deletions Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ INLINE_INFO = YES
# name. If set to NO, the members will appear in declaration order.
# The default value is: YES.

SORT_MEMBER_DOCS = YES
SORT_MEMBER_DOCS = NO

# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
# descriptions of file, namespace and class members alphabetically by member
Expand Down Expand Up @@ -2069,7 +2069,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED = NC_ENABLED_SSH NC_ENABLED_TLS
PREDEFINED = NC_ENABLED_SSH_TLS

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
Expand Down Expand Up @@ -2184,7 +2184,7 @@ HIDE_UNDOC_RELATIONS = YES
# set to NO
# The default value is: NO.

HAVE_DOT = @HAVE_DOT@
HAVE_DOT = YES

# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
# to run in parallel. When set to 0 doxygen will base this on the number of
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ NETCONF 1.0 ([RFC 4741](https://tools.ietf.org/html/rfc4741)) as well as NETCONF
* NETCONF over pre-established transport sessions (using this mechanism the communication can be tunneled through
sshd(8), for instance).
* NETCONF Call Home ([RFC 8071](https://tools.ietf.org/html/rfc8071)).
* NETCONF Event Notifications ([RFC 5277](https://tools.ietf.org/html/rfc5277)),
* NETCONF Event Notifications ([RFC 5277](https://tools.ietf.org/html/rfc5277)).
* Compatibility with the [ietf-netconf-server](https://datatracker.ietf.org/doc/html/draft-ietf-netconf-netconf-client-server-29#name-the-ietf-netconf-server-mod) YANG module.

**libnetconf2** is maintained and further developed by the [Tools for
Monitoring and Configuration](https://www.liberouter.org/) department of
Expand Down Expand Up @@ -59,11 +60,11 @@ the `distro` directory.
## Requirements

* C compiler (gcc >= 4.8.4, clang >= 3.0, ...)
* cmake >= 2.8.12
* cmake >= 3.5.0
* [libyang](https://github.com/CESNET/libyang)
* libssh >= 0.7.1 (for SSH support)
* recommended >= 0.9.0
* OpenSSL (for TLS support)
* libssh >= 0.9.5 (for SSH support)
* OpenSSL >= 3.0.0 (for TLS support)
* curl >= 7.30.0

#### Optional

Expand Down Expand Up @@ -122,7 +123,7 @@ and enabling both the transport protocols can be made
in the same way. The following command has actually the same effect as
specifying no option since it specifies the default settings.
```
$ cmake -DENABLE_TLS=ON -DENABLE_SSH=ON ..
$ cmake -DENABLE_SSH_TLS=ON ..
```

### DNSSEC SSHFP Retrieval
Expand Down
19 changes: 19 additions & 0 deletions compat/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "compat.h"

#include <crypt.h>
#include <errno.h>
#include <inttypes.h>
#include <limits.h>
Expand Down Expand Up @@ -372,3 +373,21 @@ get_current_dir_name(void)
}

#endif

#ifndef HAVE_CRYPT_R
char *
crypt_r(const char *phrase, const char *setting, struct crypt_data *data)
{
static pthread_mutex_t crypt_lock = PTHREAD_MUTEX_INITIALIZER;
char *hash;

(void) data;

pthread_mutex_lock(&crypt_lock);
hash = crypt(phrase, setting);
pthread_mutex_unlock(&crypt_lock);

return hash;
}

#endif
Loading
Loading