Lines Matching refs:pub_key
84 ret->pub_key = NULL;
128 if (r->pub_key != NULL)
129 EC_POINT_free(r->pub_key);
161 if (src->pub_key && src->group) {
162 if (dest->pub_key)
163 EC_POINT_free(dest->pub_key);
164 dest->pub_key = EC_POINT_new(src->group);
165 if (dest->pub_key == NULL)
167 if (!EC_POINT_copy(dest->pub_key, src->pub_key))
235 EC_POINT *pub_key = NULL;
267 if (eckey->pub_key == NULL) {
268 pub_key = EC_POINT_new(eckey->group);
269 if (pub_key == NULL)
272 pub_key = eckey->pub_key;
274 if (!EC_POINT_mul(eckey->group, pub_key, priv_key, NULL, NULL, ctx))
278 eckey->pub_key = pub_key;
285 if (pub_key != NULL && eckey->pub_key == NULL)
286 EC_POINT_free(pub_key);
301 if (!eckey || !eckey->group || !eckey->pub_key) {
306 if (EC_POINT_is_at_infinity(eckey->group, eckey->pub_key)) {
316 /* testing whether the pub_key is on the elliptic curve */
317 if (EC_POINT_is_on_curve(eckey->group, eckey->pub_key, ctx) <= 0) {
321 /* testing whether pub_key * order is the point at infinity */
327 if (!EC_POINT_mul(eckey->group, point, NULL, eckey->pub_key, order, ctx)) {
337 * pub_key
349 if (EC_POINT_cmp(eckey->group, point, eckey->pub_key, ctx) != 0) {
471 return key->pub_key;
474 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub_key)
476 if (key->pub_key != NULL)
477 EC_POINT_free(key->pub_key);
478 key->pub_key = EC_POINT_dup(pub_key, key->group);
479 return (key->pub_key == NULL) ? 0 : 1;