diff options
author | ebo <eliezio.oliveira@est.tech> | 2020-04-03 15:24:15 +0100 |
---|---|---|
committer | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2020-04-08 08:52:09 +0000 |
commit | f986059d04af9eafe85aafe467e3196e8400098c (patch) | |
tree | e42f20f8117d752498ba9d302878172280c98a1c /test/mocks/netconf-pnp-simulator/engine/reconfigure-tls.sh | |
parent | 7a3199bf4a05ffe7148ab7139a73df863a659353 (diff) |
netconf-pnp-simulator: convenient TLS and SSH configuration
- Simple SSH and TLS configuration. Instead of specific Netopeer2
XML configuration files, the user only needs to provide:
For SSH: id_XXX.pub
For TLS: server_key.pem, server_cert.pem, and ca.pem
- SSH and TLS can be reconfigured at runtime by running
/opt/bin/reconfigure-ssh.sh and /opt/bin/reconfigure-tls.sh respectively
- Improved log readability by using zlog (on C applications) and loguru
for Python
See the updated documentation under ../docs for more information.
Issue-ID: INT-1516
Change-Id: I21052d2524f0610c6197875a544113cce1a02787
Signed-off-by: ebo <eliezio.oliveira@est.tech>
Diffstat (limited to 'test/mocks/netconf-pnp-simulator/engine/reconfigure-tls.sh')
-rwxr-xr-x | test/mocks/netconf-pnp-simulator/engine/reconfigure-tls.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/mocks/netconf-pnp-simulator/engine/reconfigure-tls.sh b/test/mocks/netconf-pnp-simulator/engine/reconfigure-tls.sh new file mode 100755 index 000000000..6c97064ee --- /dev/null +++ b/test/mocks/netconf-pnp-simulator/engine/reconfigure-tls.sh @@ -0,0 +1,36 @@ +#!/bin/ash +# shellcheck disable=SC2086 + +# ============LICENSE_START======================================================= +# Copyright (C) 2020 Nordix Foundation. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +set -eu + +HERE=${0%/*} +source $HERE/common.sh + +WORKDIR=$(mktemp -d) +trap "rm -rf $WORKDIR" EXIT + +sysrepocfg --format=xml --export=$WORKDIR/load_server_certs.xml ietf-keystore +sysrepocfg --format=xml --export=$WORKDIR/tls_listen.xml ietf-netconf-server +configure_tls running import $WORKDIR + +pid=$(cat /var/run/netopeer2-server.pid) +log INFO Restart Netopeer2 pid=$pid +kill $pid |