(version uint16, suite *cipherSuite)
| 89 | const serverFinishedLabel = "server finished" |
| 90 | |
| 91 | func prfAndHashForVersion(version uint16, suite *cipherSuite) (prfFunc, crypto.Hash) { |
| 92 | switch version { |
| 93 | case VersionTLS10, VersionTLS11: |
| 94 | return prf10, crypto.Hash(0) |
| 95 | case VersionTLS12: |
| 96 | if suite.flags&suiteSHA384 != 0 { |
| 97 | return prf12(sha512.New384), crypto.SHA384 |
| 98 | } |
| 99 | return prf12(sha256.New), crypto.SHA256 |
| 100 | default: |
| 101 | panic("unknown version") |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | func prfForVersion(version uint16, suite *cipherSuite) prfFunc { |
| 106 | prf, _ := prfAndHashForVersion(version, suite) |
no test coverage detected
searching dependent graphs…