diff options
author | Michal Rokos <m.rokos@sh.cvut.cz> | 2002-03-05 15:05:29 +0000 |
---|---|---|
committer | Michal Rokos <m.rokos@sh.cvut.cz> | 2002-03-05 15:05:29 +0000 |
commit | 3c8abbf103555809d110c21f89de60869a4a6bea (patch) | |
tree | 71beab86d7d0e6fc143a6d5c55a25cc2a75e0b6f /ossl_pkey_dh.c | |
parent | 59dd8c5696d83aff78c506d2a161ea4ffb404088 (diff) | |
download | ruby-openssl-history-3c8abbf103555809d110c21f89de60869a4a6bea.tar.gz |
* WARNING! All to_str methods are not used any longer (use to_text instead)
* made an aliases to_pem as to_s
* more relaxed params checking - everywhere where string was needed it is OK that obj implements to_s method
Diffstat (limited to 'ossl_pkey_dh.c')
-rw-r--r-- | ossl_pkey_dh.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ossl_pkey_dh.c b/ossl_pkey_dh.c index 87db5c8..9c19ec5 100644 --- a/ossl_pkey_dh.c +++ b/ossl_pkey_dh.c @@ -122,7 +122,7 @@ ossl_dh_s_new_from_pem(VALUE klass, VALUE buffer) BIO *in = NULL; VALUE obj; - Check_Type(buffer, T_STRING); + buffer = rb_String(buffer); if (!(in = BIO_new_mem_buf(RSTRING(buffer)->ptr, RSTRING(buffer)->len))) OSSL_Raise(eDHError, ""); @@ -237,7 +237,7 @@ ossl_dh_export(VALUE self) * Don't use :-)) (I's up to you) */ static VALUE -ossl_dh_to_str(VALUE self) +ossl_dh_to_text(VALUE self) { ossl_dh *dhp = NULL; BIO *out = NULL; @@ -297,7 +297,7 @@ Init_ossl_dh(VALUE mPKey, VALUE cPKey, VALUE ePKeyError) rb_define_method(cDH, "public?", ossl_dh_is_public, 0); rb_define_method(cDH, "private?", ossl_dh_is_private, 0); - rb_define_method(cDH, "to_str", ossl_dh_to_str, 0); + rb_define_method(cDH, "to_text", ossl_dh_to_text, 0); rb_define_method(cDH, "export", ossl_dh_export, 0); rb_define_alias(cDH, "to_pem", "export"); rb_define_method(cDH, "public_key", ossl_dh_to_public_key, 0); |