summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_pkcs5.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_pkcs5.c
parentbe2d3f5979f10cd06f6d1512ee367b2ec43ef315 (diff)
* 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_pkcs5.c')
-rw-r--r--ext/openssl/ossl_pkcs5.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/openssl/ossl_pkcs5.c b/ext/openssl/ossl_pkcs5.c
index c4476dae38e..18d166d1ca9 100644
--- a/ext/openssl/ossl_pkcs5.c
+++ b/ext/openssl/ossl_pkcs5.c
@@ -7,6 +7,7 @@
VALUE mPKCS5;
VALUE ePKCS5;
+#ifdef HAVE_PKCS5_PBKDF2_HMAC
/*
* call-seq:
* PKCS5.pbkdf2_hmac(pass, salt, iter, keylen, digest) => string
@@ -25,7 +26,6 @@ VALUE ePKCS5;
static VALUE
ossl_pkcs5_pbkdf2_hmac(VALUE self, VALUE pass, VALUE salt, VALUE iter, VALUE keylen, VALUE digest)
{
-#ifdef HAVE_PKCS5_PBKDF2_HMAC
VALUE str;
const EVP_MD *md;
int len = NUM2INT(keylen);
@@ -40,12 +40,13 @@ ossl_pkcs5_pbkdf2_hmac(VALUE self, VALUE pass, VALUE salt, VALUE iter, VALUE key
ossl_raise(ePKCS5, "PKCS5_PBKDF2_HMAC");
return str;
+}
#else
- rb_notimplement();
+#define ossl_pkcs5_pbkdf2_hmac rb_f_notimplement
#endif
-}
+#ifdef HAVE_PKCS5_PBKDF2_HMAC_SHA1
/*
* call-seq:
* PKCS5.pbkdf2_hmac_sha1(pass, salt, iter, keylen) => string
@@ -63,7 +64,6 @@ ossl_pkcs5_pbkdf2_hmac(VALUE self, VALUE pass, VALUE salt, VALUE iter, VALUE key
static VALUE
ossl_pkcs5_pbkdf2_hmac_sha1(VALUE self, VALUE pass, VALUE salt, VALUE iter, VALUE keylen)
{
-#ifdef HAVE_PKCS5_PBKDF2_HMAC_SHA1
VALUE str;
int len = NUM2INT(keylen);
@@ -78,10 +78,10 @@ ossl_pkcs5_pbkdf2_hmac_sha1(VALUE self, VALUE pass, VALUE salt, VALUE iter, VALU
ossl_raise(ePKCS5, "PKCS5_PBKDF2_HMAC_SHA1");
return str;
+}
#else
- rb_notimplement();
+#define ossl_pkcs5_pbkdf2_hmac_sha1 rb_f_notimplement
#endif
-}
void
Init_ossl_pkcs5()