Skip to content
DTLS 1.2 Server/Client implementation for Go
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Fuzz: initial commit May 24, 2019
e2e E2E: Fix race in test May 24, 2019
examples Mass replace pions -> pion Apr 4, 2019
fuzz/corpus Fuzz: fix more buffer indexing cases May 24, 2019
internal Mass replace pions -> pion Apr 4, 2019
.editorconfig Fuzz: initial commit May 24, 2019
.gitignore Fuzz: initial commit May 24, 2019
.golangci.yml Expose CipherSuites via Config May 19, 2019
.travis.yml Remove goveralls install May 23, 2019
LICENSE Update README to match pion-WebRTC style Dec 13, 2018
Makefile Fuzz: initial commit May 24, 2019
README.md Fuzz: initial commit May 24, 2019
alert.go Cleanup repo structure and CI Jan 23, 2019
alert_test.go Cleanup repo structure and CI Jan 23, 2019
application_data.go Cleanup repo structure and CI Jan 23, 2019
bench_test.go Bench: implement basic Read-Write benchmark Jun 1, 2019
change_cipher_spec.go Cleanup repo structure and CI Jan 23, 2019
change_cipher_spec_test.go Cleanup repo structure and CI Jan 23, 2019
cipher_suite.go
cipher_suite_test.go Cleanup repo structure and CI Jan 23, 2019
cipher_suite_tls_ecdhe_ecdsa_with_aes_128_gcm_sha256.go Allow user to specify PSK May 23, 2019
cipher_suite_tls_ecdhe_ecdsa_with_aes_256_cbc_sha.go Allow user to specify PSK May 23, 2019
cipher_suite_tls_ecdhe_rsa_with_aes_128_gcm_sha256.go Expose CipherSuites via Config May 19, 2019
cipher_suite_tls_ecdhe_rsa_with_aes_256_cbc_sha.go Expose CipherSuites via Config May 19, 2019
client_certificate_type.go Cleanup repo structure and CI Jan 23, 2019
client_handlers.go Expose CipherSuites via Config May 19, 2019
compression_method.go Fuzz: initial commit May 24, 2019
compression_method_test.go Cleanup repo structure and CI Jan 23, 2019
config.go Update PSK Config to pass PSK Identity hint May 23, 2019
conn.go Update PSK Config to pass PSK Identity hint May 23, 2019
conn_test.go Update PSK Config to pass PSK Identity hint May 23, 2019
content.go Cleanup repo structure and CI Jan 23, 2019
crypto.go Add RSA support Feb 17, 2019
crypto_cbc.go Cleanup repo structure and CI Jan 23, 2019
crypto_gcm.go Cleanup repo structure and CI Jan 23, 2019
crypto_test.go Cleanup repo structure and CI Jan 23, 2019
curve_type.go Cleanup repo structure and CI Jan 23, 2019
errors.go Update PSK Config to pass PSK Identity hint May 23, 2019
extension.go Fuzz: initial commit May 24, 2019
extension_supported_elliptic_curves.go Cleanup repo structure and CI Jan 23, 2019
extension_supported_elliptic_curves_test.go Cleanup repo structure and CI Jan 23, 2019
extension_supported_point_formats.go Cleanup repo structure and CI Jan 23, 2019
extension_supported_point_formats_test.go Cleanup repo structure and CI Jan 23, 2019
extension_supported_signature_algorithms.go Implement signature_algorithms extension Feb 13, 2019
extension_supported_signature_algorithms_test.go Implement signature_algorithms extension Feb 13, 2019
extension_use_srtp.go Don't enable use_srtp by default Feb 14, 2019
extension_use_srtp_test.go Don't enable use_srtp by default Feb 14, 2019
fingerprint.go Cleanup repo structure and CI Jan 23, 2019
flight.go Invoke flight handler earlier May 7, 2019
fragment_buffer.go Make inbound message handling stateless Mar 20, 2019
fragment_buffer_test.go Make inbound message handling stateless Mar 20, 2019
fuzz.go Fuzz: initial commit May 24, 2019
go.mod Bump pion/logging Apr 6, 2019
go.sum Bump pion/logging Apr 6, 2019
handshake.go Add the ability for logging Apr 6, 2019
handshake_cache.go Make inbound message handling stateless Mar 20, 2019
handshake_cache_test.go Make inbound message handling stateless Mar 20, 2019
handshake_header.go Cleanup repo structure and CI Jan 23, 2019
handshake_message_certificate.go Cleanup repo structure and CI Jan 23, 2019
handshake_message_certificate_request.go Fuzz: initial commit May 24, 2019
handshake_message_certificate_request_test.go Cleanup repo structure and CI Jan 23, 2019
handshake_message_certificate_test.go Cleanup repo structure and CI Jan 23, 2019
handshake_message_certificate_verify.go Cleanup repo structure and CI Jan 23, 2019
handshake_message_certificate_verify_test.go Cleanup repo structure and CI Jan 23, 2019
handshake_message_client_hello.go Fuzz: initial commit May 24, 2019
handshake_message_client_hello_test.go
handshake_message_client_key_exchange.go Fuzz: initial commit May 24, 2019
handshake_message_client_key_exchange_test.go Cleanup repo structure and CI Jan 23, 2019
handshake_message_finished.go Cleanup repo structure and CI Jan 23, 2019
handshake_message_finished_test.go Cleanup repo structure and CI Jan 23, 2019
handshake_message_hello_verify_request.go Fuzz: initial commit May 24, 2019
handshake_message_hello_verify_request_test.go Cleanup repo structure and CI Jan 23, 2019
handshake_message_server_hello.go Fuzz: initial commit May 24, 2019
handshake_message_server_hello_done.go Cleanup repo structure and CI Jan 23, 2019
handshake_message_server_hello_done_test.go Cleanup repo structure and CI Jan 23, 2019
handshake_message_server_hello_test.go Cleanup repo structure and CI Jan 23, 2019
handshake_message_server_key_exchange.go Fuzz: fix more buffer indexing cases May 24, 2019
handshake_message_server_key_exchange_test.go Cleanup repo structure and CI Jan 23, 2019
handshake_random.go Cleanup repo structure and CI Jan 23, 2019
handshake_test.go Cleanup repo structure and CI Jan 23, 2019
hash_algorithm.go Implement Client Authentication Feb 17, 2019
listener.go Mass replace pions -> pion Apr 4, 2019
named_curve.go Cleanup repo structure and CI Jan 23, 2019
prf.go Cleanup repo structure and CI Jan 23, 2019
prf_test.go Cleanup repo structure and CI Jan 23, 2019
record_layer.go Fuzz: initial commit May 24, 2019
record_layer_header.go Fuzz: add corpus May 24, 2019
record_layer_test.go Cleanup repo structure and CI Jan 23, 2019
resume.go Serialization and resumption of a connection Mar 30, 2019
resume_test.go Don't modify config.LoggerFactory Apr 6, 2019
server_handlers.go Expose CipherSuites via Config May 19, 2019
signature_algorithm.go Cleanup repo structure and CI Jan 23, 2019
signature_hash_algorithm.go Cleanup repo structure and CI Jan 23, 2019
srtp_protection_profile.go Don't enable use_srtp by default Feb 14, 2019
state.go Expose CipherSuites via Config May 19, 2019
util.go Expose CipherSuites via Config May 19, 2019

