Commit graph

1463 commits

Author SHA1 Message Date
Daniel Kahn Gillmor
0be085d34a emit "ECDHE" instead of "EECDH" for kX packet trace output
other parts of packet tracing emit the standard "ECDHE" label instead
of "EECDH".  This change brings the output of ssl_print_client_keyex()
and ssl_print_server_keyex() into accordance with the standard term.
2014-01-09 15:43:27 +00:00
Daniel Kahn Gillmor
7963ddeb44 Allow "ECDHE" as a synonym of "EECDH" when specifiying ciphers
The standard terminology in https://tools.ietf.org/html/rfc4492 is
ECDHE.  "openssl ciphers" outputs ECDHE.  But users of the library
currently cannot specify ECDHE, they must specify EECDH.

This change allows users to specify the common term in cipher suite
strings without breaking backward compatibility.
2014-01-09 15:43:27 +00:00
Dr. Stephen Henson
8d65fdb62e Add fix for CVE-2013-4353
(cherry picked from commit 6b42ed4e7104898f4b5b69337589719913b36404)
2014-01-07 15:39:21 +00:00
Dr. Stephen Henson
5b7f36e857 Add ServerInfoFile to SSL_CONF, update docs. 2014-01-03 23:14:23 +00:00
Dr. Stephen Henson
a4339ea3ba Use algorithm specific chains for certificates.
Fix a limitation in SSL_CTX_use_certificate_chain_file(): use algorithm
specific chains instead of the shared chain.

Update docs.
2014-01-03 22:39:49 +00:00
Andy Polyakov
e8b0dd57c0 ssl/t1_enc.c: optimize PRF (suggested by Intel). 2014-01-03 21:52:49 +01:00
Dr. Stephen Henson
b77b58a398 Don't change version number if session established
When sending an invalid version number alert don't change the
version number to the client version if a session is already
established.

Thanks to Marek Majkowski for additional analysis of this issue.

PR#3191
2014-01-02 15:05:44 +00:00
Dr. Stephen Henson
f6dfbeed3c Update curve list size.
(cherry picked from commit cfa86987a8d9d2b8cc5e5fea2d3260c46542cdb9)
2013-12-29 16:30:35 +00:00
Dr. Stephen Henson
20b82b514d Fix DTLS retransmission from previous session.
For DTLS we might need to retransmit messages from the previous session
so keep a copy of write context in DTLS retransmission buffers instead
of replacing it after sending CCS. CVE-2013-6450.
(cherry picked from commit 34628967f1)
2013-12-20 23:46:16 +00:00
Dr. Stephen Henson
ed496b3d42 Check EVP errors for handshake digests.
Partial mitigation of PR#3200
(cherry picked from commit 0294b2be5f)
2013-12-18 13:29:07 +00:00
Dr. Stephen Henson
4fcdd66fff Update to pad extension.
Fix padding calculation for different SSL_METHOD types. Use the
standard name as used in draft-agl-tls-padding-02
2013-12-13 15:39:55 +00:00
Dr. Stephen Henson
7af31968dd Verify parameter retrieval functions.
New functions to retrieve internal pointers to X509_VERIFY_PARAM
for SSL_CTX and SSL structures.
(cherry picked from commit be0c9270690ed9c1799900643cab91de146de857)
2013-12-13 15:39:55 +00:00
Dr. Stephen Henson
a25f9adc77 New functions to retrieve certificate from SSL_CTX
New functions to retrieve current certificate or private key
from an SSL_CTX.

Constify SSL_get_private_key().
2013-11-18 18:56:48 +00:00
Dr. Stephen Henson
60aeb18750 Don't define SSL_select_next_proto if OPENSSL_NO_TLSEXT set 2013-11-18 16:52:10 +00:00
Dr. Stephen Henson
fdeaf55bf9 Use correct header length in ssl3_send_certifcate_request 2013-11-17 17:48:18 +00:00
Piotr Sikora
2911575c6e Fix compilation with no-nextprotoneg.
PR#3106
2013-11-14 01:20:12 +00:00
Dr. Stephen Henson
629b640bbc Allow match selecting of current certificate.
If pointer comparison for current certificate fails check
to see if a match using X509_cmp succeeds for the current
certificate: this is useful for cases where the certificate
pointer is not available.
2013-11-13 23:48:35 +00:00
Rob Stradling
7b6b246fd3 Additional "chain_cert" functions.
PR#3169

