Lines Matching refs:kctx
38 TLS1_PRF_PKEY_CTX *kctx; in pkey_tls1_prf_init() local
40 if ((kctx = OPENSSL_zalloc(sizeof(*kctx))) == NULL) { in pkey_tls1_prf_init()
44 ctx->data = kctx; in pkey_tls1_prf_init()
51 TLS1_PRF_PKEY_CTX *kctx = ctx->data; in pkey_tls1_prf_cleanup() local
52 OPENSSL_clear_free(kctx->sec, kctx->seclen); in pkey_tls1_prf_cleanup()
53 OPENSSL_cleanse(kctx->seed, kctx->seedlen); in pkey_tls1_prf_cleanup()
54 OPENSSL_free(kctx); in pkey_tls1_prf_cleanup()
59 TLS1_PRF_PKEY_CTX *kctx = ctx->data; in pkey_tls1_prf_ctrl() local
62 kctx->md = p2; in pkey_tls1_prf_ctrl()
68 if (kctx->sec != NULL) in pkey_tls1_prf_ctrl()
69 OPENSSL_clear_free(kctx->sec, kctx->seclen); in pkey_tls1_prf_ctrl()
70 OPENSSL_cleanse(kctx->seed, kctx->seedlen); in pkey_tls1_prf_ctrl()
71 kctx->seedlen = 0; in pkey_tls1_prf_ctrl()
72 kctx->sec = OPENSSL_memdup(p2, p1); in pkey_tls1_prf_ctrl()
73 if (kctx->sec == NULL) in pkey_tls1_prf_ctrl()
75 kctx->seclen = p1; in pkey_tls1_prf_ctrl()
81 if (p1 < 0 || p1 > (int)(TLS1_PRF_MAXBUF - kctx->seedlen)) in pkey_tls1_prf_ctrl()
83 memcpy(kctx->seed + kctx->seedlen, p2, p1); in pkey_tls1_prf_ctrl()
84 kctx->seedlen += p1; in pkey_tls1_prf_ctrl()
101 TLS1_PRF_PKEY_CTX *kctx = ctx->data; in pkey_tls1_prf_ctrl_str() local
108 kctx->md = md; in pkey_tls1_prf_ctrl_str()
127 TLS1_PRF_PKEY_CTX *kctx = ctx->data; in pkey_tls1_prf_derive() local
128 if (kctx->md == NULL) { in pkey_tls1_prf_derive()
132 if (kctx->sec == NULL) { in pkey_tls1_prf_derive()
136 if (kctx->seedlen == 0) { in pkey_tls1_prf_derive()
140 return tls1_prf_alg(kctx->md, kctx->sec, kctx->seclen, in pkey_tls1_prf_derive()
141 kctx->seed, kctx->seedlen, in pkey_tls1_prf_derive()