Lines Matching refs:pkey

29 static int dsa_pub_decode(EVP_PKEY *pkey, const X509_PUBKEY *pubkey)  in dsa_pub_decode()  argument
77 EVP_PKEY_assign_DSA(pkey, dsa); in dsa_pub_decode()
87 static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) in dsa_pub_encode() argument
97 dsa = pkey->pkey.dsa; in dsa_pub_encode()
98 if (pkey->save_parameters in dsa_pub_encode()
150 static int dsa_priv_decode(EVP_PKEY *pkey, const PKCS8_PRIV_KEY_INFO *p8) in dsa_priv_decode() argument
157 EVP_PKEY_assign_DSA(pkey, dsa); in dsa_priv_decode()
163 static int dsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) in dsa_priv_encode() argument
170 if (pkey->pkey.dsa == NULL|| pkey->pkey.dsa->priv_key == NULL) { in dsa_priv_encode()
182 params->length = i2d_DSAparams(pkey->pkey.dsa, &params->data); in dsa_priv_encode()
190 prkey = BN_to_ASN1_INTEGER(pkey->pkey.dsa->priv_key, NULL); in dsa_priv_encode()
218 static int int_dsa_size(const EVP_PKEY *pkey) in int_dsa_size() argument
220 return DSA_size(pkey->pkey.dsa); in int_dsa_size()
223 static int dsa_bits(const EVP_PKEY *pkey) in dsa_bits() argument
225 return DSA_bits(pkey->pkey.dsa); in dsa_bits()
228 static int dsa_security_bits(const EVP_PKEY *pkey) in dsa_security_bits() argument
230 return DSA_security_bits(pkey->pkey.dsa); in dsa_security_bits()
233 static int dsa_missing_parameters(const EVP_PKEY *pkey) in dsa_missing_parameters() argument
236 dsa = pkey->pkey.dsa; in dsa_missing_parameters()
245 if (to->pkey.dsa == NULL) { in dsa_copy_parameters()
246 to->pkey.dsa = DSA_new(); in dsa_copy_parameters()
247 if (to->pkey.dsa == NULL) in dsa_copy_parameters()
250 if (!ossl_ffc_params_copy(&to->pkey.dsa->params, &from->pkey.dsa->params)) in dsa_copy_parameters()
253 to->pkey.dsa->dirty_cnt++; in dsa_copy_parameters()
259 return ossl_ffc_params_cmp(&a->pkey.dsa->params, &b->pkey.dsa->params, 1); in dsa_cmp_parameters()
264 return BN_cmp(b->pkey.dsa->pub_key, a->pkey.dsa->pub_key) == 0; in dsa_pub_cmp()
267 static void int_dsa_free(EVP_PKEY *pkey) in int_dsa_free() argument
269 DSA_free(pkey->pkey.dsa); in int_dsa_free()
320 static int dsa_param_decode(EVP_PKEY *pkey, in dsa_param_decode() argument
329 EVP_PKEY_assign_DSA(pkey, dsa); in dsa_param_decode()
333 static int dsa_param_encode(const EVP_PKEY *pkey, unsigned char **pder) in dsa_param_encode() argument
335 return i2d_DSAparams(pkey->pkey.dsa, pder); in dsa_param_encode()
338 static int dsa_param_print(BIO *bp, const EVP_PKEY *pkey, int indent, in dsa_param_print() argument
341 return do_dsa_print(bp, pkey->pkey.dsa, indent, 0); in dsa_param_print()
344 static int dsa_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, in dsa_pub_print() argument
347 return do_dsa_print(bp, pkey->pkey.dsa, indent, 1); in dsa_pub_print()
350 static int dsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, in dsa_priv_print() argument
353 return do_dsa_print(bp, pkey->pkey.dsa, indent, 2); in dsa_priv_print()
356 static int old_dsa_priv_decode(EVP_PKEY *pkey, in old_dsa_priv_decode() argument
366 EVP_PKEY_assign_DSA(pkey, dsa); in old_dsa_priv_decode()
370 static int old_dsa_priv_encode(const EVP_PKEY *pkey, unsigned char **pder) in old_dsa_priv_encode() argument
372 return i2d_DSAPrivateKey(pkey->pkey.dsa, pder); in old_dsa_priv_encode()
412 static int dsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) in dsa_pkey_ctrl() argument
424 static size_t dsa_pkey_dirty_cnt(const EVP_PKEY *pkey) in dsa_pkey_dirty_cnt() argument
426 return pkey->pkey.dsa->dirty_cnt; in dsa_pkey_dirty_cnt()
433 DSA *dsa = from->pkey.dsa; in dsa_pkey_export_to()
482 EVP_PKEY *pkey = EVP_PKEY_CTX_get0_pkey(pctx); in dsa_pkey_import_from() local
492 || !EVP_PKEY_assign_DSA(pkey, dsa)) { in dsa_pkey_import_from()
501 DSA *dsa = from->pkey.dsa; in dsa_pkey_copy()