-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
native ssl support #1252
Comments
Or maybe we can support ssl on all tcp server sockets with a |
See also: #1255 for smartcard integration which is possible in openssl. |
2016-07-23 23:44:20: antoine uploaded file
|
The patch above needs work and testing, but kinda works.
openssl req -new -x509 -nodes -out cert.pem -keyout cert.pem
xpra start --start=xterm --bind-ssl=0.0.0.0:10000 --ssl-cert=./cert.pem
xpra attach ssl:127.0.0.1:10000 --ssl-server-verify-mode=none Still todo:
|
Mostly done in r13100 + r13101, this includes the xpra start --start=xterm --bind-tcp=0.0.0.0:10000 --ssl-cert=`pwd`/cert.pem Still todo:
|
Still todo:
|
sslcontext done in r13114. That's enough for a first round of testing and feedback. Still todo:
|
Some more minor tweaks: r13151, r13152, r13155, r13156, r13157, r13160. Tested the latest beta on centos 6.x and 7.x, without problems. Some notes on interoperability with stunnel. xpra start --start=xterm --bind-tcp=0.0.0.0:10000 cat > stunnel.conf <<EOF
[xpra]
accept = 10001
connect = 10000
cert = cert.pem
verify = 0
EOF
```shell
You can then connect to the SSL server on port 10001 using the connection string `ssl:127.0.0.1:10001`
Or you could start another stunnel instance at the client end, and connect to that via TCP.
The SSL wiki page has been moved here: [Encryption SSL](../wiki/Encryption-SSL). |
r13544 allows us to use "xor" authentication mode with ssl connections, so now we can also use the "sys" authentication modules (pam / win32) with ssl. |
The "ssl" config option can now contain the following values: "on", "off", "auto", "tcp", "www". See #1213#comment:5. |
2017-06-03 01:17:28: afarr commented
|
We don't use apache or mod ssl at all. I followed the steps in comment:3 and it worked fine. Tested with both 1.0 branch and trunk. Here it is again, fully scripted: cat > cert-params.conf <<EOF
[req]
default_bits = 2048
prompt = no
default_md = sha256
distinguished_name = dn
[ dn ]
C=US
O=End Point
OU=Testing Domain
CN = localhost
EOF
openssl req -new -x509 -nodes -out cert.pem -keyout cert.pem -config ./cert-params.conf
xpra start --start=xterm --bind-ssl=0.0.0.0:10000 --ssl-cert=./cert.pem --no-daemon (PS: ssl does support relative paths - I had fixed that already) Note: if you want to connect with a browser rather than the client in ssl mode, see comment:10. |
2017-06-07 00:41:12: afarr commented
|
2017-06-08 23:35:31: afarr commented
|
The ssl flag is fully documented in the man page:
Then my guess is that you connected with a plain tcp client connection string, not an ssl one. |
Addendum: Encryption SSL has been updated, here's the simplest way of using SSL safely without a CA:
openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout key.pem -sha256
cat key.pem cert.pem > ssl-cert.pem
xpra start --start=xterm --bind-tcp=0.0.0.0:10000 --ssl-cert=ssl-cert.pem -d ssl
#this is equivalent to
#xpra start --start=xterm --bind-tcp=0.0.0.0:10000 --ssl-cert=cert.pem --ssl-key=key.pem -d ssl
xpra attach ssl://server:10000 --ssl-ca-certs=./cert.pem -d ssl OR convert this cert data into a string and use that: CADATA=`python -c "import sys,base64;print(base64.b64encode(open(sys.argv[1]).read()))" cert.pem`
xpra attach ssl://server:10000 --ssl-ca-data=$CADATA -d ssl This option is much more useful for using SSL with xpra URLs (#1894) or We now generate split cert and key: r20177. |
The python ssl module makes it trivial to wrap tcp sockets.
As part of fixing websockify + ssl (#1213), it would be nice to re-use the same code for supporting SSL natively in our TCP sockets and the websockify code.
Something like:
And client side:
Other arguments we will need for configuring SSL, mirroring websockify and the ssl module but with a "ssl" prefix:
--ssl-cert=CERT
--ssl-key=KEY
--ssl-version=VERSION
--ssl-cert-reqs=REQS
--ssl-ca-certs=FILE
--ssl-ciphers=CIPHERS
The text was updated successfully, but these errors were encountered: