mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-11-16 13:35:39 +01:00
OpenSSH-portable patch level 1 now considered equivalent to stock OpenBSD version.
This commit is contained in:
parent
17780ff194
commit
240b705d61
@ -90,6 +90,9 @@ class Software:
|
||||
opatch = mx1.group(1)
|
||||
if mx2 is not None:
|
||||
spatch = mx2.group(1)
|
||||
# OpenBSD version and p1 versions are considered the same.
|
||||
if ((spatch == '') and (opatch == '1')) or ((spatch == '1') and (opatch == '')):
|
||||
return 0
|
||||
if spatch < opatch:
|
||||
return -1
|
||||
elif spatch > opatch:
|
||||
|
@ -138,7 +138,7 @@ class TestVersionCompare:
|
||||
assert s2.compare_version(s2) == 0
|
||||
assert s1.compare_version('2.1.1') == 0
|
||||
assert s2.compare_version('2.1.1p2') == 0
|
||||
assert s1.compare_version('2.1.1p1') != 0
|
||||
assert s1.compare_version('2.1.1p1') == 0 # OpenBSD version and p1 version should be the same.
|
||||
assert s1.compare_version('2.1.1p2') != 0
|
||||
assert s2.compare_version('2.1.1') != 0
|
||||
assert s2.compare_version('2.1.1p1') > 0
|
||||
|
Loading…
Reference in New Issue
Block a user