Lines Matching refs:p

71     const OSSL_PARAM *p;  in ossl_ccm_set_ctx_params()  local
77 p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_AEAD_TAG); in ossl_ccm_set_ctx_params()
78 if (p != NULL) { in ossl_ccm_set_ctx_params()
79 if (p->data_type != OSSL_PARAM_OCTET_STRING) { in ossl_ccm_set_ctx_params()
83 if ((p->data_size & 1) || (p->data_size < 4) || p->data_size > 16) { in ossl_ccm_set_ctx_params()
88 if (p->data != NULL) { in ossl_ccm_set_ctx_params()
93 memcpy(ctx->buf, p->data, p->data_size); in ossl_ccm_set_ctx_params()
96 ctx->m = p->data_size; in ossl_ccm_set_ctx_params()
99 p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_AEAD_IVLEN); in ossl_ccm_set_ctx_params()
100 if (p != NULL) { in ossl_ccm_set_ctx_params()
103 if (!OSSL_PARAM_get_size_t(p, &sz)) { in ossl_ccm_set_ctx_params()
118 p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_AEAD_TLS1_AAD); in ossl_ccm_set_ctx_params()
119 if (p != NULL) { in ossl_ccm_set_ctx_params()
120 if (p->data_type != OSSL_PARAM_OCTET_STRING) { in ossl_ccm_set_ctx_params()
124 sz = ccm_tls_init(ctx, p->data, p->data_size); in ossl_ccm_set_ctx_params()
132 p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_AEAD_TLS1_IV_FIXED); in ossl_ccm_set_ctx_params()
133 if (p != NULL) { in ossl_ccm_set_ctx_params()
134 if (p->data_type != OSSL_PARAM_OCTET_STRING) { in ossl_ccm_set_ctx_params()
138 if (ccm_tls_iv_set_fixed(ctx, p->data, p->data_size) == 0) { in ossl_ccm_set_ctx_params()
150 OSSL_PARAM *p; in ossl_ccm_get_ctx_params() local
152 p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_IVLEN); in ossl_ccm_get_ctx_params()
153 if (p != NULL && !OSSL_PARAM_set_size_t(p, ccm_get_ivlen(ctx))) { in ossl_ccm_get_ctx_params()
158 p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_AEAD_TAGLEN); in ossl_ccm_get_ctx_params()
159 if (p != NULL) { in ossl_ccm_get_ctx_params()
162 if (!OSSL_PARAM_set_size_t(p, m)) { in ossl_ccm_get_ctx_params()
168 p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_IV); in ossl_ccm_get_ctx_params()
169 if (p != NULL) { in ossl_ccm_get_ctx_params()
170 if (ccm_get_ivlen(ctx) > p->data_size) { in ossl_ccm_get_ctx_params()
174 if (!OSSL_PARAM_set_octet_string(p, ctx->iv, p->data_size) in ossl_ccm_get_ctx_params()
175 && !OSSL_PARAM_set_octet_ptr(p, &ctx->iv, p->data_size)) { in ossl_ccm_get_ctx_params()
181 p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_UPDATED_IV); in ossl_ccm_get_ctx_params()
182 if (p != NULL) { in ossl_ccm_get_ctx_params()
183 if (ccm_get_ivlen(ctx) > p->data_size) { in ossl_ccm_get_ctx_params()
187 if (!OSSL_PARAM_set_octet_string(p, ctx->iv, p->data_size) in ossl_ccm_get_ctx_params()
188 && !OSSL_PARAM_set_octet_ptr(p, &ctx->iv, p->data_size)) { in ossl_ccm_get_ctx_params()
194 p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_KEYLEN); in ossl_ccm_get_ctx_params()
195 if (p != NULL && !OSSL_PARAM_set_size_t(p, ctx->keylen)) { in ossl_ccm_get_ctx_params()
200 p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD); in ossl_ccm_get_ctx_params()
201 if (p != NULL && !OSSL_PARAM_set_size_t(p, ctx->tls_aad_pad_sz)) { in ossl_ccm_get_ctx_params()
206 p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_AEAD_TAG); in ossl_ccm_get_ctx_params()
207 if (p != NULL) { in ossl_ccm_get_ctx_params()
212 if (p->data_type != OSSL_PARAM_OCTET_STRING) { in ossl_ccm_get_ctx_params()
216 if (!ctx->hw->gettag(ctx, p->data, p->data_size)) in ossl_ccm_get_ctx_params()