Skip to content

Commit

Permalink
Accept secret as raw string as well
Browse files Browse the repository at this point in the history
  • Loading branch information
muzzammilshahid committed Jun 29, 2024
1 parent 471c724 commit bb60a58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/wampproto/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ func Run(args []string) (string, error) {
case c.signCRAChallenge.FullCommand():
craKey, err := wampprotocli.DecodeHexOrBase64(*c.craKey)
if err != nil {
return "", fmt.Errorf("invalid cra-key: %s", err.Error())
craKey = []byte(*c.craKey)
}

var craChallenge = *c.craChallenge
Expand All @@ -463,7 +463,7 @@ func Run(args []string) (string, error) {
case c.verifyCRASignature.FullCommand():
craKey, err := wampprotocli.DecodeHexOrBase64(*c.verifyCRAKey)
if err != nil {
return "", fmt.Errorf("invalid cra-key: %s", err.Error())
craKey = []byte(*c.verifyCRAKey)
}

var craChallenge = *c.verifyCRAChallenge
Expand Down

0 comments on commit bb60a58

Please sign in to comment.