diff options
author | Andrew Cady <d@jerkface.net> | 2021-10-09 20:35:42 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2021-10-09 20:35:42 -0400 |
commit | 6b20a96c27d91270896625ff5df05602a05ad5ef (patch) | |
tree | b8b1d213f8a7f717cc693a4f69e228d4acdf38c7 | |
parent | 3024870b3cb841eaa7266ffe6c0a2619a5fc1580 (diff) |
rename public key file
-rwxr-xr-x | cryptonomic-vpn | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cryptonomic-vpn b/cryptonomic-vpn index 0101e76..78c2110 100755 --- a/cryptonomic-vpn +++ b/cryptonomic-vpn | |||
@@ -331,7 +331,10 @@ install_remote_public_key() | |||
331 | t=$(mktemp) | 331 | t=$(mktemp) |
332 | keyscan "$REMOTE_IP" | match_and_drop_first_word "$REMOTE_IP" > "$t" | 332 | keyscan "$REMOTE_IP" | match_and_drop_first_word "$REMOTE_IP" > "$t" |
333 | validate_public_key_name "$t" "$REMOTE_NAME" || die 'cannot authenticate remote public key' | 333 | validate_public_key_name "$t" "$REMOTE_NAME" || die 'cannot authenticate remote public key' |
334 | write_successfully /etc/swanctl/pubkey/"$REMOTE_NAME".pub -- write_remote_key "$t" | 334 | |
335 | REMOTE_PUBLIC_KEY_DEST=/etc/swanctl/pubkey/$(sshfp_filename_string "$t").pub | ||
336 | |||
337 | write_successfully "$REMOTE_PUBLIC_KEY_DEST" -- write_remote_key "$t" | ||
335 | trap - EXIT | 338 | trap - EXIT |
336 | rm -f "$t" | 339 | rm -f "$t" |
337 | } | 340 | } |
@@ -358,7 +361,7 @@ strongswan_config() | |||
358 | } | 361 | } |
359 | remote { | 362 | remote { |
360 | id = "${remote_addrs}" | 363 | id = "${remote_addrs}" |
361 | pubkeys = ${conn}.pub | 364 | pubkeys = ${REMOTE_PUBLIC_KEY_DEST} |
362 | } | 365 | } |
363 | children { | 366 | children { |
364 | child { | 367 | child { |