extMasterFromPreMasterSecret generates the extended master secret from the pre-master secret. See RFC 7627.
(version uint16, suite *cipherSuite, preMasterSecret, transcript []byte)
| 120 | // extMasterFromPreMasterSecret generates the extended master secret from the |
| 121 | // pre-master secret. See RFC 7627. |
| 122 | func extMasterFromPreMasterSecret(version uint16, suite *cipherSuite, preMasterSecret, transcript []byte) []byte { |
| 123 | prf, hash := prfAndHashForVersion(version, suite) |
| 124 | if version == VersionTLS12 { |
| 125 | // Use the FIPS 140-3 module only for TLS 1.2 with EMS, which is the |
| 126 | // only TLS 1.0-1.2 approved mode per IG D.Q. |
| 127 | return tls12.MasterSecret(hash.New, preMasterSecret, transcript) |
| 128 | } |
| 129 | return prf(preMasterSecret, extendedMasterSecretLabel, transcript, masterSecretLength) |
| 130 | } |
| 131 | |
| 132 | // keysFromMasterSecret generates the connection keys from the master |
| 133 | // secret, given the lengths of the MAC key, cipher key and IV, as defined in |
no test coverage detected
searching dependent graphs…