diff options
author | Nils Larsch <nils@openssl.org> | 2006-03-15 08:37:35 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2006-03-15 08:37:35 +0000 |
commit | 40f51f506cf253e7e9ca6779078ac4eab541ce9a (patch) | |
tree | 7b7c8bdf2214562db64cdb6a3840b6f0ceeeaf5b /crypto/asn1/t_pkey.c | |
parent | eeb821f707246ed9b909e4638c110fb60ec7e485 (diff) |
create BN_CTX object
Diffstat (limited to 'crypto/asn1/t_pkey.c')
-rw-r--r-- | crypto/asn1/t_pkey.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/asn1/t_pkey.c b/crypto/asn1/t_pkey.c index afb95d6712..e53c1294e9 100644 --- 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; } + 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 */ @@ -508,6 +515,13 @@ int EC_KEY_print(BIO *bp, const EC_KEY *x, int off) 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) |