summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_ns_spki.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/ossl_ns_spki.c')
-rw-r--r--ext/openssl/ossl_ns_spki.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/ossl_ns_spki.c b/ext/openssl/ossl_ns_spki.c
index fde8957..bf828cb 100644
--- a/ext/openssl/ossl_ns_spki.c
+++ b/ext/openssl/ossl_ns_spki.c
@@ -106,7 +106,7 @@ ossl_spki_to_pem(VALUE self)
if (!(data = NETSCAPE_SPKI_b64_encode(spki))) {
ossl_raise(eSPKIError, NULL);
}
- str = ossl_buf2str(data, strlen(data));
+ str = ossl_buf2str(data, rb_long2int(strlen(data)));
return str;
}
@@ -184,7 +184,7 @@ ossl_spki_set_challenge(VALUE self, VALUE str)
StringValue(str);
GetSPKI(self, spki);
if (!ASN1_STRING_set(spki->spkac->challenge, RSTRING_PTR(str),
- RSTRING_LEN(str))) {
+ RSTRING_LENINT(str))) {
ossl_raise(eSPKIError, NULL);
}