diff options
Diffstat (limited to 'lang/ruby18-base/patches/patch-ek')
-rw-r--r-- | lang/ruby18-base/patches/patch-ek | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/lang/ruby18-base/patches/patch-ek b/lang/ruby18-base/patches/patch-ek new file mode 100644 index 00000000000..8103081f21a --- /dev/null +++ b/lang/ruby18-base/patches/patch-ek @@ -0,0 +1,89 @@ +$NetBSD: patch-ek,v 1.1 2010/09/10 03:29:01 taca Exp $ + +* r18172: suppress warnings. +* r26835: backport fixes in 1.9. + +--- ext/openssl/ossl_pkey_rsa.c.orig 2010-05-24 23:58:49.000000000 +0000 ++++ ext/openssl/ossl_pkey_rsa.c +@@ -151,23 +151,23 @@ ossl_rsa_initialize(int argc, VALUE *arg + in = ossl_obj2bio(arg); + rsa = PEM_read_bio_RSAPrivateKey(in, NULL, ossl_pem_passwd_cb, passwd); + if (!rsa) { +- BIO_reset(in); ++ (void)BIO_reset(in); + rsa = PEM_read_bio_RSAPublicKey(in, NULL, NULL, NULL); + } + if (!rsa) { +- BIO_reset(in); ++ (void)BIO_reset(in); + rsa = PEM_read_bio_RSA_PUBKEY(in, NULL, NULL, NULL); + } + if (!rsa) { +- BIO_reset(in); ++ (void)BIO_reset(in); + rsa = d2i_RSAPrivateKey_bio(in, NULL); + } + if (!rsa) { +- BIO_reset(in); ++ (void)BIO_reset(in); + rsa = d2i_RSAPublicKey_bio(in, NULL); + } + if (!rsa) { +- BIO_reset(in); ++ (void)BIO_reset(in); + rsa = d2i_RSA_PUBKEY_bio(in, NULL); + } + BIO_free(in); +@@ -288,7 +288,7 @@ ossl_rsa_to_der(VALUE self) + if((len = i2d_func(pkey->pkey.rsa, NULL)) <= 0) + ossl_raise(eRSAError, NULL); + str = rb_str_new(0, len); +- p = RSTRING_PTR(str); ++ p = (unsigned char *)RSTRING_PTR(str); + if(i2d_func(pkey->pkey.rsa, &p) < 0) + ossl_raise(eRSAError, NULL); + ossl_str_adjust(str, p); +@@ -315,8 +315,8 @@ ossl_rsa_public_encrypt(int argc, VALUE + pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding); + StringValue(buffer); + str = rb_str_new(0, ossl_rsa_buf_size(pkey)); +- buf_len = RSA_public_encrypt(RSTRING_LEN(buffer), RSTRING_PTR(buffer), +- RSTRING_PTR(str), pkey->pkey.rsa, ++ buf_len = RSA_public_encrypt(RSTRING_LEN(buffer), (unsigned char *)RSTRING_PTR(buffer), ++ (unsigned char *)RSTRING_PTR(str), pkey->pkey.rsa, + pad); + if (buf_len < 0) ossl_raise(eRSAError, NULL); + rb_str_set_len(str, buf_len); +@@ -341,8 +341,8 @@ ossl_rsa_public_decrypt(int argc, VALUE + pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding); + StringValue(buffer); + str = rb_str_new(0, ossl_rsa_buf_size(pkey)); +- buf_len = RSA_public_decrypt(RSTRING_LEN(buffer), RSTRING_PTR(buffer), +- RSTRING_PTR(str), pkey->pkey.rsa, ++ buf_len = RSA_public_decrypt(RSTRING_LEN(buffer), (unsigned char *)RSTRING_PTR(buffer), ++ (unsigned char *)RSTRING_PTR(str), pkey->pkey.rsa, + pad); + if (buf_len < 0) ossl_raise(eRSAError, NULL); + rb_str_set_len(str, buf_len); +@@ -370,8 +370,8 @@ ossl_rsa_private_encrypt(int argc, VALUE + pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding); + StringValue(buffer); + str = rb_str_new(0, ossl_rsa_buf_size(pkey)); +- buf_len = RSA_private_encrypt(RSTRING_LEN(buffer), RSTRING_PTR(buffer), +- RSTRING_PTR(str), pkey->pkey.rsa, ++ buf_len = RSA_private_encrypt(RSTRING_LEN(buffer), (unsigned char *)RSTRING_PTR(buffer), ++ (unsigned char *)RSTRING_PTR(str), pkey->pkey.rsa, + pad); + if (buf_len < 0) ossl_raise(eRSAError, NULL); + rb_str_set_len(str, buf_len); +@@ -400,8 +400,8 @@ ossl_rsa_private_decrypt(int argc, VALUE + pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding); + StringValue(buffer); + str = rb_str_new(0, ossl_rsa_buf_size(pkey)); +- buf_len = RSA_private_decrypt(RSTRING_LEN(buffer), RSTRING_PTR(buffer), +- RSTRING_PTR(str), pkey->pkey.rsa, ++ buf_len = RSA_private_decrypt(RSTRING_LEN(buffer), (unsigned char *)RSTRING_PTR(buffer), ++ (unsigned char *)RSTRING_PTR(str), pkey->pkey.rsa, + pad); + if (buf_len < 0) ossl_raise(eRSAError, NULL); + rb_str_set_len(str, buf_len); |