Lines Matching refs:pkey

103 static int eckey_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey)
105 EC_KEY *ec_key = pkey->pkey.ec;
190 static int eckey_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey)
217 EVP_PKEY_assign_EC_KEY(pkey, eckey);
229 const EC_GROUP *group = EC_KEY_get0_group(b->pkey.ec);
230 const EC_POINT *pa = EC_KEY_get0_public_key(a->pkey.ec),
231 *pb = EC_KEY_get0_public_key(b->pkey.ec);
240 static int eckey_priv_decode(EVP_PKEY *pkey, PKCS8_PRIV_KEY_INFO *p8)
301 EVP_PKEY_assign_EC_KEY(pkey, eckey);
312 static int eckey_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey)
320 ec_key = pkey->pkey.ec;
366 static int int_ec_size(const EVP_PKEY *pkey)
368 return ECDSA_size(pkey->pkey.ec);
371 static int ec_bits(const EVP_PKEY *pkey)
382 group = EC_KEY_get0_group(pkey->pkey.ec);
394 static int ec_missing_parameters(const EVP_PKEY *pkey)
396 if (EC_KEY_get0_group(pkey->pkey.ec) == NULL)
403 EC_GROUP *group = EC_GROUP_dup(EC_KEY_get0_group(from->pkey.ec));
406 if (EC_KEY_set_group(to->pkey.ec, group) == 0)
414 const EC_GROUP *group_a = EC_KEY_get0_group(a->pkey.ec),
415 *group_b = EC_KEY_get0_group(b->pkey.ec);
422 static void int_ec_free(EVP_PKEY *pkey)
424 EC_KEY_free(pkey->pkey.ec);
522 static int eckey_param_decode(EVP_PKEY *pkey,
531 EVP_PKEY_assign_EC_KEY(pkey, eckey);
535 static int eckey_param_encode(const EVP_PKEY *pkey, unsigned char **pder)
537 return i2d_ECParameters(pkey->pkey.ec, pder);
540 static int eckey_param_print(BIO *bp, const EVP_PKEY *pkey, int indent,
543 return do_EC_KEY_print(bp, pkey->pkey.ec, indent, 0);
546 static int eckey_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent,
549 return do_EC_KEY_print(bp, pkey->pkey.ec, indent, 1);
553 static int eckey_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent,
556 return do_EC_KEY_print(bp, pkey->pkey.ec, indent, 2);
559 static int old_ec_priv_decode(EVP_PKEY *pkey,
568 EVP_PKEY_assign_EC_KEY(pkey, ec);
572 static int old_ec_priv_encode(const EVP_PKEY *pkey, unsigned char **pder)
574 return i2d_ECPrivateKey(pkey->pkey.ec, pder);
577 static int ec_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2)
592 if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey)))
610 if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey)))