* 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
This commit is contained in:
parent
e040ff5530
commit
f0c8c9d832
@ -1,3 +1,8 @@
|
|||||||
|
Thu Sep 18 22:54:39 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
|
* ext/openssl/ossl_pkey_ec.c (ossl_ec_key_to_string): comment out
|
||||||
|
fragments of unused code.
|
||||||
|
|
||||||
Thu Sep 18 22:35:03 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
Thu Sep 18 22:35:03 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* ext/bigdecimal/bigdecimal.c (VpCtoV): 1E1000...000 is interpreted as
|
* ext/bigdecimal/bigdecimal.c (VpCtoV): 1E1000...000 is interpreted as
|
||||||
|
@ -463,8 +463,10 @@ static VALUE ossl_ec_key_to_string(VALUE self, int format)
|
|||||||
BIO *out;
|
BIO *out;
|
||||||
int i = -1;
|
int i = -1;
|
||||||
int private = 0;
|
int private = 0;
|
||||||
|
#if 0 /* unused now */
|
||||||
EVP_CIPHER *cipher = NULL;
|
EVP_CIPHER *cipher = NULL;
|
||||||
char *password = NULL;
|
char *password = NULL;
|
||||||
|
#endif
|
||||||
VALUE str;
|
VALUE str;
|
||||||
|
|
||||||
Require_EC_KEY(self, ec);
|
Require_EC_KEY(self, ec);
|
||||||
@ -484,13 +486,18 @@ static VALUE ossl_ec_key_to_string(VALUE self, int format)
|
|||||||
switch(format) {
|
switch(format) {
|
||||||
case EXPORT_PEM:
|
case EXPORT_PEM:
|
||||||
if (private) {
|
if (private) {
|
||||||
|
#if 0 /* unused now */
|
||||||
if (cipher || password)
|
if (cipher || password)
|
||||||
/* BUG: finish cipher/password key export */
|
/* BUG: finish cipher/password key export */
|
||||||
rb_notimplement();
|
rb_notimplement();
|
||||||
i = PEM_write_bio_ECPrivateKey(out, ec, cipher, NULL, 0, NULL, password);
|
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 {
|
} else {
|
||||||
|
#if 0 /* unused now */
|
||||||
if (cipher || password)
|
if (cipher || password)
|
||||||
rb_raise(rb_eArgError, "encryption is not supported when exporting this key type");
|
rb_raise(rb_eArgError, "encryption is not supported when exporting this key type");
|
||||||
|
#endif
|
||||||
|
|
||||||
i = PEM_write_bio_EC_PUBKEY(out, ec);
|
i = PEM_write_bio_EC_PUBKEY(out, ec);
|
||||||
}
|
}
|
||||||
@ -498,13 +505,17 @@ static VALUE ossl_ec_key_to_string(VALUE self, int format)
|
|||||||
break;
|
break;
|
||||||
case EXPORT_DER:
|
case EXPORT_DER:
|
||||||
if (private) {
|
if (private) {
|
||||||
|
#if 0 /* unused now */
|
||||||
if (cipher || password)
|
if (cipher || password)
|
||||||
rb_raise(rb_eArgError, "encryption is not supported when exporting this key type");
|
rb_raise(rb_eArgError, "encryption is not supported when exporting this key type");
|
||||||
|
#endif
|
||||||
|
|
||||||
i = i2d_ECPrivateKey_bio(out, ec);
|
i = i2d_ECPrivateKey_bio(out, ec);
|
||||||
} else {
|
} else {
|
||||||
|
#if 0 /* unused now */
|
||||||
if (cipher || password)
|
if (cipher || password)
|
||||||
rb_raise(rb_eArgError, "encryption is not supported when exporting this key type");
|
rb_raise(rb_eArgError, "encryption is not supported when exporting this key type");
|
||||||
|
#endif
|
||||||
|
|
||||||
i = i2d_EC_PUBKEY_bio(out, ec);
|
i = i2d_EC_PUBKEY_bio(out, ec);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user