Skip to content

Commit d4efde7

Browse files
authored
Merge pull request #141 from rapier1/dev_minor
Dev minor
2 parents 1f58137 + 8d12770 commit d4efde7

File tree

307 files changed

+26800
-9963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

307 files changed

+26800
-9963
lines changed

.depend

Lines changed: 13 additions & 17 deletions
Large diffs are not rendered by default.

.github/ci-status.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
master :
2+
[![C/C++ CI](../../../actions/workflows/c-cpp.yml/badge.svg)](../../../actions/workflows/c-cpp.yml?query=branch:master)
3+
[![VM CI](../../../actions/workflows/vm.yml/badge.svg)](../../../actions/workflows/vm.yml?query=branch:master)
4+
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:master)
5+
[![Upstream self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml/badge.svg)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/upstream.yml?query=branch:master)
6+
[![CIFuzz](../../../actions/workflows/cifuzz.yml/badge.svg)](../../../actions/workflows/cifuzz.yml)
7+
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/openssh.svg)](https://issues.oss-fuzz.com/issues?q="Project:+openssh"+is:open)
8+
[![Coverity Status](https://scan.coverity.com/projects/21341/badge.svg)](https://scan.coverity.com/projects/openssh-portable)
9+
<br>
10+
11+
10.1 :
12+
[![C/C++ CI](../../../actions/workflows/c-cpp.yml/badge.svg?branch=V_10_1)](../../../actions/workflows/c-cpp.yml?query=branch:V_10_1)
13+
[![VM CI](../../../actions/workflows/vm.yml/badge.svg?branch=V_10_1)](../../../actions/workflows/vm.yml?query=branch:V_10_1)
14+
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_10_1)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_10_1)
15+
16+
10.0 :
17+
[![C/C++ CI](../../../actions/workflows/c-cpp.yml/badge.svg?branch=V_10_0)](../../../actions/workflows/c-cpp.yml?query=branch:V_10_0)
18+
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_10_0)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_10_0)
19+
20+
9.9 :
21+
[![C/C++ CI](../../../actions/workflows/c-cpp.yml/badge.svg?branch=V_9_9)](../../../actions/workflows/c-cpp.yml?query=branch:V_9_9)
22+
[![C/C++ CI self-hosted](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml/badge.svg?branch=V_9_9)](https://github.com/openssh/openssh-portable-selfhosted/actions/workflows/selfhosted.yml?query=branch:V_9_9)

.github/install_libcrypto.sh

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#!/bin/sh
2+
#
3+
# Install specified libcrypto.
4+
# -a : install version for ABI compatibility test.
5+
# -n : dry run, don't actually build and install.
6+
#
7+
# Usage: $0 [-a] [-n] openssl-$branch/tag destdir [config options]
8+
9+
set -e
10+
11+
bincompat_test=""
12+
dryrun=""
13+
while [ "$1" = "-a" ] || [ "$1" = "-n" ]; do
14+
if [ "$1" = "-a" ]; then
15+
abi_compat_test=y
16+
elif [ "$1" = "-n" ]; then
17+
dryrun="echo dryrun:"
18+
fi
19+
shift
20+
done
21+
22+
ver="$1"
23+
destdir="$2"
24+
opts="$3"
25+
26+
if [ -z "${ver}" ] || [ -z "${destdir}" ]; then
27+
echo tag/branch and destdir required
28+
exit 1
29+
fi
30+
31+
set -x
32+
33+
if [ ! -d ${HOME}/openssl ]; then
34+
cd ${HOME}
35+
git clone https://github.com/openssl/openssl.git
36+
cd ${HOME}/openssl
37+
git fetch --all
38+
fi
39+
cd ${HOME}/openssl
40+
41+
if [ "${abi_compat_test}" = "y" ]; then
42+
echo selecting ABI test release/branch for ${ver}
43+
case "${ver}" in
44+
openssl-3.6)
45+
ver=openssl-3.0.0
46+
echo "selecting older release ${ver}"
47+
;;
48+
openssl-3.[012345])
49+
major=$(echo ${ver} | cut -f1 -d.)
50+
minor=$(echo ${ver} | cut -f2 -d.)
51+
ver="${major}.$((${minor} + 1))"
52+
echo selecting next release branch ${ver}
53+
;;
54+
openssl-3.*.*)
55+
major=$(echo ${ver} | cut -f1 -d.)
56+
minor=$(echo ${ver} | cut -f2 -d.)
57+
patch=$(echo ${ver} | cut -f3 -d.)
58+
ver="${major}.${minor}.$((${patch} + 1))"
59+
echo checking for release tag ${ver}
60+
if git tag | grep -q "^${ver}\$"; then
61+
echo selected next patch release ${ver}
62+
else
63+
ver="${major}.${minor}"
64+
echo not found, selecting release branch ${ver}
65+
fi
66+
;;
67+
esac
68+
fi
69+
70+
git checkout ${ver}
71+
make clean >/dev/null 2>&1 || true
72+
${dryrun} ./config no-threads shared ${opts} --prefix=${destdir} \
73+
-Wl,-rpath,${destdir}/lib64
74+
${dryrun} make -j4
75+
${dryrun} sudo make install_sw

