projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eeb821f
)
create BN_CTX object
author
Nils Larsch
<nils@openssl.org>
Wed, 15 Mar 2006 08:37:35 +0000
(08:37 +0000)
committer
Nils Larsch
<nils@openssl.org>
Wed, 15 Mar 2006 08:37:35 +0000
(08:37 +0000)
crypto/asn1/t_pkey.c
patch
|
blob
|
history
diff --git
a/crypto/asn1/t_pkey.c
b/crypto/asn1/t_pkey.c
index afb95d67121a0995b2f7cd3ecf29df0d92f9d0e1..e53c1294e9ee4c895466f32b315cd52b2fd421f8 100644
(file)
--- a/
crypto/asn1/t_pkey.c
+++ b/
crypto/asn1/t_pkey.c
@@
-312,6
+312,13
@@
int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off)
goto err;
}
goto err;
}
+ ctx = BN_CTX_new();
+ if (ctx == NULL)
+ {
+ reason = ERR_R_MALLOC_FAILURE;
+ goto err;
+ }
+
if (EC_GROUP_get_asn1_flag(x))
{
/* the curve parameter are given by an asn1 OID */
if (EC_GROUP_get_asn1_flag(x))
{
/* the curve parameter are given by an asn1 OID */
@@
-508,6
+515,13
@@
int EC_KEY_print(BIO *bp, const EC_KEY *x, int off)
goto err;
}
goto err;
}
+ ctx = BN_CTX_new();
+ if (ctx == NULL)
+ {
+ reason = ERR_R_MALLOC_FAILURE;
+ goto err;
+ }
+
public_key = EC_KEY_get0_public_key(x);
if ((pub_key = EC_POINT_point2bn(group, public_key,
EC_KEY_get_conv_form(x), NULL, ctx)) == NULL)
public_key = EC_KEY_get0_public_key(x);
if ((pub_key = EC_POINT_point2bn(group, public_key,
EC_KEY_get_conv_form(x), NULL, ctx)) == NULL)