diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-18 13:56:51 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-18 13:56:51 +0000 |
commit | f0c8c9d8326605dc9537587d7a2fb95861b5c80e (patch) | |
tree | d5785ded1b5ad572f12a65fd16050f079b718d6b /ext/openssl/ossl_pkey_ec.c | |
parent | e040ff55308cca5d4f748c9bcc8f8889a32f9564 (diff) | |
download | ruby-f0c8c9d8326605dc9537587d7a2fb95861b5c80e.tar.gz |
* ext/openssl/ossl_pkey_ec.c (ossl_ec_key_to_string): comment out
fragments of unused code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_pkey_ec.c')
-rw-r--r-- | ext/openssl/ossl_pkey_ec.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c index d4285f2069..caa140dc4b 100644 --- a/ext/openssl/ossl_pkey_ec.c +++ b/ext/openssl/ossl_pkey_ec.c @@ -463,8 +463,10 @@ static VALUE ossl_ec_key_to_string(VALUE self, int format) BIO *out; int i = -1; int private = 0; +#if 0 /* unused now */ EVP_CIPHER *cipher = NULL; char *password = NULL; +#endif VALUE str; Require_EC_KEY(self, ec); @@ -484,13 +486,18 @@ static VALUE ossl_ec_key_to_string(VALUE self, int format) switch(format) { case EXPORT_PEM: if (private) { +#if 0 /* unused now */ if (cipher || password) /* BUG: finish cipher/password key export */ rb_notimplement(); i = PEM_write_bio_ECPrivateKey(out, ec, cipher, NULL, 0, NULL, password); +#endif + i = PEM_write_bio_ECPrivateKey(out, ec, NULL, NULL, 0, NULL, NULL); } else { +#if 0 /* unused now */ if (cipher || password) rb_raise(rb_eArgError, "encryption is not supported when exporting this key type"); +#endif i = PEM_write_bio_EC_PUBKEY(out, ec); } @@ -498,13 +505,17 @@ static VALUE ossl_ec_key_to_string(VALUE self, int format) break; case EXPORT_DER: if (private) { +#if 0 /* unused now */ if (cipher || password) rb_raise(rb_eArgError, "encryption is not supported when exporting this key type"); +#endif i = i2d_ECPrivateKey_bio(out, ec); } else { +#if 0 /* unused now */ if (cipher || password) rb_raise(rb_eArgError, "encryption is not supported when exporting this key type"); +#endif i = i2d_EC_PUBKEY_bio(out, ec); } |