Lines Matching refs:pms
2830 unsigned char *pms = NULL; in tls_construct_cke_rsa() local
2848 pms = OPENSSL_malloc(pmslen); in tls_construct_cke_rsa()
2849 if (pms == NULL) { in tls_construct_cke_rsa()
2854 pms[0] = s->client_version >> 8; in tls_construct_cke_rsa()
2855 pms[1] = s->client_version & 0xff; in tls_construct_cke_rsa()
2856 if (RAND_bytes_ex(s->ctx->libctx, pms + 2, pmslen - 2, 0) <= 0) { in tls_construct_cke_rsa()
2869 || EVP_PKEY_encrypt(pctx, NULL, &enclen, pms, pmslen) <= 0) { in tls_construct_cke_rsa()
2874 || EVP_PKEY_encrypt(pctx, encdata, &enclen, pms, pmslen) <= 0) { in tls_construct_cke_rsa()
2888 if (!ssl_log_rsa_client_key_exchange(s, encdata, enclen, pms, pmslen)) { in tls_construct_cke_rsa()
2893 s->s3.tmp.pms = pms; in tls_construct_cke_rsa()
2898 OPENSSL_clear_free(pms, pmslen); in tls_construct_cke_rsa()
3022 unsigned char *pms = NULL; in tls_construct_cke_gost() local
3053 pms = OPENSSL_malloc(pmslen); in tls_construct_cke_gost()
3054 if (pms == NULL) { in tls_construct_cke_gost()
3062 || RAND_bytes_ex(s->ctx->libctx, pms, pmslen, 0) <= 0) { in tls_construct_cke_gost()
3093 if (EVP_PKEY_encrypt(pkey_ctx, tmp, &msglen, pms, pmslen) <= 0) { in tls_construct_cke_gost()
3106 s->s3.tmp.pms = pms; in tls_construct_cke_gost()
3112 OPENSSL_clear_free(pms, pmslen); in tls_construct_cke_gost()
3165 unsigned char *pms = NULL; in tls_construct_cke_gost18() local
3182 pms = OPENSSL_malloc(pmslen); in tls_construct_cke_gost18()
3183 if (pms == NULL) { in tls_construct_cke_gost18()
3188 if (RAND_bytes_ex(s->ctx->libctx, pms, pmslen, 0) <= 0) { in tls_construct_cke_gost18()
3227 if (EVP_PKEY_encrypt(pkey_ctx, NULL, &msglen, pms, pmslen) <= 0) { in tls_construct_cke_gost18()
3233 || EVP_PKEY_encrypt(pkey_ctx, encdata, &msglen, pms, pmslen) <= 0) { in tls_construct_cke_gost18()
3240 s->s3.tmp.pms = pms; in tls_construct_cke_gost18()
3246 OPENSSL_clear_free(pms, pmslen); in tls_construct_cke_gost18()
3320 OPENSSL_clear_free(s->s3.tmp.pms, s->s3.tmp.pmslen); in tls_construct_client_key_exchange()
3321 s->s3.tmp.pms = NULL; in tls_construct_client_key_exchange()
3333 unsigned char *pms = NULL; in tls_client_key_exchange_post_work() local
3336 pms = s->s3.tmp.pms; in tls_client_key_exchange_post_work()
3350 if (pms == NULL && !(s->s3.tmp.new_cipher->algorithm_mkey & SSL_kPSK)) { in tls_client_key_exchange_post_work()
3354 if (!ssl_generate_master_secret(s, pms, pmslen, 1)) { in tls_client_key_exchange_post_work()
3357 pms = NULL; in tls_client_key_exchange_post_work()
3361 pms = NULL; in tls_client_key_exchange_post_work()
3396 OPENSSL_clear_free(pms, pmslen); in tls_client_key_exchange_post_work()
3397 s->s3.tmp.pms = NULL; in tls_client_key_exchange_post_work()