Commit Graph

564 Commits

Author SHA1 Message Date
ad86d61c42 Let's use constant instead of hardcoding values (same is done in bssl) 2018-08-10 18:45:48 +01:00
91a6fcebab Cleanup 2018-08-10 09:08:43 +01:00
Christopher Patton
a2fe2d9a71 DC draft-02, last minute change (#121)
* Drop DC test data for draft23

* DC: Change public key type

There was a last minute change to spec that changes the public key type
from a byte string of length at most 2^16 to a byte string of length at
most 2^24.
2018-08-10 08:34:10 +01:00
e77e39e7aa
server must NOT send version prior to TLS1.3 in supported_versions (#119)
As per 4.2.1, client must abort with illegal_parameter in case it
gets version 0x0303 or older in supported_versions extensions
2018-08-09 22:16:01 +01:00
d3e18f99e2
Minimal number of changes needed to udpate to draft-28 (#115)
* includes AD in authentication check of TLS records

As per 5.2 of TLS 1.3 draft-28, the additional data is record header.

* tests: Update tests in order to support draft-28

* Interoperability: Updates NSS and BoringSSL versions to the
  one supporting draft-28
* Bogo: Updates revision number to use tests for draft-28
* FIX: makefile was using test-compat target instead of
  test-interop

* DC test: constify

* Use binary interface to encode in big-endian
2018-08-09 20:47:50 +01:00
Christopher Patton
0d6e4561a6 Add DC test data for tls13draft28 and tls13rfc (#117)
The test in subcerts_test.go only passes if maxVersion ==
VersionTLS13Draft23. This is because DCs are cryptographically bound to
the protocol version on the wire. To work around this as we move towards
the RFC, this PR adds test data for VersionTLS13Draft28 and VersionTLS13
and uses maxVersion to pick which data to load.  # Please enter the
commit message for your changes. Lines starting
2018-08-09 19:47:38 +01:00
Christopher Patton
174a68a0fb Update implementation of draft-ietf-tls-subcerts to draft 02 (#108)
Drops support for delegated credentials with TLS 1.2 and adds the
protocol version and signature algorithm to the credential structure.
2018-08-09 19:24:40 +01:00
77d1fbf262 Don't use VersionTLS13DraftXX anywhere 2018-08-07 19:22:54 +01:00
Christopher Patton
c5280001a4 Remove delegated credential minting from the API
What's left are the minimal API changes required to use the delegated
credential extension in the TLS handshake.
2018-07-27 19:12:28 +01:00
Christopher Patton
1ea9624098 Use static test data for testing delegated credentials
This removes dependency on NewDelegatedCredential from tris.
2018-07-27 19:12:28 +01:00
Brendan Mc
22d6deb0e7
Merge pull request #95 from cjpatton/subcerts
Delegated credentials for TLS
2018-07-03 10:09:26 -07:00
Christopher Patton
84fe9084cd Implement the delegated_credential extension for TLS
This complies with the standard, currently an Internet draft:
https://tlswg.github.io/tls-subcerts/draft-ietf-tls-subcerts.html

It also adds a minimal interface for generating new delegated
credentials.
2018-07-03 09:57:54 -07:00
Christopher Patton
963d5877be Refactor the keyAgreement interface
It's sufficient to pass in the *tls.Certificate (resp.
*x509.Certificate) to the server functions (resp. client funcctions),
but not necessary; the existing keyAgreement implementations only makes
use of the private key (resp. public key). Moreover, this change is
necessary for implementing the delegated credentials extension, which
replaces the private key (resp. public key) used in the handshake.
2018-06-29 08:57:57 -07:00
3ff71dcdc5 tests: enable client authentication in bogo 2018-06-29 08:12:15 +01:00
6e4abe2d07 TLSv1.3 draft-23: align tests
* Changes tests so that they pass with draft-23
* BoringSSL interoperability: uses code at most recent commit. It uses
  "-tls13-variant draft23" flag to indicate compatibility with draft23
* NSS interoperability: Uses release 3.35
* PicoTLS interoperability: blocked. Doesn't seem to implement draft23
* Uses updated bogo from
  https://github.com/henrydcase/crypto-tls-bogo-shim
2018-06-29 07:47:50 +01:00
03138ec18e TLSv1.3 -draft23: Implementation of signature_algorithms_cert
Tris uses signature_algorithms_cert in order to advertise that it
doesn't support RSA-PSS. See GH#86 for more detailed discussion.
2018-06-29 07:47:50 +01:00
5bdf1af124 TLS1.3 -draft23: Renumber key_share 2018-06-29 07:47:50 +01:00
Evan Klitzke
67bc308e04 Update client SCT list during TLS 1.3 handshake, fixes #76 2018-06-28 23:24:26 +01:00
b1d6c0aeaa Change function name verifyPeerCertificate->verifyPeerHandshakeSignature 2018-06-27 19:41:50 +01:00
91d6db578b CI: Fail build if code is wrongly formatted 2018-06-26 09:56:45 +01:00
b6af4dd343 Code formatting for handshake_server_test.go 2018-06-26 09:56:45 +01:00
3f720fc50c Code formatting for TRIS test client and server 2018-06-26 09:56:45 +01:00
Brendan Mc
9557e92e52
Merge pull request #97 from henrydcase/fix_name
Fixes function name
2018-06-19 09:23:58 -07:00
Brendan Mc
b9d61edfd5
Merge pull request #96 from henrydcase/fmt2
Applies go fmt to all the code
2018-06-19 09:23:46 -07:00
51a4ff64d8 Fixes function name 2018-06-19 11:24:08 +01:00
4b1b463735 Applies go fmt to all the code 2018-06-19 11:17:19 +01:00
Christopher Patton
81ee64180a Lint 13.go 2018-06-05 13:46:43 +01:00
c20de2f694 DOC: Update for building
* Makes building instructions for Ubuntu copy-paste'able
* Updates dependency list
2018-05-24 10:29:21 +01:00
Christopher Patton
160c4f5eab Add additional instructions for building on Ubuntu 2018-05-24 10:06:54 +01:00
Christopher Patton
d485f39ca9 Update _dev/Makefile so that the code builds on Ubuntu 2018-05-24 10:06:54 +01:00
b7765d14c4 (test) Interoperability tris with tris 2018-03-29 13:15:52 +01:00
e5c37bded5 Testing rework
Goal of this PR is to rework testing script so that actual testing is
easy to extend and perform during development cycle.

* For interoperability testing I use python script and test framework,
  instead of complicated bsah scripts. Script itself is not yet perfect
  but it makes it much easier to extend tests and work with them during
  development time

* Makefile has been extended and now includes all steps needed to build
  the library and run tests. It's now possible to run any kind of tests
  without exporting environment variables.  Thanks to this change it is
  stupid-easy to run any kind of tests.

* There are 3 kinds of tests implemented in the library - unittests,
  interoperability tests and bogo. Travis has been changed and now
  dashbord will show only results for those 3 targets.
2018-03-29 13:15:52 +01:00
42d5f61fd6 Set default MinVersion of protocol to TLSv12 2018-03-27 16:03:31 +01:00
c1206cd452 Enable TLS 1.3 (draft-22) as default
* Also alignes some tests which were broken because of this
  change
2018-03-27 16:03:31 +01:00
7b3759576a Cleanup
* Implements verifyPeerCertificate common for client and server
* Removes processCertsFromServer13 and processCertsFromClient13
  and implements getCertsFromEntries common to server and client
  which is used instead.
2018-03-27 08:52:44 +01:00
01c3b768fe (fix) Client MUST send certificate msg if requested by server 2018-03-27 08:52:44 +01:00
0d06e5c19c Server side of client authentication 2018-03-27 08:52:44 +01:00
68c9776eb9 (tests) Expose 6443 in docker for client auth 2018-03-27 08:52:44 +01:00
c4dfbb897c (tests) Removes 'set -u' from bash as some variables may be unset in the script 2018-03-27 08:52:44 +01:00
1f3a180f14 (tests) Test for client authentication on server side 2018-03-27 08:52:44 +01:00
cd14ae86b4 (tests) Refactor tris test server 2018-03-27 08:52:44 +01:00
58e1a66838 (tests) Makes tstclnt tests passing again 2018-03-27 08:52:44 +01:00
adeb1a5868 (tests) Fixes error: standard_init_linux.go:195: exec user process caused no such file or directory 2018-03-27 08:52:44 +01:00
80fe037aa8 (tests) Client Authentication: Tests against boringssl 2018-03-27 08:52:44 +01:00
6acee69d6b Use certificate_request specific to TLS 1.3 2018-03-27 08:52:44 +01:00
c6745f1879 Client authentication 2018-03-27 08:52:44 +01:00
e62ddc004c Adds structure for certificate_request in TLS 1.3
* TLS 1.3 requries specific marshalling/unmarshalling of data
* This code should probably be rewritten in order ot use
  a bit cleaner approach for dealing with bytes
2018-03-27 08:52:44 +01:00
054f9b8f24 Adds 'certificate required' alert 2018-03-27 08:52:44 +01:00
b05f4a6a51 Adds ID for CA's extension 2018-03-27 08:52:44 +01:00
ddfc58e5be Changes dependency from go v1.9 to go v1.10 2018-03-21 17:44:28 +00:00