.github/install_putty.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/sh
2+
3+
ver="$1"
4+
5+
echo
6+
echo --------------------------------------
7+
echo Installing PuTTY version ${ver}
8+
echo --------------------------------------
9+
10+
cd /tmp
11+
12+
case "${ver}" in
13+
snapshot)
14+
tarball=putty.tar.gz
15+
url=https://tartarus.org/~simon/putty-snapshots/${tarball}
16+
;;
17+
*)
18+
tarball=putty-${ver}.tar.gz
19+
url=https://the.earth.li/~sgtatham/putty/${ver}/${tarball}
20+
;;
21+
esac
22+
23+
if [ ! -f ${tarball} ]; then
24+
wget -q ${url}
25+
fi
26+
27+
mkdir -p /tmp/puttybuild
28+
cd /tmp/puttybuild
29+
30+
tar xfz /tmp/${tarball} && cd putty-*
31+
if [ -f CMakeLists.txt ]; then
32+
cmake . && cmake --build . -j4 && sudo cmake --build . --target install
33+
else
34+
./configure && make -j4 && sudo make install
35+
fi
36+
sudo rm -rf /tmp/puttybuild
37+
/usr/local/bin/plink -V

.github/run_test.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ if [ ! -z "$SUDO" ] && [ ! -z "$TEST_SSH_HOSTBASED_AUTH" ]; then
1313
hostname | $SUDO tee $sshconf/shosts.equiv >/dev/null
1414
echo "EnableSSHKeysign yes" | $SUDO tee $sshconf/ssh_config >/dev/null
1515
$SUDO mkdir -p $sshconf
16-
$SUDO cp -p /etc/ssh/ssh_host*key* $sshconf
1716
$SUDO make install
1817
for key in $sshconf/ssh_host*key*.pub; do
1918
echo `hostname` `cat $key` | \
@@ -35,6 +34,17 @@ if [ ! -z "${env}" ]; then
3534
env="env${env}"
3635
fi
3736

37+
if [ "$1" = "putty-versions" ]; then
38+
for ver in 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.80 \
39+
0.81 0.82 0.83 snapshot; do
40+
.github/install_putty.sh "${ver}"
41+
${env} make ${TEST_TARGET} \
42+
SKIP_LTESTS="${SKIP_LTESTS}" LTESTS="${LTESTS}"
43+
done
44+
45+
exit 0
46+
fi
47+
3848
if [ -z "${LTESTS}" ]; then
3949
${env} make ${TEST_TARGET} SKIP_LTESTS="${SKIP_LTESTS}"
4050
else

.github/setup_ci.sh

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ for TARGET in $TARGETS; do
164164
PACKAGES="${PACKAGES} cmake ninja-build"
165165
;;
166166
putty-*)
167-
INSTALL_PUTTY=$(echo "${TARGET}" | cut -f2 -d-)
167+
INSTALL_PUTTY=0.83
168168
PACKAGES="${PACKAGES} cmake"
169169
;;
170170
valgrind*)
@@ -225,13 +225,8 @@ if [ "${INSTALL_HARDENED_MALLOC}" = "yes" ]; then
225225
fi
226226

227227
if [ ! -z "${INSTALL_OPENSSL}" ]; then
228-
(cd ${HOME} &&
229-
git clone https://github.com/openssl/openssl.git &&
230-
cd ${HOME}/openssl &&
231-
git checkout ${INSTALL_OPENSSL} &&
232-
./config no-threads shared ${SSLCONFOPTS} \
233-
--prefix=/opt/openssl &&
234-
make && sudo make install_sw)
228+
.github/install_libcrypto.sh \
229+
"${INSTALL_OPENSSL}" /opt/openssl "${SSLCONFOPTS}"
235230
fi
236231