README.md


Pion DTLS

A Go implementation of DTLS

Pion DTLS Sourcegraph Widget Slack Widget
Build Status GoDoc Coverage Status Go Report Card Codacy Badge License: MIT


Go DTLS 1.2 implementation. The original user is pion-WebRTC, but we would love to see it work for everyone.

A long term goal is a professional security review, and maye inclusion in stdlib.

Goals/Progress

This will only be targeting DTLS 1.2, and the most modern/common cipher suites. We would love contributes that fall under the 'Planned Features' and fixing any bugs!

Current features

  • DTLS 1.2 Client/Server
  • Forward secrecy using ECDHE; with curve25519 and nistp256 (non-PFS will not be supported)
  • AES_128_GCM, AES_256_CBC
  • Packet loss and re-ordering is handled during handshaking
  • Key export (RFC5705)

Planned Features

  • Extended master secret support (RFC7627)
  • Chacha20Poly1305

Excluded Features

  • DTLS 1.0
  • Renegotiation
  • Compression

Pion DTLS

For a DTLS 1.2 Server that listens on 127.0.0.1:4444

go run examples/listen/main.go

For a DTLS 1.2 Client that connects to 127.0.0.1:4444

go run examples/dial/main.go

OpenSSL

Pion DTLS can connect to itself and OpenSSL.

  // Generate a certificate
  openssl ecparam -out key.pem -name prime256v1 -genkey
  openssl req -new -sha256 -key key.pem -out server.csr
  openssl x509 -req -sha256 -days 365 -in server.csr -signkey key.pem -out cert.pem

  // Use with examples/dial/main.go
  openssl s_server -dtls1_2 -cert cert.pem -key key.pem -accept 4444

  // Use with examples/listen/main.go
  openssl s_client -dtls1_2 -connect 127.0.0.1:4444 -debug -cert cert.pem -key key.pem

Contributing

Check out the contributing wiki to join the group of amazing people making this project possible:

License

MIT License - see LICENSE for full text

You can’t perform that action at this time.