Commit graph

32 commits

Author SHA1 Message Date
Robert Pluim
d087dcf140 Fix network stream tests
* test/lisp/net/network-stream-tests.el
(make-ipv6-tcp-server-with-unspecified-port): Skip if IPv6 is not available.
(make-ipv6-tcp-server-with-specified-port): Likewise.
(echo-server-with-local-ipv6): Likewise.
2019-02-05 15:50:03 +01:00
Robert Pluim
49f6243027 Use IPv6 localhost when family is 'ipv6
This fixes Bug#34193

* src/process.c (Fmake_network_process): Explicitly use ::1 when
using IPv6 with 'local.  Update docstring.

* test/lisp/net/network-stream-tests.el
(make-ipv6-tcp-server-with-unspecified-port):
(make-ipv6-tcp-server-with-specified-port): Test creating ipv6
local server.
(make-server): Add optional family argument, default ipv4
(echo-server-with-local-ipv4): Test connecting to 'local ipv4
(echo-server-with-local-ipv6): Test connecting to 'local ipv6

* doc/lispref/processes.texi (Network Processes): Describe
behavior when using 'local.

* etc/NEWS: Document new 'make-network-process' behavior when
connecting to 'local with ipv6.
2019-02-04 10:06:04 +01:00
Robert Pluim
f3f9a3582e Check for client certificates when using GnuTLS
This fixes Bug#33780, and extends the documentation to describe how to
enable use of client certificates.

* lisp/net/network-stream.el (network-stream-certificate): Correct
order of parameters to plist-get.
(network-stream-open-tls): Pass all received parameters to
open-gnutls-stream as plist, not just :nowait.

* lisp/net/gnutls.el (open-gnutls-stream): Change optional nowait arg
to be plist.  Derive nowait and client certificate(s) and keys(s) from
plist (maybe via auth-source) and pass to gnutls-boot-parameters and
gnutls-negotiate.
(network-stream-certificate): Add declare-function form for it.

* doc/misc/auth.texi (Help for users): Describe format to use for
client key/cert specification.

* doc/misc/emacs-gnutls.texi (Help For Developers): Describe usage of
optional plist argument.  Add crossreference to description of
.authinfo format for client key/cert specification.

* etc/NEWS: Describe new client certificate functionality for
  'open-network-stream'.

