summaryrefslogtreecommitdiff
path: root/ext/openssl/openssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/openssl.c')
-rw-r--r--ext/openssl/openssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index ab58f47d0f..88d3d357b1 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -64,7 +64,6 @@
#define timezone _timezone /* timezone is called _timezone in LibC */
#endif
-#define DEFAULT_KEY_LENGTH 512
#define MIN_KEY_LENGTH 384
#define OPENSSL_ALGO_SHA1 1
@@ -3867,11 +3866,12 @@ static EVP_PKEY * php_openssl_generate_private_key(struct php_x509_request * req
#ifdef HAVE_EVP_PKEY_EC
case OPENSSL_KEYTYPE_EC:
{
+ EC_KEY *eckey;
if (req->curve_name == NID_undef) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing configuration value: 'curve_name' not set");
return NULL;
}
- EC_KEY *eckey = EC_KEY_new_by_curve_name(req->curve_name);
+ eckey = EC_KEY_new_by_curve_name(req->curve_name);
if (eckey) {
EC_KEY_set_asn1_flag(eckey, OPENSSL_EC_NAMED_CURVE);
if (EC_KEY_generate_key(eckey) &&