237232
if [ ! -z "${INSTALL_LIBRESSL}" ]; then
@@ -278,25 +273,25 @@ if [ ! -z "${INSTALL_ZLIB}" ]; then
278273
fi
279274

280275
if [ ! -z "${INSTALL_PUTTY}" ]; then
281-
ver="${INSTALL_PUTTY}"
282-
case "${INSTALL_PUTTY}" in
283-
snapshot)
284-
tarball=putty.tar.gz
285-
(cd /tmp && wget https://tartarus.org/~simon/putty-snapshots/${tarball})
286-
;;
287-
*)
288-
tarball=putty-${ver}.tar.gz
289-
(cd /tmp && wget https://the.earth.li/~sgtatham/putty/${ver}/${tarball})
276+
.github/install_putty.sh "${INSTALL_PUTTY}"
277+
fi
278+
279+
# If we're running on an ephemeral VM, set a random password and set
280+
# up to run the password auth test.
281+
if [ ! -z "${EPHEMERAL_VM}" ]; then
282+
283+
# This is the github "target" as specified in the yml file.
284+
# In particular, ubuntu-latest sets the password field to the locked
285+
# value, so unless we reset it here most of the tests will fail.
286+
case "${target}" in
287+
ubuntu-*)
288+
echo ${target} target: setting random password.
289+
openssl rand -base64 9 >regress/password
290+
pw=$(tr -d '\n' <regress/password | openssl passwd -6 -stdin)
291+
sudo usermod --password "${pw}" runner
292+
sudo usermod --unlock runner
290293
;;
291294
esac
292-
(cd ${HOME} && tar xfz /tmp/${tarball} && cd putty-*
293-
if [ -f CMakeLists.txt ]; then
294-
cmake . && cmake --build . && sudo cmake --build . --target install
295-
else
296-
./configure && make && sudo make install
297-
fi
298-
)
299-
/usr/local/bin/plink -V
300295
fi
301296

302297
# If we're running on an ephemeral VM, set a random password and set

.github/workflows/c-cpp.yml

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
name: C/C++ CI
1+
name: CI
2+
3+
# For testing, you can set variables in your repo (Repo -> Settings ->
4+
# Security -> Actions -> Variables) to restrict the tests that are run.
5+
# The supported variables are:
6+
#
7+
# RUN_ONLY_TARGET_CONFIG: Run only the single matching target and config,
8+
# separated by spaces, eg "ubuntu-latest default". All other tests will
9+
# fail immediately.
10+
#
11+
# LTESTS: Override the set of tests run.
212

313
# For testing, you can set variables in your repo (Repo -> Settings ->
414
# Security -> Actions -> Variables) to restrict the tests that are run.
@@ -12,11 +22,11 @@ name: C/C++ CI
1222

1323
on:
1424
push:
15-
branches: [ master, dev_major, dev_minor ]
16-
paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/c-cpp.yml' ]
25+
branches: [ master, dev_major, dev_minor, DynamicWindow ]
26+
# paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/*.sh', '.github/workflows/c-cpp.yml' ]
1727
pull_request:
18-
branches: [ master, dev_major, dev_minor ]
19-
paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/c-cpp.yml' ]
28+
branches: [ master, dev_major, dev_minor, DynamicWindow ]
29+
# paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/*.sh', '.github/workflows/c-cpp.yml' ]
2030

