summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-31 05:55:25 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-31 05:55:25 +0000
commit19c3d1421cedd8a0490a824fa325f74ca9cabc85 (patch)
treea0e6f235d23994ff8ca7c3dde70c1df9731bd0df /ext
parent92c44bdb9e643f49ebde2ae0a768cacac39ab5dc (diff)
downloadruby-19c3d1421cedd8a0490a824fa325f74ca9cabc85.tar.gz
ruby-19c3d1421cedd8a0490a824fa325f74ca9cabc85.tar.xz
ruby-19c3d1421cedd8a0490a824fa325f74ca9cabc85.zip
* ext/openssl/ossl_digest.c (GetDigestPtr): use StringValueCStr
instead of STR2CSTR. * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_initialize): ditto. (ossl_ec_group_initialize): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/ossl_digest.c2
-rw-r--r--ext/openssl/ossl_pkey_ec.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/openssl/ossl_digest.c b/ext/openssl/ossl_digest.c
index ecd52fec9..2776e786e 100644
--- a/ext/openssl/ossl_digest.c
+++ b/ext/openssl/ossl_digest.c
@@ -38,7 +38,7 @@ GetDigestPtr(VALUE obj)
const EVP_MD *md;
if (TYPE(obj) == T_STRING) {
- const char *name = STR2CSTR(obj);
+ const char *name = StringValueCStr(obj);
md = EVP_get_digestbyname(name);
if (!md)
diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c
index caa140dc4..edb5695fb 100644
--- a/ext/openssl/ossl_pkey_ec.c
+++ b/ext/openssl/ossl_pkey_ec.c
@@ -201,7 +201,7 @@ static VALUE ossl_ec_key_initialize(int argc, VALUE *argv, VALUE self)
BIO_free(in);
if (ec == NULL) {
- const char *name = STR2CSTR(arg);
+ const char *name = StringValueCStr(arg);
int nid = OBJ_sn2nid(name);
if (nid == NID_undef)
@@ -785,7 +785,7 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self)
BIO_free(in);
if (!group) {
- const char *name = STR2CSTR(arg1);
+ const char *name = StringValueCStr(arg1);
int nid = OBJ_sn2nid(name);
if (nid == NID_undef)