build: Bump dependencies
This commit is contained in:
1 parent
ef01992613
commit
f4091d0aa9
8 files changed
+178
-126
No files matched your search
+8
-10
@@ -2,7 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
@@ -53,16 +52,15 @@ func main() {
|
||||
// Everything below is the pion-DTLS API! Thanks for using it ❤️.
|
||||
//
|
||||
|
||||
// Prepare the configuration of the DTLS connection
|
||||
config := &dtls.Config{
|
||||
Certificates: []tls.Certificate{certificate},
|
||||
ExtendedMasterSecret: dtls.RequireExtendedMasterSecret,
|
||||
CipherSuites: []dtls.CipherSuiteID{dtls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256},
|
||||
ConnectionIDGenerator: dtls.RandomCIDGenerator(8),
|
||||
}
|
||||
|
||||
// Connect to a DTLS server
|
||||
listener, err := dtls.Listen("udp", addr, config)
|
||||
listener, err := dtls.ListenWithOptions(
|
||||
"udp",
|
||||
addr,
|
||||
dtls.WithCertificates(certificate),
|
||||
dtls.WithExtendedMasterSecret(dtls.RequireExtendedMasterSecret),
|
||||
dtls.WithCipherSuites(dtls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256),
|
||||
dtls.WithConnectionIDGenerator(dtls.RandomCIDGenerator(8)),
|
||||
)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user