-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
new subcommand to generate SSL certificates easily #4288
Comments
Package a go dependency? 😝🤣 |
No chance, but depending on a |
Without https://github.com/FiloSottile/mkcert, I think you will be re-inventing the wheel 😓 ... especially if you would somehow expect that the package lands on LTSs of all of the OSes you support by "not your actions" |
No, for the python client, all the plumbing is already in place for accepting certificates, even the GUI: #3305, #3299 For the html5 client, things are going to be more complicated no matter what - because browsers. |
* constify, * hide cmd window on MS Windows, * hide openssl terminal output during rpm / deb post-install
Mostly done. Tested certificate download for localhost: rm -fr $HOME/.config/xpra/ssl
xpra setup-ssl ssh://localhost/
Connected (version 2.0, client OpenSSH_9.6)
Authentication (publickey) successful!
ssh server OS is 'linux-gnu'
paramiko SSH agent forwarding enabled
SSH: "SSL certificate file '/etc/xpra/ssl/key.pem' is not accessible"
SSH: 'generating a new SSL certificate:'
SSH: " '/home/antoine/.config/xpra/ssl/key.pem'"
SSH: " '/home/antoine/.config/xpra/ssl/cert.pem'"
SSH: '...........+......+..+...+..........+..+....+.....+......+.......+...+...+.....+.+...+...........+......+.........+++++++++++++++++++++++++++++++++++++++++++++*..+.+..+...+.......+....................+...+..................+.+++++++++++++++++++++++++++++++++++++++++++++*.............+..+...+...............+.+........+.......+.....+.+..+...+..........+..+.............+...............+....................+...+..........+............+...............+..+.+..+....+........+.......+.....+......+.......+...+...+......+...+........+....+...............+......+..+.+.....+.+..............+......+.............+...+...+.....+....+..+.+.................................+.....+.+.........+.................+.........+.+........+.+....................+....+++++'
SSH: '...+.....+...+...+..........+++++++++++++++++++++++++++++++++++++++++++++*.+...+.+...+..+......+....+.....+......+...+......+.+...+.........+......+......+.........+.........+...+..................+....................+.+......+............+...+..+...+.......+.....+.+..+....+...+........+...+.....................+.+.........+...+...+..+++++++++++++++++++++++++++++++++++++++++++++*....+........+....+..+......+.........+.........+.......+..............+....+.....+..........+......+......+.....+....+.........+..+.............+..+...............+............+.......+..............+..........+...........+.........+....+........+...+..............................+.+...........+.......+...+..+.+..............+.......+......+.....+....+...+..+.+........+................+.....+...+.+......+...+......+.....+.........+............+.+..+++++'
SSH: '-----'
SSH EOF on stderr of run-xpra
saved SSL certificate to '/home/antoine/.config/xpra/ssl/hosts/localhost/cert.pem' The certificate has been generated:
And this is the same one we now have in the local store for
Which means that ssl connections to this host:
should succeed without warnings - and they do!
|
Suggested in https://github.com/orgs/Xpra-org/discussions/4146#discussioncomment-9975850
This subcommand can be called by the post-installation scripts, simplifying:
xpra/packaging/MSWindows/xpra.iss
Lines 188 to 195 in d23f941
xpra/packaging/debian/xpra/xpra-server.postinst
Lines 16 to 18 in d23f941
xpra/packaging/rpm/xpra.spec
Lines 770 to 772 in d23f941
(and fixing the MS Windows one which is currently broken: https://github.com/orgs/Xpra-org/discussions/4146#discussioncomment-9974587)
Could be very useful for WebTransport - if we can figure out how to make the browsers accept the certificates: Xpra-org/xpra-html5#143 (comment)
The only downside is that in my experience, mkcert is easier to manage - at least for local testing.
We already have #3299 for accepting certificates per-host in the Python client.
Perhaps this could be enhanced too: qrencode the certificate hash for easier verification?
It would be neat if we could use this to generate a SSL certificate + key on a remote host and install the certificate on the local system.
Something like:
The text was updated successfully, but these errors were encountered: