Commit Graph

1209 Commits

Author SHA1 Message Date
Steven Danneman
1f165bcdf4 Add support for testing postgres protocol over TLS/SSL
The Postgres protocol uses STARTTLS with a custom start packet. This
functionality is supported by openssl s_client in the current openssl
master branch but not yet in any released version.

This patch detects whether the given openssl binary supports postgres
and runs the usual tests against a postgres server.

Example of no openssl support:

    ~/bin/testssl$ ./testssl.sh --quiet
    --openssl=/opt/openssl/openssl-1.1.0c/bin/openssl --starttls=postgres
    test.postgres.server.com:5432

     Start 2016-12-07 18:03:24    -->> ip.add.re.ss:5432
    (test.postgres.server.com:5432) <<--

    Fatal error: Your /opt/openssl/openssl-1.1.0c/bin/openssl does not
    support the "-starttls postgres" option

Example of openssl support:

    ~/bin/testssl$ ./testssl.sh --quiet
    --openssl=/opt/openssl/openssl-2016-12-07/bin/openssl --startt ls=postgres
    test.postgres.server.com:5432

     Start 2016-12-07 18:06:03    -->> ip.add.re.ss:5432
    (test.postgres.server.com:5432) <<--

     Service set:            STARTTLS via POSTGRES

     Testing protocols (via openssl, SSLv2 via sockets)

     SSLv2               not offered (OK)
     SSLv3               offered (NOT ok)
     TLS 1               offered
     TLS 1.1             offered
     TLS 1.2             offered (OK)
     SPDY/NPN            (SPDY is an HTTP protocol and thus not tested here)
     HTTP2/ALPN          (HTTP/2 is a HTTP protocol and thus not tested
    here)
    ...
2016-12-08 11:11:41 -08:00
Dirk
c985f68533 see #544 2016-12-01 18:21:09 +01:00
Dirk Wetter
c23e097cb8 Merge pull request #525 from tecknicaltom/fix_duplicate_id_client_sim
fix a duplicate test id in the client sim section
2016-11-19 20:00:46 +01:00
Tom Samstag
4510e407fe fix a duplicate test id in the client sim section
The Apple ATS 9 iOS 9 client simulation test had an incorrect short name
which resulted in a duplicate ID in the JSON output
2016-11-16 10:45:13 -08:00
Dirk Wetter
4057bc52ff Merge pull request #513 from dcooper16/fix_x25519
Curve X25519 fixes
2016-11-09 21:19:29 +01:00
David Cooper
43b35b8cc2 Curve X25519 fixes
This PR fixes two issues related to curve X25519.

First, while OpenSSL 1.1.0 supports curve X25519, it is not included in the output of `$OPENSSL ecparam -list_curves`. I tried several versions of OpenSSL (and one version of LibreSSL), and every version output either "Error with command" or "unknown option" in response to `$OPENSSL s_client -curves $curve` if it either did not support the `-curves` option or did not support `$curve`. (When the `-curve` option was supported with `$curve`, a "connect" error was output.)

The second issue is that the "Server Temp Key" line in the output of `s_client` is different for curve X25519. For other elliptic curves, the output is
```
Server Temp Key: ECDH, P-256, 256 bits
```
For X25519 it is:
```
Server Temp Key: X25519, 253 bits
```
So, `read_dhbits_from_file()` needs to allow for `$what_dh` being "X25519" rather than "ECDH" and `run_pfs()` needs to allow for the possibility that the curve name will be the first field rather than the second.
2016-11-08 10:10:14 -05:00
Dirk
4f99d9d658 update 2016-11-07 21:03:45 +01:00
Dirk
65c03a99ba update 2016-11-05 15:02:00 +01:00
Dirk
72ac0734d1 tolower 2016-11-05 14:55:30 +01:00
Dirk
f18a398ce3 handle better missing ca_hashes.txt 2016-11-04 08:39:14 +01:00
Dirk Wetter
63ec369f34 output polish 2016-10-29 15:37:30 +02:00
Dirk Wetter
df2704dc20 Merge pull request #498 from Sousaphone/master
Apple ATS9 client simulation
2016-10-28 21:31:39 +02:00
Dirk
99300a0059 bump version 2016-10-27 22:02:35 +02:00
Dirk
00a5d19276 Merge branch 'master' of github.com:drwetter/testssl.sh 2016-10-27 22:00:19 +02:00
Dirk
337e66fc61 Merge branch 'CA_pinning' 2016-10-27 21:59:42 +02:00
Dirk
1613bb214e Merge branch 'master' into CA_pinning
Conflicts:
	testssl.sh
