diff options
author | Michal Rokos <m.rokos@sh.cvut.cz> | 2002-02-23 07:27:42 +0000 |
---|---|---|
committer | Michal Rokos <m.rokos@sh.cvut.cz> | 2002-02-23 07:27:42 +0000 |
commit | 59dd8c5696d83aff78c506d2a161ea4ffb404088 (patch) | |
tree | 4122e0c64fd7117dfdc776f013fb1e487d227b4f /ossl_pkey_rsa.c | |
parent | 447afde226aac7461d8a549ea8aae5763b0e3124 (diff) | |
download | ruby-openssl-history-59dd8c5696d83aff78c506d2a161ea4ffb404088.tar.gz |
* More benevolent checks (Check_SafeStr(x) -> Check_Type(x, T_STRING)
(where we don't care)
Diffstat (limited to 'ossl_pkey_rsa.c')
-rw-r--r-- | ossl_pkey_rsa.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ossl_pkey_rsa.c b/ossl_pkey_rsa.c index c8612d4..85011e8 100644 --- a/ossl_pkey_rsa.c +++ b/ossl_pkey_rsa.c @@ -125,10 +125,10 @@ ossl_rsa_s_new_from_pem(int argc, VALUE *argv, VALUE klass) rb_scan_args(argc, argv, "11", &buffer, &pass); - Check_SafeStr(buffer); + Check_Type(buffer, T_STRING); if (!NIL_P(pass)) { - Check_SafeStr(pass); + Check_Type(pass, T_STRING); passwd = RSTRING(pass)->ptr; } /* else passwd = NULL; */ @@ -232,7 +232,7 @@ ossl_rsa_export(int argc, VALUE *argv, VALUE self) ciph = ossl_cipher_get_EVP_CIPHER(cipher); if (!NIL_P(password)) { - Check_SafeStr(password); + Check_Type(password, T_STRING); pass = RSTRING(password)->ptr; } } @@ -269,7 +269,7 @@ ossl_rsa_public_encrypt(VALUE self, VALUE buffer) GetRSA(self, rsap); - Check_SafeStr(buffer); + Check_Type(buffer, T_STRING); size = RSA_size(rsap->rsa); @@ -296,7 +296,7 @@ ossl_rsa_public_decrypt(VALUE self, VALUE buffer) GetRSA(self, rsap); - Check_SafeStr(buffer); + Check_Type(buffer, T_STRING); size = RSA_size(rsap->rsa); @@ -327,7 +327,7 @@ ossl_rsa_private_encrypt(VALUE self, VALUE buffer) rb_raise(eRSAError, "PRIVATE key needed for this operation!"); } - Check_SafeStr(buffer); + Check_Type(buffer, T_STRING); size = RSA_size(rsap->rsa); @@ -358,7 +358,7 @@ ossl_rsa_private_decrypt(VALUE self, VALUE buffer) rb_raise(eRSAError, "Private RSA key needed!"); } - Check_SafeStr(buffer); + Check_Type(buffer, T_STRING); size = RSA_size(rsap->rsa); @@ -507,7 +507,7 @@ ossl_rsa_sign(VALUE self, VALUE digest, VALUE text) GetRSA(self, rsap); OSSL_Check_type(digest, cDigest); - Check_SafeStr(text); + Check_Type(text, T_STRING); if (!(sign = OPENSSL_malloc(RSA_size(rsap->rsa)+16))) { OSSL_Raise(eRSAError, ""); |