bugzilla-daemon at mindrot.org
2023-Jan-14  03:53 UTC
[Bug 3521] New: skip tests for '%C' since no openssl in local path
https://bugzilla.mindrot.org/show_bug.cgi?id=3521
            Bug ID: 3521
           Summary: skip tests for '%C' since no openssl in local path
           Product: Portable OpenSSH
           Version: 9.1p1
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Regression tests
          Assignee: unassigned-bugs at mindrot.org
          Reporter: rmsh1216 at 163.com
Created attachment 3650
  --> https://bugzilla.mindrot.org/attachment.cgi?id=3650&action=edit
Skip these tests if there is no openssl in local path.
Tests for '%C' in percent.sh depend on openssl in local path, so skip
these tests when there is no openssl in local path.
make tests
...
run test percent.sh ...
percent expansions matchexec percent
/home/communities/openssh-portable/regress/percent.sh: line 83:
openssl: command not found
matchexec=%C expect  got 9a4228f7ab4f48c26c7ce594366bbe6e69cbe511
matchexec=%%/%C/%i/%h/%d/%L/%l/%n/%p/%r/%u expect
%//0/127.0.0.1//root/localhost/localhost.localdomain/somehost/4242/remuser/root
got
%/9a4228f7ab4f48c26c7ce594366bbe6e69cbe511/0/127.0.0.1//root/localhost/localhost.localdomain/somehost/4242/remuser/root
percent expansions localcommand percent
/home/communities/openssh-portable/regress/percent.sh: line 83:
openssl: command not found
...
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2023-Jan-14  04:19 UTC
[Bug 3521] skip tests for '%C' since no openssl in local path
https://bugzilla.mindrot.org/show_bug.cgi?id=3521
Darren Tucker <dtucker at dtucker.net> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dtucker at dtucker.net
   Attachment #3650|application/octet-stream    |text/plain
          mime type|                            |
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2023-Jan-14  10:40 UTC
[Bug 3521] skip tests for '%C' since no openssl in local path
https://bugzilla.mindrot.org/show_bug.cgi?id=3521 --- Comment #1 from Darren Tucker <dtucker at dtucker.net> --- Comment on attachment 3650 --> https://bugzilla.mindrot.org/attachment.cgi?id=3650 Skip these tests if there is no openssl in local path. I think this should have been fixed by https://github.com/openssh/openssh-portable/commit/d77fc611a62f2dfee0b654c31a50a814b13310dd That said, looking at this again did turn up another potential improvement.>+NOOPENSSL=0 >+IFS=":";for i in $PATH;do [ -x "$i/openssl" ] && NOOPENSSL=1;doneconfigure now does this for us: if OPENSSL_BIN is an empty string we don't have one.>+ if [ $NOOPENSSL -eq 1 ]; then >+ # Matches implementation in readconf.c:ssh_connection_hash() >+ HASH=`printf "${HOSTNAME}127.0.0.1${PORT}$REMUSER" | >+ $OPENSSL_BIN sha1 | cut -f2 -d' '` >+ fi > trial $i '%%' '%' >- trial $i '%C' $HASH >+ if [ $NOOPENSSL -eq 1 ]; then trial $i '%C' $HASH; fiThe order of the trials is not important, so we can move this up inside the conditional above.>+ if [ $NOOPENSSL -eq 0 ]; then >+ trial $i '%%/%i/%h/%d/%L/%l/%n/%p/%r/%u' \ >+ "%/$USERID/127.0.0.1/$HOME/$HOST/$HOSTNAME/somehost/$PORT/$REMUSER/$USER" >+ else >+ trial $i '%%/%C/%i/%h/%d/%L/%l/%n/%p/%r/%u' \ >+ "%/$HASH/$USERID/127.0.0.1/$HOME/$HOST/$HOSTNAME/somehost/$PORT/$REMUSER/$USER" >+ fiIn HEAD we currently skip the entire test if we don't have openssl, but the order of the %-tokens is not important either, so we can set up the test without $HASH and append $HASH if we have it, instead of duplicating the bulk of the string. I've changed that. Thanks for the report, I believe this is all now fixed (if not please reopen this bug). -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2023-Jan-14  10:40 UTC
[Bug 3521] skip tests for '%C' since no openssl in local path
https://bugzilla.mindrot.org/show_bug.cgi?id=3521
Darren Tucker <dtucker at dtucker.net> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2023-Mar-17  02:42 UTC
[Bug 3521] skip tests for '%C' since no openssl in local path
https://bugzilla.mindrot.org/show_bug.cgi?id=3521
Damien Miller <djm at mindrot.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED
--- Comment #2 from Damien Miller <djm at mindrot.org> ---
OpenSSH 9.3 has been released. Close resolved bugs
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.