2016-10-27 21:59:10 +02:00
Dirk Wetter
bfad620bf5 Update Readme.md 2016-10-21 22:16:19 +02:00
Thomas Alexander Frederiksen
217f2fb91a Apple ATS9 client test 2016-10-19 10:54:37 +02:00
Dirk
5e5edd5c89 FIX #490 2016-10-15 22:55:24 +02:00
Dirk Wetter
6abca0c598 Merge pull request #495 from mailsvb/minor_display_fix_ssl3_offer
remove additional pr_off at the end of sslv2 check
2016-10-14 22:07:19 +02:00
mailsvb
4ce4d922ac remove additional pr_off at the end of sslv2 check 2016-10-12 22:32:35 +02:00
Dirk
d32dbdaff3 Updating MS store, sill small, still not automated/cumbersome not sure if ok 2016-10-12 21:15:37 +02:00
Dirk
6723622024 - do not do HTTP2+SPDY checks if non-STARTTLS but also non-HTTP
- ASSUMING_HTTP --> ASSUME_HTTP
- minor cleanups
2016-10-11 22:30:30 +02:00
Dirk Wetter
d59c581700 Update Readme.md 2016-10-11 12:17:33 +02:00
Dirk
77f98e73e2 medium only for "Secure Client-Initiated Renegotiation" != HTTP 2016-10-10 23:27:34 +02:00
Dirk Wetter
51912944ec Merge pull request #492 from mailsvb/CA_BUNDLES_PATH
fix usage of CA_BUNDLES_PATH env for local ca_bundles
2016-10-09 10:22:22 +02:00
mailsvb
5a967302dc fix usage of CA_BUNDLES_PATH env for local ca_bundles 2016-10-08 22:50:44 +02:00
Dirk
1c5eb17729 (saving work): major cleanups for output readability and code 2016-10-06 18:53:25 +02:00
Dirk
bd64fb4214 minor putput cleanup for headers 2016-10-03 21:17:29 +02:00
Dirk Wetter
f9d44484af Merge branch 'master' of github.com:drwetter/testssl.sh 2016-10-03 21:01:54 +02:00
Dirk Wetter
9fe87223cc fix anchor 2016-10-03 20:48:32 +02:00
Dirk Wetter
248351eef5 Update Readme.md 2016-10-03 20:29:50 +02:00
Dirk Wetter
bf1d3933bf Update Readme.md 2016-10-03 20:28:44 +02:00
Dirk
878ab519c0 update 2016-10-03 20:21:38 +02:00
Dirk Wetter
19b63aa8a9 duplicate headers fixed, #FIX 488, outstanding: proper treatment of simulatenous Public-Key-Pins|Public-Key-Pins-Report-Only 2016-10-03 18:52:48 +02:00
Dirk
e2023f51ac evaluate env TESTSSL_INSTALL_DIR and CA_BUNDLES_PATH for CA bundles and/or RFC/IANA mapping, FIX #475, #435 2016-10-02 18:15:13 +02:00
Dirk
eb1f6e05bb update, thanks to Niko78, see #371 2016-10-02 10:04:25 +02:00
Dirk
fd6e2c0682 cleanup of #489 2016-10-01 22:25:14 +02:00
Dirk
09c19b4654 FIX #489, clear warning if >=1 HSTS headers are present 2016-10-01 10:04:33 +02:00
Dirk
fd83509ae5 update 2016-09-29 23:23:44 +02:00
Dirk
5115055895 update 2016-09-29 21:44:54 +02:00
Dirk
15f9315cd0 fix last build 2016-09-29 21:27:24 +02:00
Dirk
a5adb2f3ec fixing last T CI run 2016-09-29 21:20:13 +02:00
Dirk
68697b822e fixing last run, hopfully 2016-09-29 21:19:09 +02:00
Dirk
05a0e555a7 - save 1x sed in count_lines/words 2016-09-29 20:59:13 +02:00
Dirk
d786a94a8c output + code polishing, phrasing. lf still has space for improvements 2016-09-28 20:32:01 +02:00
Dirk Wetter
b238fab3c1 Merge pull request #443 from dcooper16/remove_sockread
Replace sockread() with sockread_serverhello()
2016-09-27 22:34:17 +02:00
Dirk Wetter
144e2c20cf Update Readme.md 2016-09-27 00:08:01 +02:00
Dirk Wetter
092badc55a Update Readme.md 2016-09-27 00:01:13 +02:00
Dirk Wetter
e59efb0313 Merge branch 'master' of github.com:drwetter/testssl.sh 2016-09-26 23:48:08 +02:00