This patch, which currently applies successfully against master and
1_0_2, adds the following functions:

SSL_[CTX_]select_current_cert() - set the current certificate without
disturbing the existing structure.

SSL_[CTX_]get0_chain_certs() - get the current certificate's chain.

SSL_[CTX_]clear_chain_certs() - clear the current certificate's chain.

The patch also adds these functions to, and fixes some existing errors
in, SSL_CTX_add1_chain_cert.pod.
2013-11-13 23:48:35 +00:00
Krzysztof Kwiatkowski
44314cf64d Delete duplicate entry.
PR#3172
2013-11-13 23:48:35 +00:00
Dr. Stephen Henson
0467ea6862 Experimental workaround TLS filler (WTF) extension.
Based on a suggested workaround for the "TLS hang bug" (see FAQ and PR#2771):
if the TLS Client Hello record length value would otherwise be > 255 and less
that 512 pad with a dummy extension containing zeroes so it is at least 512.

To enable it use an unused extension number (for example 0x4242) using
e.g. -DTLSEXT_TYPE_wtf=0x4242

WARNING: EXPERIMENTAL, SUBJECT TO CHANGE.
2013-11-06 20:49:47 +00:00
Dr. Stephen Henson
e0ffd129c1 Enable PSK in FIPS mode.
Enable PSK ciphersuites with AES or DES3 in FIPS mode.
2013-11-06 14:38:28 +00:00
Dr. Stephen Henson
26bda7ef2b Sync error codes with 1.0.2-stable 2013-11-06 14:18:41 +00:00
Dr. Stephen Henson
d519f0831c Add brainpool curves to trace output.
(cherry picked from commit bd80d0229c)
2013-11-02 15:30:03 +00:00
Robin Seggelmann
b9ef52b078 DTLS/SCTP Finished Auth Bug
PR: 2808

With DTLS/SCTP the SCTP extension SCTP-AUTH is used to protect DATA and
FORWARD-TSN chunks. The key for this extension is derived from the
master secret and changed with the next ChangeCipherSpec, whenever a new
key has been negotiated. The following Finished then already uses the
new key.  Unfortunately, the ChangeCipherSpec and Finished are part of
the same flight as the ClientKeyExchange, which is necessary for the
computation of the new secret. Hence, these messages are sent
immediately following each other, leaving the server very little time to
compute the new secret and pass it to SCTP before the finished arrives.
So the Finished is likely to be discarded by SCTP and a retransmission
becomes necessary. To prevent this issue, the Finished of the client is
still sent with the old key.
(cherry picked from commit 9fb523adce)
2013-11-01 21:41:52 +00:00
Piotr Sikora
29b490a458 Fix SSL_OP_SINGLE_ECDH_USE
Don't require a public key in tls1_set_ec_id if compression status is
not needed. This fixes a bug where SSL_OP_SINGLE_ECDH_USE wouldn't work.
(cherry picked from commit 5ff68e8f6d)
2013-11-01 21:41:52 +00:00
Dr. Stephen Henson
a9bc1af984 Add -ecdh_single option.
Add -ecdh_single option to set SSL_OP_SINGLE_ECDH_USE on the command line.
(cherry picked from commit f14a4a861d)
2013-11-01 21:41:52 +00:00
Dr. Stephen Henson
96e16bddb4 Fix warning. 2013-11-01 21:41:52 +00:00
Dr. Stephen Henson
c557f921dc Add SSL_CONF command to set DH Parameters. 2013-10-22 07:38:25 +01:00
Dr. Stephen Henson
abf840e4f7 Fix argument processing. 2013-10-22 05:44:23 +01:00
Dr. Stephen Henson
27f3b65f49 Constification. 2013-10-21 07:19:01 +01:00
Ben Laurie
9f944107a9 Remove unused variable. 2013-10-21 03:37:20 +01:00
Nick Mathewson
2927791d77 Fix another gmt_unix_time case in server_random 2013-10-21 03:37:20 +01:00
Nick Mathewson
2016265dfb Do not include a timestamp in the Client/ServerHello Random field.
Instead, send random bytes, unless SSL_SEND_{CLIENT,SERVER}RANDOM_MODE
is set.

This is a forward-port of commits:
  4af793036f
  f4c93b46ed
  3da721dac9
  2583270191

While the gmt_unix_time record was added in an ostensible attempt to
mitigate the dangers of a bad RNG, its presence leaks the host's view
of the current time in the clear.  This minor leak can help
fingerprint TLS instances across networks and protocols... and what's
worse, it's doubtful thet the gmt_unix_time record does any good at
all for its intended purpose, since:

    * It's quite possible to open two TLS connections in one second.

    * If the PRNG output is prone to repeat itself, ephemeral
      handshakes (and who knows what else besides) are broken.
2013-10-21 03:37:20 +01:00
Dr. Stephen Henson
ec2f7e568e Extend SSL_CONF
Extend SSL_CONF to return command value types.

Add certificate and key options.

Update documentation.
2013-10-20 22:07:36 +01:00
Dr. Stephen Henson
13af145159 Typo. 2013-10-20 22:07:36 +01:00
Dr. Stephen Henson
45473632c5 Prevent use of RSA+MD5 in TLS 1.2 by default.
Removing RSA+MD5 from the default signature algorithm list
prevents its use by default.

If a broken implementation attempts to use RSA+MD5 anyway the sanity
checking of signature algorithms will cause a fatal alert.
2013-10-20 22:07:35 +01:00
Dr. Stephen Henson
6699cb8491 Add brainpool curves to NID table too. 2013-10-15 12:08:47 +01:00
Dr. Stephen Henson
c2c76a4d90 RFC7027 (Brainpool for TLS) support. 2013-10-15 11:33:30 +01:00
Andy Polyakov
78038e095f ssl/s3_pkt.c: add initial multi-block encrypt. 2013-10-08 23:40:09 +02:00
Ben Laurie
9725bda766 Show useful errors.
Conflicts:
	apps/s_server.c
2013-09-25 12:45:48 +01:00
Ben Laurie
7eef2b0cd7 Merge remote-tracking branch 'trevp/pemfix' into trev-pem-fix 2013-09-20 14:39:33 +01:00
Dr. Stephen Henson
9600602267 Fix error code clashes. 2013-09-18 01:22:50 +01:00
Dr. Stephen Henson
40088d8b81 DTLS version usage fixes.
Make DTLS behave like TLS when negotiating version: record layer has
DTLS 1.0, message version is 1.2.

Tolerate different version numbers if version hasn't been negotiated
yet.
2013-09-17 18:55:41 +01:00
Trevor Perrin
92acab0b6a Redo deletion of some serverinfo code that supplemental data code mistakenly reinstated. 2013-09-16 17:28:57 +01:00
Trevor Perrin
c655f40ed2 Require ServerInfo PEMs to be named "BEGIN SERVERINFO FOR"... 2013-09-13 19:32:55 -07:00
Trevor Perrin
9103197591 Redo deletion of some serverinfo code that supplemental data code mistakenly reinstated. 2013-09-13 18:31:48 -07:00
Rob Stradling
cbf8123512 Tidy up comments. 2013-09-13 16:24:22 +01:00
Rob Stradling
378341e192 Use TLS version supplied by client when fingerprinting Safari. 2013-09-13 16:24:22 +01:00
Rob Stradling
d89cd382da Fix compilation with no-ec and/or no-tlsext. 2013-09-13 16:24:22 +01:00
Dr. Stephen Henson
5e3ff62c34 Experimental encrypt-then-mac support.
Experimental support for encrypt then mac from
draft-gutmann-tls-encrypt-then-mac-02.txt

To enable it set the appropriate extension number (0x10 for the test server)
using e.g. -DTLSEXT_TYPE_encrypt_then_mac=0x10

For non-compliant peers (i.e. just about everything) this should have no
effect.
2013-09-08 13:14:03 +01:00