Skip to content

Commit

Permalink
Support TLSv1.3 and ShangMi Ciphersuites.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZBCccc committed Oct 10, 2024
1 parent ec3a2b0 commit e3f0762
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/tlcp_client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func main() {
panic(err)
}

if cipherSuites == "TLS_SM4_GCM_SM3" || cipherSuites == "TLS_SM4_CCM_SM3" {
if version == ts.TLSv1_3 {
if err := ctx.SetCipherSuites(cipherSuites); err != nil {
panic(err)
}
Expand Down
2 changes: 1 addition & 1 deletion examples/tlcp_server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func newTLSServer(acceptAddr string, certKeyPairs map[string]crypto.GMDoubleCert
return nil, err
}

if cipherSuites == "TLS_SM4_GCM_SM3" || cipherSuites == "TLS_SM4_CCM_SM3" {
if version == ts.TLSv1_3 {
if err := ctx.SetCipherSuites(cipherSuites); err != nil {
return nil, err
}
Expand Down

0 comments on commit e3f0762

Please sign in to comment.