Skip to content

Commit

Permalink
Merge branch 'master' into removed-soft-delete-support
Browse files Browse the repository at this point in the history
  • Loading branch information
azdagron authored Aug 20, 2018
2 parents 5a924f5 + 5795105 commit 3bbfce3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/common/plugin/x509pop/x509pop.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"crypto/rand"
"crypto/rsa"
"crypto/sha1"
"crypto/sha256"
"crypto/x509"
"encoding/hex"
"errors"
Expand Down Expand Up @@ -272,9 +273,8 @@ func combineNonces(challenge, response []byte) ([]byte, error) {
if len(response) != nonceLen {
return nil, errors.New("invalid response nonce")
}
combined := make([]byte, nonceLen)
for i := range combined {
combined[i] = challenge[i] ^ response[i]
}
return combined, nil
h := sha256.New()
h.Write(challenge)
h.Write(response)
return h.Sum(nil), nil
}

0 comments on commit 3bbfce3

Please sign in to comment.