summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_ns_spki.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-22 15:34:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-22 15:34:23 +0000
commit6c0f54029816b7df0ce67b78f0dbe382546953da (patch)
tree8f0564d72b69d73c44db04e177637f64bdee5b21 /ext/openssl/ossl_ns_spki.c
parentd56885b43df3b4e9e67fc4a39cbaaaea6961d5d8 (diff)
* ext/openssl: suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_ns_spki.c')
-rw-r--r--ext/openssl/ossl_ns_spki.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/openssl/ossl_ns_spki.c b/ext/openssl/ossl_ns_spki.c
index 738a203..5ff58c3 100644
--- a/ext/openssl/ossl_ns_spki.c
+++ b/ext/openssl/ossl_ns_spki.c
@@ -56,14 +56,14 @@ ossl_spki_initialize(int argc, VALUE *argv, VALUE self)
{
NETSCAPE_SPKI *spki;
VALUE buffer;
- unsigned char *p;
+ const unsigned char *p;
if (rb_scan_args(argc, argv, "01", &buffer) == 0) {
return self;
}
StringValue(buffer);
if (!(spki = NETSCAPE_SPKI_b64_decode(RSTRING_PTR(buffer), -1))) {
- p = RSTRING_PTR(buffer);
+ p = (unsigned char *)RSTRING_PTR(buffer);
if (!(spki = d2i_NETSCAPE_SPKI(NULL, &p, RSTRING_LEN(buffer)))) {
ossl_raise(eSPKIError, NULL);
}
@@ -87,7 +87,7 @@ ossl_spki_to_der(VALUE self)
if ((len = i2d_NETSCAPE_SPKI(spki, NULL)) <= 0)
ossl_raise(eX509CertError, NULL);
str = rb_str_new(0, len);
- p = RSTRING_PTR(str);
+ p = (unsigned char *)RSTRING_PTR(str);
if (i2d_NETSCAPE_SPKI(spki, &p) <= 0)
ossl_raise(eX509CertError, NULL);
ossl_str_adjust(str, p);
@@ -172,7 +172,7 @@ ossl_spki_get_challenge(VALUE self)
return rb_str_new(0, 0);
}
- return rb_str_new(spki->spkac->challenge->data,
+ return rb_str_new((const char *)spki->spkac->challenge->data,
spki->spkac->challenge->length);
}