Skip to content

Commit

Permalink
Remove 'UseRoaming' if OpenSSH >= 7.3 (GH #31)
Browse files Browse the repository at this point in the history
This option was deprecated in 7.2, is removed in 7.3.
  • Loading branch information
dolmen committed Nov 26, 2016
1 parent 3c627c7 commit d5e5f8c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.pod
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,13 @@ L<the commit log|https://github.com/dolmen/github-keygen/commits/release>.

=over 4

=item v1.301

Remove C<UseRoaming> option if OpenSSH >= 7.3
(Mac OS X Sierra,
L<issue #31|https://github.com/dolmen/github-keygen/issues/31>):
this option has been removed from OpenSSH.

=item v1.300

Keys registered in F<~/.ssh/config> are now compared with keys registered on
Expand Down
8 changes: 7 additions & 1 deletion bin/github-keygen
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ EOF
# UseRoaming was an undocumented option that is a security issue
# if enabled when connecting to a malicious server.
# http://www.openssh.com/txt/release-7.1p2
$supported_options{useroaming}++ if $SSH_VERSION >= 0x5400;
$supported_options{useroaming}++ if $SSH_VERSION >= 0x5400 && $SSH_VERSION < 0x7300;
while (<$fh>) {
$supported_options{lc $1}++ if /^\.It Cm ([A-Z]\S+)/
}
Expand All @@ -665,6 +665,12 @@ EOF
if ($SSH_VERSION < 0x5000) {
s/^(KexAlgorithms|MACs|Control(?:Persist|Path)) /##$1 / for @ghkg_config_lines;
}
# Option UseRoaming appeared in 5.4 (but undocumented), is deprecated in 7.2 and
# removed in 7.3
if ($SSH_VERSION >= 0x7300) {
# option is deprecated in 7.2, but removed in 7.3
@ghkg_config_lines = grep !/^UseRoaming /, @ghkg_config_lines;
}
if ($SSH_VERSION < 0x5400) {
s/^(UseRoaming )/##$1/ for @ghkg_config_lines;
}
Expand Down

0 comments on commit d5e5f8c

Please sign in to comment.