Lines Matching refs:pmslen

3423     OPENSSL_clear_free(sc->s3.tmp.pms, sc->s3.tmp.pmslen);  in ssl3_free()
3453 OPENSSL_clear_free(sc->s3.tmp.pms, sc->s3.tmp.pmslen); in ssl3_clear()
4731 size_t pmslen, int free_pms) in ssl_generate_master_secret() argument
4747 pmslen = psklen; in ssl_generate_master_secret()
4749 pskpmslen = 4 + pmslen + psklen; in ssl_generate_master_secret()
4754 s2n(pmslen, t); in ssl_generate_master_secret()
4756 memset(t, 0, pmslen); in ssl_generate_master_secret()
4758 memcpy(t, pms, pmslen); in ssl_generate_master_secret()
4759 t += pmslen; in ssl_generate_master_secret()
4780 s->session->master_key, pms, pmslen, in ssl_generate_master_secret()
4791 OPENSSL_clear_free(pms, pmslen); in ssl_generate_master_secret()
4793 OPENSSL_cleanse(pms, pmslen); in ssl_generate_master_secret()
4797 s->s3.tmp.pmslen = 0; in ssl_generate_master_secret()
4900 int ssl_gensecret(SSL_CONNECTION *s, unsigned char *pms, size_t pmslen) in ssl_gensecret() argument
4917 rv = rv && tls13_generate_handshake_secret(s, pms, pmslen); in ssl_gensecret()
4919 rv = ssl_generate_master_secret(s, pms, pmslen, 0); in ssl_gensecret()
4930 size_t pmslen = 0; in ssl_derive() local
4943 || EVP_PKEY_derive(pctx, NULL, &pmslen) <= 0) { in ssl_derive()
4951 pms = OPENSSL_malloc(pmslen); in ssl_derive()
4957 if (EVP_PKEY_derive(pctx, pms, &pmslen) <= 0) { in ssl_derive()
4964 rv = ssl_gensecret(s, pms, pmslen); in ssl_derive()
4968 s->s3.tmp.pmslen = pmslen; in ssl_derive()
4974 OPENSSL_clear_free(pms, pmslen); in ssl_derive()
4986 size_t pmslen = 0; in ssl_decapsulate() local
4998 || EVP_PKEY_decapsulate(pctx, NULL, &pmslen, ct, ctlen) <= 0) { in ssl_decapsulate()
5003 pms = OPENSSL_malloc(pmslen); in ssl_decapsulate()
5009 if (EVP_PKEY_decapsulate(pctx, pms, &pmslen, ct, ctlen) <= 0) { in ssl_decapsulate()
5016 rv = ssl_gensecret(s, pms, pmslen); in ssl_decapsulate()
5020 s->s3.tmp.pmslen = pmslen; in ssl_decapsulate()
5026 OPENSSL_clear_free(pms, pmslen); in ssl_decapsulate()
5037 size_t pmslen = 0, ctlen = 0; in ssl_encapsulate() local
5049 || EVP_PKEY_encapsulate(pctx, NULL, &ctlen, NULL, &pmslen) <= 0 in ssl_encapsulate()
5050 || pmslen == 0 || ctlen == 0) { in ssl_encapsulate()
5055 pms = OPENSSL_malloc(pmslen); in ssl_encapsulate()
5062 if (EVP_PKEY_encapsulate(pctx, ct, &ctlen, pms, &pmslen) <= 0) { in ssl_encapsulate()
5069 rv = ssl_gensecret(s, pms, pmslen); in ssl_encapsulate()
5073 s->s3.tmp.pmslen = pmslen; in ssl_encapsulate()
5086 OPENSSL_clear_free(pms, pmslen); in ssl_encapsulate()