mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
Add a []byte argument to hash.Hash to allow an allocation to be saved.
This is the result of running `gofix -r hashsum` over the tree, changing the hash function implementations by hand and then fixing a couple of instances where gofix didn't catch something. The changed implementations are as simple as possible while still working: I'm not trying to optimise in this CL. R=rsc, cw, rogpeppe CC=golang-dev https://golang.org/cl/5448065
This commit is contained in:
parent
2308aefc84
commit
bac7bc55a6
49 changed files with 202 additions and 200 deletions
|
|
@ -235,8 +235,8 @@ FindCipherSuite:
|
|||
}
|
||||
|
||||
digest := make([]byte, 36)
|
||||
copy(digest[0:16], finishedHash.serverMD5.Sum())
|
||||
copy(digest[16:36], finishedHash.serverSHA1.Sum())
|
||||
copy(digest[0:16], finishedHash.serverMD5.Sum(nil))
|
||||
copy(digest[16:36], finishedHash.serverSHA1.Sum(nil))
|
||||
err = rsa.VerifyPKCS1v15(pub, crypto.MD5SHA1, digest, certVerify.signature)
|
||||
if err != nil {
|
||||
c.sendAlert(alertBadCertificate)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue