Lines Matching refs:pkey

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