Lines Matching defs:pms
1204 #define IS_BAD_PRE_MASTER_SECRET(pms, pmslen, ssl) \
1205 (pms == NULL || pmslen != SSL3_PRE_MASTER_SECRET_LEN || \
1206 pms[0] != ssl->major_version || pms[1] != ssl->minor_version)
1208 #define FAKE_PRE_MASTER_SECRET(pms, pmslen, ssl, buf) { \
1210 pms = buf; \
1212 pms[0] = ssl->major_version; \
1213 pms[1] = ssl->minor_version; \
1218 kssl_generate_tls_ms(ssl_t *ssl, uchar_t *pms, size_t pmslen)
1226 * master_secret = PRF (pms, "master secret",
1233 /* if pms is bad fake it to thwart Bleichenbacher attack */
1234 if (IS_BAD_PRE_MASTER_SECRET(pms, pmslen, ssl)) {
1236 FAKE_PRE_MASTER_SECRET(pms, pmslen, ssl, buf);
1240 pms, pmslen,
1250 kssl_generate_ssl_ms(ssl_t *ssl, uchar_t *pms, size_t pmslen)
1258 /* if pms is bad fake it to thwart Bleichenbacher attack */
1259 if (IS_BAD_PRE_MASTER_SECRET(pms, pmslen, ssl)) {
1261 FAKE_PRE_MASTER_SECRET(pms, pmslen, ssl, buf);
1264 kssl_ssl3_key_material_derive_step(ssl, pms, pmslen, 1, ms, 0);
1265 kssl_ssl3_key_material_derive_step(ssl, pms, pmslen, 2, ms + hlen, 0);
1266 kssl_ssl3_key_material_derive_step(ssl, pms, pmslen, 3, ms + 2 * hlen,
1851 uchar_t *pms;
1881 * value of the wrapped pms from the client, then room for the
1986 pms = kssl_rsa_unwrap((uchar_t *)pms_data->cd_raw.iov_base, &pmslen);
1990 err = kssl_generate_tls_ms(ssl, pms, pmslen);
1994 kssl_generate_ssl_ms(ssl, pms, pmslen);
2245 uchar_t *pms;
2270 pms = kssl_rsa_unwrap((uchar_t *)pms_data->cd_raw.iov_base, &pmslen);
2274 ret = kssl_generate_tls_ms(ssl, pms, pmslen);
2278 kssl_generate_ssl_ms(ssl, pms, pmslen);