projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wp-x86_64.pl: ~10% performance improvement.
[oweals/openssl.git]
/
crypto
/
ec
/
eck_prn.c
diff --git
a/crypto/ec/eck_prn.c
b/crypto/ec/eck_prn.c
index 3a523c0451f28a69988cadf848a285638ac927b7..39ce97862dbd44dfa93db5a687d7731ffe33b1fd 100644
(file)
--- a/
crypto/ec/eck_prn.c
+++ b/
crypto/ec/eck_prn.c
@@
-65,6
+65,7
@@
#include "cryptlib.h"
#include <openssl/evp.h>
#include <openssl/ec.h>
#include "cryptlib.h"
#include <openssl/evp.h>
#include <openssl/ec.h>
+#include <openssl/bn.h>
#ifndef OPENSSL_NO_FP_API
int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off)
#ifndef OPENSSL_NO_FP_API
int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off)
@@
-176,6
+177,7
@@
int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off)
{
/* the curve parameter are given by an asn1 OID */
int nid;
{
/* the curve parameter are given by an asn1 OID */
int nid;
+ const char *nname;
if (!BIO_indent(bp, off, 128))
goto err;
if (!BIO_indent(bp, off, 128))
goto err;
@@
-183,11
+185,18
@@
int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off)
nid = EC_GROUP_get_curve_name(x);
if (nid == 0)
goto err;
nid = EC_GROUP_get_curve_name(x);
if (nid == 0)
goto err;
-
if (BIO_printf(bp, "ASN1 OID: %s", OBJ_nid2sn(nid)) <= 0)
goto err;
if (BIO_printf(bp, "\n") <= 0)
goto err;
if (BIO_printf(bp, "ASN1 OID: %s", OBJ_nid2sn(nid)) <= 0)
goto err;
if (BIO_printf(bp, "\n") <= 0)
goto err;
+ nname = EC_curve_nid2nist(nid);
+ if (nname)
+ {
+ if (!BIO_indent(bp, off, 128))
+ goto err;
+ if (BIO_printf(bp, "NIST CURVE: %s\n", nname) <= 0)
+ goto err;
+ }
}
else
{
}
else
{
@@
-206,7
+215,7
@@
int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off)
reason = ERR_R_MALLOC_FAILURE;
goto err;
}
reason = ERR_R_MALLOC_FAILURE;
goto err;
}
-
+#ifndef OPENSSL_NO_EC2M
if (is_char_two)
{
if (!EC_GROUP_get_curve_GF2m(x, p, a, b, ctx))
if (is_char_two)
{
if (!EC_GROUP_get_curve_GF2m(x, p, a, b, ctx))
@@
-216,6
+225,7
@@
int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off)
}
}
else /* prime field */
}
}
else /* prime field */
+#endif
{
if (!EC_GROUP_get_curve_GFp(x, p, a, b, ctx))
{
{
if (!EC_GROUP_get_curve_GFp(x, p, a, b, ctx))
{