aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl
AgeCommit message (Collapse)Author
2018-11-01ssl: Fix failing property testsPéter Dimitrov
- Updated message generators: ClientHello, ServerHello and EncryptedExtensions - Fixed encoding of the extensions 'signature_algorithms' and 'signature_algorithms_cert' - Updated empty extension definitions Change-Id: I9415e2d022744b9ed4667d20aee2553637ed49f8
2018-10-24ssl: Implement decode of "supported_groups"Péter Dimitrov
Change-Id: I42d7779bb3558aa3a2bea5be065c559d01c0a32b
2018-10-24ssl: Implement TLS 1.3 state machine skeletonPéter Dimitrov
Change-Id: I4b382a7907247cc2099951fdefa40f1511b1123e
2018-10-24ssl: Add module for Finite Field DH groupsPéter Dimitrov
Change-Id: I80bc21b2dee82f4d5641fa8443882838f7c602ba
2018-10-24Merge branch 'ingela/ssl/tls-1.3-record'Ingela Anderton Andin
* ingela/ssl/tls-1.3-record: ssl: TLS-1.3 TLS record protocol handling
2018-10-24ssl: TLS-1.3 TLS record protocol handlingIngela Anderton Andin
2018-10-23Merge branch 'maint'Ingela Anderton Andin
2018-10-23ssl: Correct length to be used in additional data in CHACHA20_POLY1305 cipherIngela Anderton Andin
2018-10-22Merge branch 'maint'Ingela Anderton Andin
2018-10-19ssl: Refactor AEAD ciphersIngela Anderton Andin
TLS-1.3 needs to handle AEAD inputs diffrently than previous versions. Refactor code to facilitate TLS-1.3 additions. Change CHACHA20_POLY1305 NONCE to match RFC 7905. This will be important later when we fix interop with TLS compatible crypto invocation.
2018-10-16Merge pull request #1970 from peterdmv/ssl/signature_algorithms/OTP-15248Péter Dimitrov
Implement Signature Algorithms (TLS 1.3)
2018-10-15ssl: Update default for option signature_algs_certPéter Dimitrov
The option 'signature_algs_cert' is not set by default. Change-Id: Ib87cedc5e48b3ac7a36a30bc7caa08d3193f12fa
2018-10-15ssl: Test hash/signature algorithm selectionPéter Dimitrov
Change-Id: Ie60b2a2651ea975cebd0ccf0c7e2953f89986463
2018-10-15ssl: Filter "signature_algs_cert" from socket optionsPéter Dimitrov
Change-Id: Ifb933d1bad647b941b7324c0712a7bc20ae74efa
2018-10-15ssl: Implement Signature Algorithms (TLS 1.3)Péter Dimitrov
Implement handling of the signature algorithms extension described by RFC 8446. This commit updates the behavior of legacy TLS versions to align them with RFC 8446 (TLS 1.3) and RFC 5246 (TLS 1.2). - TLS 1.0/1.1 clients validate the client certificate against the certificate_type field of the CertificateRequest message. - TLS 1.2 client verifies the hash/signature algorithm pair of the client certificate when processing a CertificateRequest. Old behavior only checked the signature algorithms. - TLS 1.2 server verifies that the server certificate is signed by a hash/signature algorithm pair that appears in the "singature_algorithms" or "signature_algorithms_cert" (RFC 8446) extensions of the ClientHello. Change-Id: I3e0a0d7408984f5e5b1233968934fe34d64eb2b7
2018-10-15ssl: Document ssl option "signature_algs_cert"Péter Dimitrov
Add documentation to the ssl option "signature_algs_cert" introduced by TLS 1.3. The client/server will send a "signature_algorithms_cert" extension, if TLS 1.3 or later is used. Change-Id: I17d612f311a1deef7e29473c3998e7f99fa56f02
2018-10-12Merge branch 'maint'Rickard Green
* maint: Updated OTP version Prepare release erts: Fix UNC path handling on Windows erts: Fix a compiler warning eldap: Fix race at socket close Fix bug for sockopt pktoptions on BSD erts: Fix memory leak on file read errors
2018-10-12Merge branch 'maint-21' into maintRickard Green
* maint-21: Updated OTP version Prepare release erts: Fix UNC path handling on Windows erts: Fix a compiler warning eldap: Fix race at socket close Fix bug for sockopt pktoptions on BSD erts: Fix memory leak on file read errors
2018-10-12Prepare releaseErlang/OTP
2018-10-11Merge branch 'maint'Ingela Anderton Andin
2018-10-11ssl: Fix up incorrect automatic mergeIngela Anderton Andin
2018-10-11Merge branch 'maint'Ingela Anderton Andin
2018-10-11Merge branch 'ingela/maint/ssl/packet-options-to-tls-sender/OTP-15348' into ↵Ingela Anderton Andin
maint Conflicts: lib/ssl/src/tls_sender.erl
2018-10-11ssl: TLS sender process needs to get updates of the socket option packetIngela Anderton Andin
If the socket option is set to {packet, 1|2|3|4} sender process needs to add a packet length header. If packet is changed with ssl:setopts/2 this needs to be communicated to tls_sender.
2018-10-11Merge branch 'maint'Ingela Anderton Andin
2018-10-10ssl: ERL-738 - Correct alert handling with new TLS sender processIngela Anderton Andin
With the new TLS sender process, solving ERL-622, TLS ALERTs sent in the connection state must be encrypted and sent by the TLS sender process. This to make sure that the correct encryption state is used to encode the ALERTS. Care must also be taken to ensure a graceful close down behavior both for normal shutdown and downgrading from TLS to TCP. The original TR ERL-738 is verified by cowboy tests, and close down behavior by our tests. However we alas have not been able to yet create a minimal test case for the originating problem. Also it seems it has become less likely that we run in to the TCP delivery problem, that is the guarantee is only on transport level, not application level. Keep work around function in ssl_test_lib but we can have better test as long as we do not get to much wobbling tests.
2018-10-10ssl: TLS sender process needs to get updates of the socket option packetIngela Anderton Andin
If the socket option is set to {packet, 1|2|3|4} sender process needs to add a packet length header. If packet is changed with ssl:setopts/2 this needs to be communicated to tls_sender.
2018-10-08Merge branch 'maint'Ingela Anderton Andin
Conflicts: lib/ssl/src/ssl_connection.erl lib/ssl/src/tls_connection.erl
2018-10-08ssl: ERL-738 - Correct alert handling with new TLS sender processIngela Anderton Andin
With the new TLS sender process, solving ERL-622, TLS ALERTs sent in the connection state must be encrypted and sent by the TLS sender process. This to make sure that the correct encryption state is used to encode the ALERTS. Care must also be taken to ensure a graceful close down behavior both for normal shutdown and downgrading from TLS to TCP. The original TR ERL-738 is verified by cowboy tests, and close down behavior by our tests. However we alas have not been able to yet create a minimal test case for the originating problem. Also it seems it has become less likely that we run in to the TCP delivery problem, that is the guarantee is only on transport level, not application level. Keep work around function in ssl_test_lib but we can have better test as long as we do not get to much wobbling tests.
2018-10-01ssl: Correct extension decoding and dialyzer specIngela Anderton Andin
2018-09-27ssl: Generalize extensions handlingIngela Anderton Andin
As TLS 1.3 introduces more extensions in other places than in hello messages we like to have generalize extension handling encode/decode with some hello wrappers. Also extend property tests of handshake encod/decode
2018-09-25Merge branch 'maint'Henrik Nord
2018-09-24Prepare releaseErlang/OTP
2018-09-21Merge branch 'maint'Henrik Nord
2018-09-21Update copyright yearHenrik Nord
2018-09-20Merge branch 'maint'Ingela Anderton Andin
2018-09-20ssl: Improve interop checksIngela Anderton Andin
2018-09-20Merge branch 'maint'Ingela Anderton Andin
2018-09-20ssl: Move link to correct processIngela Anderton Andin
The link should be between the connection process and the tls_sender process. But the start of the tls_sender process needs to be done by the process that also starts the connection process in order to correctly create the opaque #ssl_socket{}.
2018-09-12Merge branch 'peterdmv/ssl/property_test_client_hello'Péter Dimitrov
* peterdmv/ssl/property_test_client_hello: ssl: Property test hello extensions Change-Id: I78f5cdef8702141b78e9123efe34e381a5e5d12c
2018-09-12Merge branch 'maint'Ingela Anderton Andin
2018-09-12ssl: Handle incomplete and unorded chainsIngela Anderton Andin
If the peer sends an incomplete chain that we can reconstruct with our known CA-certs it will be accepted. We will assume that the peer honors the protocol and sends an orded chain, however if validation fails we will try to order the chain in case it was unorded. Will also handle that extraneous cert where present. See Note form RFC 8446 Note: Prior to TLS 1.3, "certificate_list" ordering required each certificate to certify the one immediately preceding it; however, some implementations allowed some flexibility. Servers sometimes send both a current and deprecated intermediate for transitional purposes, and others are simply configured incorrectly, but these cases can nonetheless be validated properly. For maximum compatibility, all implementations SHOULD be prepared to handle potentially extraneous certificates and arbitrary orderings from any TLS version, with the exception of the end-entity certificate which MUST be first.
2018-09-11ssl: Property test hello extensionsPéter Dimitrov
Extend test generators with ClientHello extensions: - TLS 1.2: supported_version - TLs 1.3: supported_version and signature_scheme_list Change-Id: I43356a2a921edade124eceb004f20411c7e92619
2018-09-11Merge branch 'peterdmv/ssl/tls13_ciphers'Péter Dimitrov
* peterdmv/ssl/tls13_ciphers: ssl: Fix cipher suite handling ssl: Add TLS 1.3 cipher suites Change-Id: I6b306d29642ba38639157ed1afea8b8df38af30e
2018-09-11Merge branch 'maint'Ingela Anderton Andin
2018-09-11ssl: Correct handling of all PSK cipher suitesIngela Anderton Andin
Before only some PSK suites would be correctly negotiated and most PSK ciphers suites would fail the connection. PSK cipher suites are anonymous in the sense that they do not use certificates except for rsa_psk.
2018-09-07ssl: Fix cipher suite handlingPéter Dimitrov
Implementations of TLS 1.3 which choose to support prior versions of TLS SHOULD support TLS 1.2. That is, a TLS 1.3 ClientHello shall advertise support for TLS 1.2 ciphers in order to be able to connect to TLS 1.2 servers. This commit changes the list of the advertised cipher suites to include old TLS 1.2 ciphers. Change-Id: Iaece3ac4b66a59dfbe97068b682d6010d74522b8
2018-09-07ssl: Add TLS 1.3 cipher suitesPéter Dimitrov
TLS_AES_128_GCM_SHA256 = {0x13,0x01} TLS_AES_256_GCM_SHA384 = {0x13,0x02} TLS_CHACHA20_POLY1305_SHA256 = {0x13,0x03} Change-Id: I3406aaedac812fc43519ff31e5f00d26e375c5d5
2018-09-07Merge branch 'peterdmv/ssl/add_signature_algorithms'Péter Dimitrov
* peterdmv/ssl/add_signature_algorithms: ssl: Use 'HighestVersion' instead of extra function call ssl: Add new extension with encode/decode functions ssl: Format code in handle options Change-Id: Iba3600edc86dc646a7bbabf550d88e7884877e18
2018-09-07Merge branch 'ingela/ssl/property-tests'Ingela Anderton Andin
* ingela/ssl/property-tests: ssl: Correct compression decoding ssl: Add property tests framework ssl: Fix typo