aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_cipher.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-18 14:10:06 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-18 14:10:06 +0000
commit05a278b4cdc8456580e51055ccb89fe4d1cd46ed (patch)
treebe02312738c84536b2ab08ccadbbec3c031fff76 /ext/openssl/ossl_cipher.c
parentbe2d3f5979f10cd06f6d1512ee367b2ec43ef315 (diff)
downloadruby-05a278b4cdc8456580e51055ccb89fe4d1cd46ed.tar.gz
* ext/readline/readline.c: use rb_f_notimplement for methods not
implemented. * ext/openssl/ossl_engine.c: ditto. * ext/openssl/ossl_config.c: ditto. * ext/openssl/ossl_cipher.c: ditto. * ext/openssl/ossl_pkcs5.c: ditto. * ext/openssl/ossl_x509ext.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/basicsocket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. * ext/iconv/iconv.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_cipher.c')
-rw-r--r--ext/openssl/ossl_cipher.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/openssl/ossl_cipher.c b/ext/openssl/ossl_cipher.c
index 27d152a61a..df7856b6f0 100644
--- a/ext/openssl/ossl_cipher.c
+++ b/ext/openssl/ossl_cipher.c
@@ -133,6 +133,7 @@ add_cipher_name_to_ary(const OBJ_NAME *name, VALUE ary)
}
#endif
+#ifdef HAVE_OBJ_NAME_DO_ALL_SORTED
/*
* call-seq:
* Cipher.ciphers -> array[string...]
@@ -142,7 +143,6 @@ add_cipher_name_to_ary(const OBJ_NAME *name, VALUE ary)
static VALUE
ossl_s_ciphers(VALUE self)
{
-#ifdef HAVE_OBJ_NAME_DO_ALL_SORTED
VALUE ary;
ary = rb_ary_new();
@@ -151,10 +151,10 @@ ossl_s_ciphers(VALUE self)
(void*)ary);
return ary;
+}
#else
- rb_notimplement();
+#define ossl_s_ciphers rb_f_notimplement
#endif
-}
/*
* call-seq:
@@ -453,6 +453,7 @@ ossl_cipher_set_key_length(VALUE self, VALUE key_length)
return key_length;
}
+#if defined(HAVE_EVP_CIPHER_CTX_SET_PADDING)
/*
* call-seq:
* cipher.padding = integer -> integer
@@ -466,18 +467,17 @@ ossl_cipher_set_key_length(VALUE self, VALUE key_length)
static VALUE
ossl_cipher_set_padding(VALUE self, VALUE padding)
{
-#if defined(HAVE_EVP_CIPHER_CTX_SET_PADDING)
EVP_CIPHER_CTX *ctx;
int pad = NUM2INT(padding);
GetCipher(self, ctx);
if (EVP_CIPHER_CTX_set_padding(ctx, pad) != 1)
ossl_raise(eCipherError, NULL);
-#else
- rb_notimplement();
-#endif
return padding;
}
+#else
+#define ossl_cipher_set_padding rb_f_notimplement
+#endif
#define CIPHER_0ARG_INT(func) \
static VALUE \