-
Notifications
You must be signed in to change notification settings - Fork 3k
michal/ssh/fix-compat-suite #10375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: maint
Are you sure you want to change the base?
michal/ssh/fix-compat-suite #10375
Conversation
CT Test Results 2 files 29 suites 19m 53s ⏱️ Results for commit cb64acf. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts
// Erlang/OTP Github Action Bot |
9b1141e to
87143ab
Compare
ecf4e0c to
0ff81e9
Compare
0ff81e9 to
cb64acf
Compare
| dropbear) | ||
| FAMssh=dropbear | ||
| VERssh=$2 | ||
| LINK=https://matt.ucc.asn.au/dropbear/releases/dropbear-${VERssh}.tar.bz2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we verifying what has been downloaded? should we check some repo hardcoded checksums? should we host binaries ourselves?
| # | ||
| # %CopyrightEnd% | ||
|
|
||
| openssh 4.4p1 openssl 0.9.8c 16.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be used for running test suite for a single group only? for example from terminal?
can CT anyhow parse group name with a space? I failed so far ...
| {otp_server, [], [login_otp_is_server, | ||
| renegotiation_otp_is_server | ||
| ]} | | ||
| [{G, [], [{group,otp_client}, {group,otp_server}]} || G <- ssh_image_versions()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rewrite slightly, so that ssh_image_versions/0 is called only once across whole test suite?
nest generated groups under some umbrella group, and call it explicitly from all/0 ?
also reduce in rest of test suite code. read once, store it in Config?
maybe not relevant when we move image creation to other CI job ?
| dropbear 2020.81 22.04 | ||
| dropbear 2022.83 22.04 | ||
| dropbear 2024.86 22.04 | ||
| dropbear 2025.88 22.04 No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add something from Ubuntu 24 ? reduce Ubuntu 16?
| recv_ext_info, %% Expect ext-info from peer | ||
|
|
||
| kex_strict_negotiated = false, | ||
| ignore_next_kex_message = false, %% RFC 4253 section 7, peer's guess was wrong |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't mix compat test fix PR with fix for Dropbear? have separate PR for PR-8676
|
|
||
| %%% ######## {key_exchange, client|server, init|renegotiate} #### | ||
| %%%---- RFC 4253 section 7 guess was wrong | ||
| handle_event(internal, Msg, {key_exchange,server,_ReNeg}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix indentation, so that eyes don't bleed that much ;-)
| IsGuessWrong = is_guess_wrong(CounterGuess, CounterPart, Own), | ||
| key_exchange_first_msg(Algos#alg.kex, | ||
| Ssh#ssh{algorithms = Algos}) | ||
| Ssh#ssh{algorithms = Algos, ignore_next_kex_message = IsGuessWrong}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to
ignore_initial_kex_message ?
| is_different_algorithm(CounterPreferredKexAlgo, OwnPreferredKexAlgo) orelse | ||
| is_different_algorithm(CounterPreferredHostKeyAlgo, OwnPreferredHostKeyAlgo). | ||
|
|
||
| is_different_algorithm(none, none) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this function really better than some not equal operator?
| get_preferred_kex_algorithm(#ssh_msg_kexinit{kex_algorithms = [Preferred | _]}) -> | ||
| Preferred; | ||
| get_preferred_kex_algorithm(_) -> | ||
| none. | ||
|
|
||
| get_preferred_host_key_algorithm(#ssh_msg_kexinit{server_host_key_algorithms = [Preferred | _]}) -> | ||
| Preferred; | ||
| get_preferred_host_key_algorithm(_) -> | ||
| none. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
combine 2 get_preferred functions into one returning tuple {Kex, Host} ?
then simplify
is_different_algorithm(CounterPreferredKexAlgo, OwnPreferredKexAlgo) orelse
is_different_algorithm(CounterPreferredHostKeyAlgo, OwnPreferredHostKeyAlgo).
into {Kex1, Host1} =/ {Kex2, Host2} ?
| crypto:generate_key(ecdh, Args); | ||
| generate_key(dh, [P,G,Sz2]) -> | ||
| {Public,Private} = crypto:generate_key(dh, [P, G, max(Sz2,?MIN_DH_KEY_SIZE)] ), | ||
| BitSize = fun(N) -> bit_size(binary:encode_unsigned(N)) end, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed in final PR
Changes:
TODO: