70 #ifndef OPENSSL_NO_FP_API
144 static int print_bin(
BIO *
fp,
const char *str,
const unsigned char *
num,
145 size_t len,
int off);
149 unsigned char *buffer=NULL;
155 *order=NULL, *cofactor=NULL;
156 const unsigned char *
seed;
159 static const char *gen_compressed =
"Generator (compressed):";
160 static const char *gen_uncompressed =
"Generator (uncompressed):";
161 static const char *gen_hybrid =
"Generator (hybrid):";
205 (cofactor =
BN_new()) == NULL)
210 #ifndef OPENSSL_NO_EC2M
244 form, NULL, ctx)) == NULL)
295 if ((p != NULL) && !
ASN1_bn_print(bp,
"Polynomial:", p, buffer,
301 if ((p != NULL) && !
ASN1_bn_print(bp,
"Prime:", p, buffer,off))
304 if ((a != NULL) && !
ASN1_bn_print(bp,
"A: ", a, buffer, off))
306 if ((b != NULL) && !
ASN1_bn_print(bp,
"B: ", b, buffer, off))
316 if ((gen != NULL) && !
ASN1_bn_print(bp, gen_uncompressed, gen,
327 buffer, off))
goto err;
328 if ((cofactor != NULL) && !
ASN1_bn_print(bp,
"Cofactor: ", cofactor,
329 buffer, off))
goto err;
330 if (seed && !print_bin(bp,
"Seed:", seed, seed_len, off))
356 static int print_bin(
BIO *
fp,
const char *name,
const unsigned char *buf,
376 for (i=0; i<
len; i++)
381 memset(&(str[1]),
' ',off+4);
385 if (
BIO_printf(fp,
"%02x%s",buf[i],((i+1) == len)?
"":
":") <= 0)