Skip to content

Commit

Permalink
fix: better use of switch case pointed by cfc4n
Browse files Browse the repository at this point in the history
  • Loading branch information
blaisewang authored and cfc4n committed Sep 2, 2022
1 parent 4aba915 commit 5f1b2ce
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions user/module/probe_openssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,7 @@ func (this *MOpenSSLProbe) saveMasterSecret(secretEvent *event.MasterSecretEvent
var transcript hash.Hash
// check crypto type
switch uint16(secretEvent.CipherId & 0x0000FFFF) {
case hkdf.TLS_AES_128_GCM_SHA256:
case hkdf.TLS_CHACHA20_POLY1305_SHA256:
case hkdf.TLS_AES_128_GCM_SHA256, hkdf.TLS_CHACHA20_POLY1305_SHA256:
transcript = crypto.SHA256.New()
case hkdf.TLS_AES_256_GCM_SHA384:
transcript = crypto.SHA384.New()
Expand Down

0 comments on commit 5f1b2ce

Please sign in to comment.