Skip to content

Commit

Permalink
server config REFACTOR formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Mar 5, 2024
1 parent 54a0db1 commit 7ac7c56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/server_config_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,9 +1130,11 @@ nc_server_config_add_keystore_asym_key(const struct ly_ctx *ctx, NC_TRANSPORT_IM

/* get the keys as a string from the given files */
if (ti == NC_TI_LIBSSH) {
ret = nc_server_config_util_get_asym_key_pair(privkey_path, pubkey_path, NC_PUBKEY_FORMAT_SSH, &privkey, &privkey_type, &pubkey);
ret = nc_server_config_util_get_asym_key_pair(privkey_path, pubkey_path, NC_PUBKEY_FORMAT_SSH, &privkey,
&privkey_type, &pubkey);
} else if (ti == NC_TI_OPENSSL) {
ret = nc_server_config_util_get_asym_key_pair(privkey_path, pubkey_path, NC_PUBKEY_FORMAT_X509, &privkey, &privkey_type, &pubkey);
ret = nc_server_config_util_get_asym_key_pair(privkey_path, pubkey_path, NC_PUBKEY_FORMAT_X509, &privkey,
&privkey_type, &pubkey);
} else {
ERR(NULL, "Only SSH and TLS transports can be used to create an asymmetric key pair in the keystore.");
ret = 1;
Expand Down
3 changes: 2 additions & 1 deletion src/server_config_util_ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ _nc_server_config_add_ssh_hostkey(const struct ly_ctx *ctx, const char *tree_pat
NC_CHECK_ARG_RET(NULL, ctx, tree_path, privkey_path, config, 1);

/* get the keys as a string from the given files */
ret = nc_server_config_util_get_asym_key_pair(privkey_path, pubkey_path, NC_PUBKEY_FORMAT_SSH, &privkey, &privkey_type, &pubkey);
ret = nc_server_config_util_get_asym_key_pair(privkey_path, pubkey_path, NC_PUBKEY_FORMAT_SSH, &privkey,
&privkey_type, &pubkey);
if (ret) {
ERR(NULL, "Getting keys from file(s) failed.");
goto cleanup;
Expand Down

0 comments on commit 7ac7c56

Please sign in to comment.