2131
jobs:
2232
ci:
@@ -87,41 +97,36 @@ jobs:
8797
# - { target: ubuntu-latest, config: libressl-3.4.3 }
8898
# - { target: ubuntu-latest, config: libressl-3.5.3 }
8999
# - { target: ubuntu-latest, config: libressl-3.6.1 }
90-
- { target: ubuntu-latest, config: libressl-3.7.2 }
100+
- { target: ubuntu-latest, config: libressl-3.7.3 }
91101
- { target: ubuntu-latest, config: libressl-3.8.4 }
92102
- { target: ubuntu-latest, config: libressl-3.9.2 }
93103
- { target: ubuntu-latest, config: libressl-4.0.0 }
104+
- { target: ubuntu-latest, config: libressl-4.1.0 }
94105
- { target: ubuntu-latest, config: openssl-master }
95106
- { target: ubuntu-latest, config: openssl-noec }
96107
- { target: ubuntu-latest, config: openssl-1.1.1 }
97108
- { target: ubuntu-latest, config: openssl-1.1.1t }
98109
- { target: ubuntu-latest, config: openssl-1.1.1w }
99110
- { target: ubuntu-latest, config: openssl-3.0.0 }
100-
- { target: ubuntu-latest, config: openssl-3.0.15 }
111+
- { target: ubuntu-latest, config: openssl-3.0.18 }
101112
- { target: ubuntu-latest, config: openssl-3.1.0 }
102-
- { target: ubuntu-latest, config: openssl-3.1.7 }
103-
- { target: ubuntu-latest, config: openssl-3.2.3 }
104-
- { target: ubuntu-latest, config: openssl-3.3.2 }
113+
- { target: ubuntu-latest, config: openssl-3.1.8 }
114+
- { target: ubuntu-latest, config: openssl-3.2.6 }
115+
- { target: ubuntu-latest, config: openssl-3.3.5 }
105116
- { target: ubuntu-latest, config: openssl-3.4.0 }
117+
- { target: ubuntu-latest, config: openssl-3.4.3 }
118+
- { target: ubuntu-latest, config: openssl-3.5.0 }
119+
- { target: ubuntu-latest, config: openssl-3.5.3 } # keep
120+
- { target: ubuntu-latest, config: openssl-3.5.4 }
106121
- { target: ubuntu-latest, config: openssl-1.1.1_stable }
107122
- { target: ubuntu-latest, config: openssl-3.0 } # stable branch
108123
- { target: ubuntu-latest, config: openssl-3.1 } # stable branch
109124
- { target: ubuntu-latest, config: openssl-3.2 } # stable branch
110125
- { target: ubuntu-latest, config: openssl-3.3 } # stable branch
111-
- { target: ubuntu-latest, config: putty-0.71 }
112-
- { target: ubuntu-latest, config: putty-0.72 }
113-
- { target: ubuntu-latest, config: putty-0.73 }
114-
- { target: ubuntu-latest, config: putty-0.74 }
115-
- { target: ubuntu-latest, config: putty-0.75 }
116-
- { target: ubuntu-latest, config: putty-0.76 }
117-
- { target: ubuntu-latest, config: putty-0.77 }
118-
- { target: ubuntu-latest, config: putty-0.78 }
119-
- { target: ubuntu-latest, config: putty-0.79 }
120-
- { target: ubuntu-latest, config: putty-0.80 }
121-
- { target: ubuntu-latest, config: putty-0.81 }
122-
- { target: ubuntu-latest, config: putty-0.82 }
123-
- { target: ubuntu-latest, config: putty-0.83 }
124-
- { target: ubuntu-latest, config: putty-snapshot }
126+
- { target: ubuntu-latest, config: openssl-3.4 } # stable branch
127+
- { target: ubuntu-latest, config: openssl-3.5 } # stable branch
128+
- { target: ubuntu-latest, config: openssl-3.6 } # stable branch
129+
- { target: ubuntu-latest, config: putty-versions }
125130
- { target: ubuntu-latest, config: zlib-develop }
126131
- { target: ubuntu-latest, config: tcmalloc }
127132
#musl doens't know about linux/tcp.h so skip
@@ -173,6 +178,11 @@ jobs:
173178
TEST_SSH_UNSAFE_PERMISSIONS: 1
174179
TEST_SSH_HOSTBASED_AUTH: yes
175180
LTESTS: ${{ vars.LTESTS }}
181+
- name: test OpenSSL3 ABI compatibility
182+
if: ${{ startsWith(matrix.config, 'openssl-3') }}
183+
run: |
184+
sh .github/install_libcrypto.sh -a ${{ matrix.config }} /opt/openssl
185+
sh .github/run_test.sh ${{ matrix.config }}
176186
- name: show logs
177187
if: failure()
178188
run: for i in regress/failed*.log; do echo ====; echo logfile $i; echo =====; cat $i; done

.github/workflows/selfhosted.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: C/C++ CI self-hosted
1+
name: CI self-hosted
22

33
on:
44
push:
5-
paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/selfhosted.yml' ]
5+
paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/run_tests.sh', '.github/workflows/selfhosted.yml' ]
66

77
jobs:
88
selfhosted:

0 commit comments

Comments
 (0)