Lines Matching refs:pms

3069     unsigned char *pms = NULL;  in tls_construct_cke_rsa()  local
3092 pms = OPENSSL_malloc(pmslen); in tls_construct_cke_rsa()
3093 if (pms == NULL) { in tls_construct_cke_rsa()
3098 pms[0] = s->client_version >> 8; in tls_construct_cke_rsa()
3099 pms[1] = s->client_version & 0xff; in tls_construct_cke_rsa()
3100 if (RAND_bytes_ex(sctx->libctx, pms + 2, pmslen - 2, 0) <= 0) { in tls_construct_cke_rsa()
3113 || EVP_PKEY_encrypt(pctx, NULL, &enclen, pms, pmslen) <= 0) { in tls_construct_cke_rsa()
3118 || EVP_PKEY_encrypt(pctx, encdata, &enclen, pms, pmslen) <= 0) { in tls_construct_cke_rsa()
3132 if (!ssl_log_rsa_client_key_exchange(s, encdata, enclen, pms, pmslen)) { in tls_construct_cke_rsa()
3137 s->s3.tmp.pms = pms; in tls_construct_cke_rsa()
3142 OPENSSL_clear_free(pms, pmslen); in tls_construct_cke_rsa()
3266 unsigned char *pms = NULL; in tls_construct_cke_gost() local
3297 pms = OPENSSL_malloc(pmslen); in tls_construct_cke_gost()
3298 if (pms == NULL) { in tls_construct_cke_gost()
3306 || RAND_bytes_ex(sctx->libctx, pms, pmslen, 0) <= 0) { in tls_construct_cke_gost()
3337 if (EVP_PKEY_encrypt(pkey_ctx, tmp, &msglen, pms, pmslen) <= 0) { in tls_construct_cke_gost()
3350 s->s3.tmp.pms = pms; in tls_construct_cke_gost()
3356 OPENSSL_clear_free(pms, pmslen); in tls_construct_cke_gost()
3411 unsigned char *pms = NULL; in tls_construct_cke_gost18() local
3429 pms = OPENSSL_malloc(pmslen); in tls_construct_cke_gost18()
3430 if (pms == NULL) { in tls_construct_cke_gost18()
3435 if (RAND_bytes_ex(sctx->libctx, pms, pmslen, 0) <= 0) { in tls_construct_cke_gost18()
3473 if (EVP_PKEY_encrypt(pkey_ctx, NULL, &msglen, pms, pmslen) <= 0) { in tls_construct_cke_gost18()
3479 || EVP_PKEY_encrypt(pkey_ctx, encdata, &msglen, pms, pmslen) <= 0) { in tls_construct_cke_gost18()
3486 s->s3.tmp.pms = pms; in tls_construct_cke_gost18()
3492 OPENSSL_clear_free(pms, pmslen); in tls_construct_cke_gost18()
3567 OPENSSL_clear_free(s->s3.tmp.pms, s->s3.tmp.pmslen); in tls_construct_client_key_exchange()
3568 s->s3.tmp.pms = NULL; in tls_construct_client_key_exchange()
3580 unsigned char *pms = NULL; in tls_client_key_exchange_post_work() local
3583 pms = s->s3.tmp.pms; in tls_client_key_exchange_post_work()
3597 if (pms == NULL && !(s->s3.tmp.new_cipher->algorithm_mkey & SSL_kPSK)) { in tls_client_key_exchange_post_work()
3601 if (!ssl_generate_master_secret(s, pms, pmslen, 1)) { in tls_client_key_exchange_post_work()
3604 pms = NULL; in tls_client_key_exchange_post_work()
3608 pms = NULL; in tls_client_key_exchange_post_work()
3644 OPENSSL_clear_free(pms, pmslen); in tls_client_key_exchange_post_work()
3645 s->s3.tmp.pms = NULL; in tls_client_key_exchange_post_work()