* test/lisp/net/network-stream-tests.el: Add require of network-stream.
(connect-to-tls-ipv4-nowait): Bind network-security-level to 'low
in order to bypass nsm prompting.
(connect-to-tls-ipv6-nowait): Likewise.
(open-network-stream-tls-wait): New test.
(open-network-stream-tls-nowait): New test.
(open-network-stream-tls): New test.
(open-network-stream-tls-nocert): New test.
(open-gnutls-stream-new-api-default): New test.
(open-gnutls-stream-new-api-wait): New test.
(open-gnutls-stream-old-api-wait): New test.
(open-gnutls-stream-new-api-nowait): New test.
(open-gnutls-stream-old-api-nowait): New test.
(open-gnutls-stream-new-api-errors): New test.
The new tests exercise 'open-network-stream' and the old and new
api of 'open-gnutls-stream'.
2019-01-24 11:36:47 +01:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Glenn Morris
9742069276 Further attempt to avoid hang in network-stream-tests
* test/lisp/net/network-stream-tests.el (connect-to-tls-ipv6-nowait):
Limit the time we wait for the external process.
2017-07-21 14:01:12 -04:00
Glenn Morris
255f675d89 Convert some network test failures to skipping
These tests intermittently fail on hydra.nixos.org for unclear
reasons related to starting the external process.
This isn't an Emacs issue, and the failures cause noise on
the emacs-buildstatus list.  (Bug#24503)
* test/lisp/net/network-stream-tests.el (echo-server-nowait)
(connect-to-tls-ipv4-nowait): Skip rather than fail if the
external process fails to start properly.
2017-01-11 14:35:51 -05:00
Paul Eggert
e6a782ee1a Update copyright year to 2017 in master
Run admin/update-copyright in the master branch.  This fixes files
that were not already fixed in the emacs-25 branch before it was
merged here.
2017-01-01 01:48:59 -08:00
Glenn Morris
378f5776fc Try to avoid hangs and stray procs in network-stream-tests. (Bug#23560)
* test/lisp/net/network-stream-tests.el (connect-to-tls-ipv4-wait)
(connect-to-tls-ipv4-nowait, connect-to-tls-ipv6-nowait):
Ensure gnutls-serv process gets killed.
(echo-server-nowait, connect-to-tls-ipv4-nowait):
Limit the amount of time we might wait.
2016-06-07 20:50:35 -07:00
Ken Brown
1ee91bf891 Allow network-stream-tests to work for out-of-tree builds
* test/lisp/net/network-stream-tests.el
(network-stream-tests--datadir): New defconst.
(make-tls-server): Use it.
2016-05-24 16:12:03 -04:00
Ken Brown
6a28fa85a1 Fix failing echo-server-nowait test
* test/lisp/net/network-stream-tests.el (echo-server-nowait):
Specify IPv4 for the client, to match the family of the server.
(Bug#23606)
2016-05-24 15:55:03 -04:00
Michael Albinus
add035f502 Fix typo in network-stream-tests.el
* test/lisp/net/network-stream-tests.el
(connect-to-tls-ipv6-nowait): Fix typo.
2016-03-29 09:26:05 +02:00
Lars Magne Ingebrigtsen
68f1342204 Move the cert files to the data directory 2016-03-20 16:08:55 +01:00
Lars Magne Ingebrigtsen
76b97fb0f9 Don't run ipv6 test on systems without ipv6
* test/lisp/net/network-stream-tests.el
(connect-to-tls-ipv6-nowait): Skip on systems without ipv6.
2016-03-05 17:04:33 +01:00
Lars Ingebrigtsen
f577f59a52 Fix merge conflicts in network-stream-tests.el 2016-02-22 15:06:33 +11:00
Lars Ingebrigtsen
7d63fa01af Fix up tests for async TLS negotiation 2016-02-19 12:37:34 +11:00
Eli Zaretskii
f96cfce306 Fix network-stream-tests.el for MS-Windows
* test/lisp/net/network-stream-tests.el
(connect-to-tls-ipv6-nowait): Skip for MS-Windows builds.
(connect-to-tls-ipv4-wait): Add a 0.1 sleep-for.
2016-02-13 15:17:51 +02:00
Eli Zaretskii
53f3d4a94a Fix network-stream-tests on MS-Windows
* test/lisp/net/network-stream-tests.el (make-local-unix-server):
Skip if local sockets are not supported.
2016-02-09 21:07:11 +02:00
Lars Ingebrigtsen
71f22453a5 Add an IPv6 test
* test/lisp/net/network-stream-tests.el
(connect-to-tls-ipv6-nowait): Add an ipv6 test, too.
2016-02-09 11:28:36 +11:00
Lars Ingebrigtsen
a2d6d79c95 Use gnutls-serv instead of openssh
* test/lisp/net/network-stream-tests.el (make-tls-server): Use
gnutls-serv instead of openssh.
2016-02-09 11:28:26 +11:00
Lars Ingebrigtsen
04913ccfa9 Skip TLS tests if we don't have openssl
* test/lisp/net/network-stream-tests.el (connect-to-tls): Skip
TLS tests if we don't have openssl and GnuTLS.
2016-02-09 11:28:21 +11:00
Lars Ingebrigtsen
8e7703e832 Add an IPv6 test
* test/lisp/net/network-stream-tests.el
(connect-to-tls-ipv6-nowait): Add an ipv6 test, too.
2016-02-09 10:24:34 +11:00
Lars Ingebrigtsen
fbde8feb79 Use gnutls-serv instead of openssh
* test/lisp/net/network-stream-tests.el (make-tls-server): Use
gnutls-serv instead of openssh.
2016-02-09 10:16:33 +11:00
Glenn Morris
5825f42e7a ; Some standardization of copyright and license notices in recent new files 2016-02-08 08:43:52 -08:00
Lars Ingebrigtsen
c0abae57f6 Skip TLS tests if we don't have openssl
* test/lisp/net/network-stream-tests.el (connect-to-tls): Skip
TLS tests if we don't have openssl and GnuTLS.
2016-02-08 18:28:00 +11:00
Lars Ingebrigtsen
ea87d91d57 Add a TLS connection test
* test/lisp/net/network-stream-tests.el (connect-to-tls): Add
a TLS connection test.
2016-02-08 15:37:48 +11:00
Lars Ingebrigtsen
d7e2238176 Add more network tests
* test/lisp/net/network-stream-tests.el (echo-server-nowait):
New test.
2016-02-08 15:37:41 +11:00
Lars Ingebrigtsen
92acfb90c6 Add network tests
* test/lisp/net/network-stream-tests.el: New suite of network tests.
2016-02-08 15:37:34 +11:00
Lars Ingebrigtsen
f29b6cf379 Add a TLS connection test
* test/lisp/net/network-stream-tests.el (connect-to-tls): Add
a TLS connection test.
2016-02-08 15:28:50 +11:00
Lars Ingebrigtsen
4f50d8db8c Add more network tests
* test/lisp/net/network-stream-tests.el (echo-server-nowait):
New test.
2016-02-08 14:35:07 +11:00
Lars Ingebrigtsen
0cc907100c Add network tests
* test/lisp/net/network-stream-tests.el: New suite of network tests.
2016-02-08 14:24:25 +11:00