68 #include <openssl/fips.h>
100 if (ret->
group == NULL)
112 if (r == NULL)
return;
116 REF_PRINT(
"EC_KEY",r);
122 fprintf(stderr,
"EC_KEY_free, bad reference count\n");
127 if (r->
group != NULL)
145 if (dest == NULL || src == NULL)
158 if (dest->
group == NULL)
225 REF_PRINT(
"EC_KEY",r);
230 fprintf(stderr,
"EC_KEY_up, bad reference count\n");
234 return ((i > 1) ? 1 : 0);
241 BIGNUM *priv_key = NULL, *order = NULL;
246 return FIPS_ec_key_generate_key(eckey);
249 if (!eckey || !eckey->
group)
255 if ((order =
BN_new()) == NULL)
goto err;
261 if (priv_key == NULL)
295 if (pub_key != NULL && eckey->
pub_key == NULL)
297 if (priv_key != NULL && eckey->
priv_key == NULL)
308 const BIGNUM *order = NULL;
388 int ok = 0, tmp_nid, is_char_two = 0;
390 if (!key || !key->
group || !x || !y)
412 #ifndef OPENSSL_NO_EC2M
466 if (key->
group != NULL)
469 return (key->
group == NULL) ? 0 : 1;
482 return (key->
priv_key == NULL) ? 0 : 1;
495 return (key->
pub_key == NULL) ? 0 : 1;
516 if (key->
group != NULL)
521 void *(*dup_func)(
void *),
void (*
free_func)(
void *),
void (*clear_free_func)(
void *))
527 void *(*dup_func)(
void *),
void (*
free_func)(
void *),
void (*clear_free_func)(
void *))
539 if (key->
group != NULL)
545 if (key->
group == NULL)
562 key->
flags &= ~flags;