summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* TLS 1.3 - New revived high-level record range APItmp-ajuaristi-draft-ietf-tls-tls13-21Ander Juaristi2017-09-244-8/+73
|
* TLS 1.3 - Send new record formatAnder Juaristi2017-09-233-30/+180
|
* TLS 1.3 - Receive new record formatAnder Juaristi2017-09-231-0/+56
|
* extensions: include extension number in debugging messageNikos Mavrogiannopoulos2017-09-131-2/+2
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: check behavior on the extension hello flagsNikos Mavrogiannopoulos2017-09-131-68/+135
| | | | | | | | | | | That is, verify whether the various combinations of GNUTLS_EXT_FLAG_CLIENT_HELLO, GNUTLS_EXT_FLAG_TLS12_SERVER_HELLO, GNUTLS_EXT_FLAG_TLS13_SERVER_HELLO work as expected with regards to sending and receiving extensions. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* extensions: apply extension msg type restrictionsNikos Mavrogiannopoulos2017-09-133-16/+106
| | | | | | | | That is, on the extension parsing functions ensure that no extension which are not valid for the currently received message are parsed. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* extensions: mark the message validity of each supported extensionNikos Mavrogiannopoulos2017-09-1319-7/+43
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* extensions: type renamed to id for clarityNikos Mavrogiannopoulos2017-09-1320-76/+76
| | | | | | | | | We were previously using the variable named 'type' to indicate the extension ID. With TLS 1.3, extensions are also given an applicability type (which message the extension applies to), and thus renamed the variable for clarity. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* tests: guile: don't use VERS-TLS-ALLNikos Mavrogiannopoulos2017-09-123-5/+5
| | | | | | That is, avoid enabling experimental protocols. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* .gitlab-ci.yml: abi-coverage: include guile logsNikos Mavrogiannopoulos2017-09-121-0/+1
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* nettle: added HKDF functionsNikos Mavrogiannopoulos2017-09-123-0/+164
| | | | | | | They are being included conditionally depending on the RSA-PSS feature (RSA-PSS and HKDF are expected to be introduced at the same version). Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* gnutls-cli-debug: use explicit TLS versions rather than TLS-ALLNikos Mavrogiannopoulos2017-09-121-1/+1
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* _gnutls_server_select_suite: don't set auth callbacks for TLS 1.3Nikos Mavrogiannopoulos2017-09-121-38/+41
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* supported_versions: print negotiated protocolNikos Mavrogiannopoulos2017-09-121-0/+2
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Negotiate draft-TLS1.3Nikos Mavrogiannopoulos2017-09-125-9/+44
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* handshake: added the TLS 1.3 ciphersuitesNikos Mavrogiannopoulos2017-09-124-9/+67
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* handshake: print negotiated version after its negotiation (for TLS1.3)Nikos Mavrogiannopoulos2017-09-121-3/+2
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* tests: fix TLS version to 1.2 for tests which used VERS-TLS-ALLNikos Mavrogiannopoulos2017-09-124-8/+8
| | | | | | | This allows the test suite to run, even when TLS1.3 is still experimental. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Added support for key share extensionNikos Mavrogiannopoulos2017-09-1213-12/+754
| | | | | | This enables TLS 1.3 key exchange based on the key share extension. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* handshake: always accept TLS 1.2 in client hello if we have later protocols ↵Nikos Mavrogiannopoulos2017-09-111-1/+12
| | | | | | | | | enabled That is because after TLS 1.3 there is no negotiation of the version using the Client Hello field, but with an extension. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* require nettle 3.3 or laterNikos Mavrogiannopoulos2017-09-113-19/+6
| | | | | | This will simplify handling of the x25519 key exchange. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* str: added function to append fixed-size MPINikos Mavrogiannopoulos2017-09-112-0/+41
| | | | | | | This is used in TLS 1.3 which introduces a new MPI over-the-wire format. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: resumption tests were restricted to TLS 1.2Nikos Mavrogiannopoulos2017-09-112-13/+17
| | | | | | | TLS 1.3 implements resumption is a different way, so we should introduce new resumption tests once that support is in place. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* ext/post_handshake: restrict the use of this extension to TLS 1.3 or laterNikos Mavrogiannopoulos2017-09-113-2/+16
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* handshake: optimizations and enhancements in session version handlingNikos Mavrogiannopoulos2017-09-113-43/+43
| | | | | | | | | | This introduces the following new functions: const version_entry_st *_gnutls_legacy_version_max(gnutls_session_t session); const version_entry_st *_gnutls_version_max(gnutls_session_t session); which replace their previous counterparts. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: check for post-handshake extension in TLS 1.2-only sessionsNikos Mavrogiannopoulos2017-09-112-55/+11
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added unit tests for post-handshake-auth extensionNikos Mavrogiannopoulos2017-09-114-1/+678
| | | | | | | These test whether this extension is seen under TLS 1.3 in client hello, and whether it is not present in server hello. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* handshake: send client and server hellos according to TLS 1.3Nikos Mavrogiannopoulos2017-09-113-52/+67
| | | | | | | That is, when TLS 1.3 is negotiated the compression algorithms and session ID fields are no longer sent. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Added support for post handshake auth extensionNikos Mavrogiannopoulos2017-09-116-1/+131
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: updated for new behavior of disabling protocols on missing signature ↵Nikos Mavrogiannopoulos2017-09-111-1/+1
| | | | | | algorithms Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: verify that no signature algorithms with (D)TLS 1.2 will cause an errorNikos Mavrogiannopoulos2017-09-111-0/+2
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* priorities: when no signature algorithms eliminate (D)TLS 1.2 or laterNikos Mavrogiannopoulos2017-09-111-6/+19
| | | | | | | | If an application intentionally disables all signature algorithms, ensure that we can operate by eliminating protocol options which require these signature algorithms to be set. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: safer use of gnutls_bye in _test_cli_serv()Nikos Mavrogiannopoulos2017-09-111-5/+13
| | | | | | In addition make sure we check gnutls_priority_set() for errors. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added checks for special signature algorithmsNikos Mavrogiannopoulos2017-09-112-1/+181
| | | | | | | This tests the behavior when signature algorithms only available under TLS1.3 are present in a TLS 1.2 session. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: verify that +SIGN-ECDSA-SECP256R1-SHA256 has no effect when combined ↵Nikos Mavrogiannopoulos2017-09-111-1/+21
| | | | | | with TLS1.2 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added signature tests for ECDSA-SECP256R1-SHA256Nikos Mavrogiannopoulos2017-09-117-17/+21
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* priority: do not include signature algorithms that apply to different TLS ↵Nikos Mavrogiannopoulos2017-09-111-5/+51
| | | | | | | | | | | | | version That is, when a signature algorithm that is only applicable to specific TLS protocol semantics (e.g., ECDSA-SECP256R1-SHA256) is enabled, under TLS 1.2, it will result to no code points being added. That prevents connection errors due to "wrong" code points being added that do not correspond to a usable signature algorithm under the protocol. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: updated for the new behavior of handshakeNikos Mavrogiannopoulos2017-09-111-1/+1
| | | | | | | | | | Previously at handshake we would negotiate a ciphersuite and certificate and later figure out a signature algorithm. Now we negotiate all at once, so we no longer reach situations where mid-way of handshake we figure we have no signature algorithm to use. Update the test cases relying on that behavior to account the new one. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* pubkey: enforce TLS 1.3 signature restrictions on verificationNikos Mavrogiannopoulos2017-09-111-4/+47
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* ext/signature: added TLS 1.3 signature algorithm negotiationNikos Mavrogiannopoulos2017-09-1110-54/+135
| | | | | | | | | | | | | | | That patch adds the signature algorithms: - GNUTLS_SIGN_ECDSA_SECP256R1_SHA256 - GNUTLS_SIGN_ECDSA_SECP384R1_SHA384 - GNUTLS_SIGN_ECDSA_SECP521R1_SHA512 and enables them for the default TLS priority strings. In addition it allows negotiating signature algorithms sharing the same TLS IDs, but which have different semantics between TLS versions (e.g., 6,4 maps to GNUTLS_SIGN_ECDSA_SHA512 under TLS 1.2 but to GNUTLS_SIGN_ECDSA_SECP521R1_SHA512 under TLS 1.3). Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added unit test for TLS 1.3 version negotiationNikos Mavrogiannopoulos2017-09-113-1/+643
| | | | | | | This checks whether the Client Hello and Server Hello packets contain the expected values. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* handshake: added support for negotiating version using extensionNikos Mavrogiannopoulos2017-09-117-1/+220
| | | | | | | That is, introduced the TLS 1.3 supported_versions extension. It is currently only being used if negotiating TLS 1.3 or later. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* handshake: legacy version negotiation is not used for TLS 1.3Nikos Mavrogiannopoulos2017-09-117-27/+74
| | | | | | | | That is, ensure that the functions used for TLS 1.2 and earlier negotiation cannot be used with TLS 1.3. That is because TLS 1.3 is negotiated using a TLS extension. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Added TLS 1.3 Hello message random generationNikos Mavrogiannopoulos2017-09-114-53/+54
| | | | | | | | That is, added check for TLS 1.3 random value requirements in client side, and generation according to TLS 1.3 requirements for server and client side. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: modified the MD5 signature algorithm negotiation testsNikos Mavrogiannopoulos2017-09-084-335/+721
| | | | | | | | Since GnuTLS can no longer negotiate MD5, we utilize a byte stream of a connection which advertises MD5, and we make sure we detect the right error code for the rejection of MD5 signature. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* doc updateNikos Mavrogiannopoulos2017-09-081-0/+4
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tlsfuzzer: no longer include tests involving SHA224 signaturesNikos Mavrogiannopoulos2017-09-081-1/+8
| | | | | | We no longer support them. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* algorithms/sign: removed TLS identifiers for legacy algorithmsNikos Mavrogiannopoulos2017-09-081-6/+5
| | | | | | | | | That is, for the MD5-using algorithms, as well as for the DSA2 signature algorithms that were never really used with TLS 1.2. Kept DSA-SHA1 in order to be used by TLS 1.2 and legacy applications. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* algorithms/sign: legacy signature algorithms were moved toward the end of ↵Nikos Mavrogiannopoulos2017-09-081-168/+183
| | | | | | the list Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* algorithms/sign: no longer enable SHA224 hash in signaturesNikos Mavrogiannopoulos2017-09-081-3/+4
| | | | | | | | TLS 1.3 requires that SHA224 MUST NOT be used, and given the fact that SHA224 was never widespread used in TLS 1.2, there is no reason to keep these algorithms at all. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>