[前][次][番号順一覧][スレッド一覧]

ruby-changes:7899

From: mame <ko1@a...>
Date: Thu, 18 Sep 2008 22:57:13 +0900 (JST)
Subject: [ruby-changes:7899] Ruby:r19420 (trunk): * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_to_string): comment out

mame	2008-09-18 22:56:51 +0900 (Thu, 18 Sep 2008)

  New Revision: 19420

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19420

  Log:
    * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_to_string): comment out
      fragments of unused code.

  Modified files:
    trunk/ChangeLog
    trunk/ext/openssl/ossl_pkey_ec.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19419)
+++ ChangeLog	(revision 19420)
@@ -1,3 +1,8 @@
+Thu Sep 18 22:54:39 2008  Yusuke Endoh  <mame@t...>
+
+	* 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@t...>
 
 	* ext/bigdecimal/bigdecimal.c (VpCtoV): 1E1000...000 is interpreted as
Index: ext/openssl/ossl_pkey_ec.c
===================================================================
--- ext/openssl/ossl_pkey_ec.c	(revision 19419)
+++ ext/openssl/ossl_pkey_ec.c	(revision 19420)
@@ -463,8 +463,10 @@
     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 @@
     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 @@
     	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);
         }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]