Skip to content

Commit a681f67

Browse files
committed
Correctly identify client and server with PSK ID
Updates the PSK ID hints on the client and server examples to match the type of endpoint they represent. Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
1 parent e85f106 commit a681f67

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

examples/dial/cid/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func main() {
2828
fmt.Printf("Server's hint: %s \n", hint)
2929
return []byte{0xAB, 0xC1, 0x23}, nil
3030
},
31-
PSKIdentityHint: []byte("Pion DTLS Server"),
31+
PSKIdentityHint: []byte("Pion DTLS Client"),
3232
CipherSuites: []dtls.CipherSuiteID{dtls.TLS_PSK_WITH_AES_128_CCM_8},
3333
ExtendedMasterSecret: dtls.RequireExtendedMasterSecret,
3434
ConnectionIDGenerator: dtls.OnlySendCIDGenerator(),

examples/dial/psk/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func main() {
2828
fmt.Printf("Server's hint: %s \n", hint)
2929
return []byte{0xAB, 0xC1, 0x23}, nil
3030
},
31-
PSKIdentityHint: []byte("Pion DTLS Server"),
31+
PSKIdentityHint: []byte("Pion DTLS Client"),
3232
CipherSuites: []dtls.CipherSuiteID{dtls.TLS_PSK_WITH_AES_128_CCM_8},
3333
ExtendedMasterSecret: dtls.RequireExtendedMasterSecret,
3434
}

examples/listen/cid/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func main() {
3232
fmt.Printf("Client's hint: %s \n", hint)
3333
return []byte{0xAB, 0xC1, 0x23}, nil
3434
},
35-
PSKIdentityHint: []byte("Pion DTLS Client"),
35+
PSKIdentityHint: []byte("Pion DTLS Server"),
3636
CipherSuites: []dtls.CipherSuiteID{dtls.TLS_PSK_WITH_AES_128_CCM_8},
3737
ExtendedMasterSecret: dtls.RequireExtendedMasterSecret,
3838
// Create timeout context for accepted connection.

examples/listen/psk/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func main() {
3232
fmt.Printf("Client's hint: %s \n", hint)
3333
return []byte{0xAB, 0xC1, 0x23}, nil
3434
},
35-
PSKIdentityHint: []byte("Pion DTLS Client"),
35+
PSKIdentityHint: []byte("Pion DTLS Server"),
3636
CipherSuites: []dtls.CipherSuiteID{dtls.TLS_PSK_WITH_AES_128_CCM_8},
3737
ExtendedMasterSecret: dtls.RequireExtendedMasterSecret,
3838
// Create timeout context for accepted connection.

0 commit comments

Comments
 (0)