mirror of
https://github.com/D-Modem/app.git
synced 2026-11-28 17:38:05 -08:00
iOS: SSH on libdmodemssh, the apps' own client on libssh
native-ssh is the desktop apps' SSH engine (D-Modem/gui's ssh/), built here from libssh's and mbedTLS's release tarballs for the host, Android and Apple's systems. ios/build-native.sh makes it DModemSSHNative.xcframework, each arch linked into one object whose only globals are dmc_ssh_*, so its mbedTLS never meets the engine's. DModemSSH's SSHShell keeps its API on it (SwiftNIO SSH goes), adding RSA, keyboard-interactive and private keys; CI runs its tests and the engine's against a real sshd. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRSV65geuGd6zMt2V6r
This commit is contained in:
13 files changed
+2252
-335
No files matched your search
@@ -234,10 +234,25 @@ jobs:
|
||||
env:
|
||||
DMODEM_HOST_BUILD: ${{ github.workspace }}/build-host
|
||||
|
||||
# the iOS app's SSH client (SwiftNIO SSH); its login tests run when
|
||||
# DMODEM_SSH_TEST names an sshd (host:port:user:password), else skip
|
||||
- name: DModemSSH (Swift)
|
||||
run: swift test --package-path ios/DModemSSH
|
||||
# the apps' SSH client (native-ssh: libdmodemssh on libssh), and the
|
||||
# iOS app's Swift on it, against a real sshd
|
||||
- name: SSH client
|
||||
run: |
|
||||
cmake -S native-ssh -B build-ssh -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build-ssh
|
||||
sudo apt-get install -y --no-install-recommends openssh-server
|
||||
sudo useradd -m dmtest
|
||||
echo 'dmtest:Sesame-42' | sudo chpasswd
|
||||
ssh-keygen -q -t ed25519 -N '' -f "$RUNNER_TEMP/key"
|
||||
sudo install -d -m 700 -o dmtest ~dmtest/.ssh
|
||||
sudo install -m 600 -o dmtest "$RUNNER_TEMP/key.pub" ~dmtest/.ssh/authorized_keys
|
||||
sudo mkdir -p /run/sshd
|
||||
sudo /usr/sbin/sshd -p 2222 -o ListenAddress=127.0.0.1 -o PasswordAuthentication=yes
|
||||
DMODEM_SSH_TEST_KEY="$RUNNER_TEMP/key" build-ssh/dmodemssh_test
|
||||
swift test --package-path ios/DModemSSH
|
||||
env:
|
||||
DMODEM_SSH_TEST: 127.0.0.1:2222:dmtest:Sesame-42
|
||||
DMODEM_SSH_HOST_BUILD: ${{ github.workspace }}/build-ssh
|
||||
|
||||
# (Apple's ways on Linux: the portable fallbacks the iOS build has)
|
||||
- name: Engine test, Apple's fallbacks
|
||||
|
||||
Reference in new issue
Block a user