Merge pull request #363 from sleepybishop/add_access_denied

add access denied alert code
tree: 4963b811c401b4ea6a844f1ad6b080e2fc49e7e7
  1. .clang-format
  2. .gitignore
  3. .gitmodules
  4. .travis.yml
  5. CMakeLists.txt
  8. appveyor.yml
  9. cmake/
  10. deps/
  11. fuzz/
  12. include/
  13. lib/
  14. misc/
  15. picotls-probes.d
  16. picotls.xcodeproj/
  17. picotlsvs/
  18. src/
  19. t/


Build Status

Picotls is a TLS 1.3 (RFC 8446) protocol stack written in C, with the following features:

Primary goal of the project is to create a fast, tiny, low-latency TLS 1.3 implementation that can be used with the HTTP/2 protocol stack and the upcoming QUIC stack of the H2O HTTP/2 server.

The TLS protocol implementation of picotls is licensed under the MIT license.

License and the cryptographic algorithms supported by the crypto bindings are as follows:

BindingLicenseKey ExchangeCertificateAEAD cipher
minicryptoCC0 / 2-clause BSDsecp256r1, x25519ECDSA (secp256r1)1AES-128-GCM, chacha20-poly1305
OpenSSLOpenSSLsecp256r1, secp384r1, secp521r1, x25519RSA, ECDSA (secp256r1, secp384r1, secp521r1), ed25519AES-128-GCM, AES-256-GCM, chacha20-poly1305

Note 1: Minicrypto binding is capable of signing a handshake using the certificate's key, but cannot verify a signature sent by the peer.

Building picotls

If you have cloned picotls from git then ensure that you have initialised the submodules:

% git submodule init
% git submodule update

Build using cmake:

% cmake .
% make
% make check

A dedicated documentation for using picotls with Visual Studio can be found in

Developer documentation

Developer documentation should be available on the wiki.

Using the cli command

Run the test server (at

% ./cli -c /path/to/certificate.pem -k /path/to/private-key.pem 8443

Connect to the test server:

% ./cli 8443

Using resumption:

% ./cli -s session-file 8443

The session-file is read-write. The cli server implements a single-entry session cache. The cli server sends NewSessionTicket when it first sends application data after receiving ClientFinished.

Using early-data:

% ./cli -s session-file -e 8443

When -e option is used, client first waits for user input, and then sends CLIENT_HELLO along with the early-data.


The software is provided under the MIT license. Note that additional licences apply if you use the minicrypto binding (see above).