Lines Matching refs:pms
3361 OPENSSL_clear_free(s->s3.tmp.pms, s->s3.tmp.pmslen); in ssl3_free()
3380 OPENSSL_clear_free(s->s3.tmp.pms, s->s3.tmp.pmslen); in ssl3_clear()
4596 int ssl_generate_master_secret(SSL *s, unsigned char *pms, size_t pmslen, in ssl_generate_master_secret() argument
4623 memcpy(t, pms, pmslen); in ssl_generate_master_secret()
4645 s->session->master_key, pms, pmslen, in ssl_generate_master_secret()
4654 if (pms) { in ssl_generate_master_secret()
4656 OPENSSL_clear_free(pms, pmslen); in ssl_generate_master_secret()
4658 OPENSSL_cleanse(pms, pmslen); in ssl_generate_master_secret()
4661 s->s3.tmp.pms = NULL; in ssl_generate_master_secret()
4762 int ssl_gensecret(SSL *s, unsigned char *pms, size_t pmslen) in ssl_gensecret() argument
4779 rv = rv && tls13_generate_handshake_secret(s, pms, pmslen); in ssl_gensecret()
4781 rv = ssl_generate_master_secret(s, pms, pmslen, 0); in ssl_gensecret()
4791 unsigned char *pms = NULL; in ssl_derive() local
4812 pms = OPENSSL_malloc(pmslen); in ssl_derive()
4813 if (pms == NULL) { in ssl_derive()
4818 if (EVP_PKEY_derive(pctx, pms, &pmslen) <= 0) { in ssl_derive()
4825 rv = ssl_gensecret(s, pms, pmslen); in ssl_derive()
4828 s->s3.tmp.pms = pms; in ssl_derive()
4830 pms = NULL; in ssl_derive()
4835 OPENSSL_clear_free(pms, pmslen); in ssl_derive()
4846 unsigned char *pms = NULL; in ssl_decapsulate() local
4863 pms = OPENSSL_malloc(pmslen); in ssl_decapsulate()
4864 if (pms == NULL) { in ssl_decapsulate()
4869 if (EVP_PKEY_decapsulate(pctx, pms, &pmslen, ct, ctlen) <= 0) { in ssl_decapsulate()
4876 rv = ssl_gensecret(s, pms, pmslen); in ssl_decapsulate()
4879 s->s3.tmp.pms = pms; in ssl_decapsulate()
4881 pms = NULL; in ssl_decapsulate()
4886 OPENSSL_clear_free(pms, pmslen); in ssl_decapsulate()
4896 unsigned char *pms = NULL, *ct = NULL; in ssl_encapsulate() local
4914 pms = OPENSSL_malloc(pmslen); in ssl_encapsulate()
4916 if (pms == NULL || ct == NULL) { in ssl_encapsulate()
4921 if (EVP_PKEY_encapsulate(pctx, ct, &ctlen, pms, &pmslen) <= 0) { in ssl_encapsulate()
4928 rv = ssl_gensecret(s, pms, pmslen); in ssl_encapsulate()
4931 s->s3.tmp.pms = pms; in ssl_encapsulate()
4933 pms = NULL; in ssl_encapsulate()
4945 OPENSSL_clear_free(pms, pmslen); in ssl_encapsulate()