mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-04 02:08:49 -04:00
35 lines
1.3 KiB
Plaintext
35 lines
1.3 KiB
Plaintext
$NetBSD: patch-eg,v 1.1 2010/09/10 03:29:01 taca Exp $
|
|
|
|
* r18172: suppress warnings.
|
|
* r26835: backport fixes in 1.9.
|
|
|
|
--- ext/openssl/ossl_pkey.c.orig 2010-05-24 23:58:49.000000000 +0000
|
|
+++ ext/openssl/ossl_pkey.c
|
|
@@ -164,7 +164,7 @@ ossl_pkey_sign(VALUE self, VALUE digest,
|
|
{
|
|
EVP_PKEY *pkey;
|
|
EVP_MD_CTX ctx;
|
|
- int buf_len;
|
|
+ unsigned int buf_len;
|
|
VALUE str;
|
|
|
|
if (rb_funcall(self, id_private_q, 0, NULL) != Qtrue) {
|
|
@@ -175,7 +175,7 @@ ossl_pkey_sign(VALUE self, VALUE digest,
|
|
StringValue(data);
|
|
EVP_SignUpdate(&ctx, RSTRING_PTR(data), RSTRING_LEN(data));
|
|
str = rb_str_new(0, EVP_PKEY_size(pkey)+16);
|
|
- if (!EVP_SignFinal(&ctx, RSTRING_PTR(str), &buf_len, pkey))
|
|
+ if (!EVP_SignFinal(&ctx, (unsigned char *)RSTRING_PTR(str), &buf_len, pkey))
|
|
ossl_raise(ePKeyError, NULL);
|
|
assert((long)buf_len <= RSTRING_LEN(str));
|
|
rb_str_set_len(str, buf_len);
|
|
@@ -194,7 +194,7 @@ ossl_pkey_verify(VALUE self, VALUE diges
|
|
StringValue(sig);
|
|
StringValue(data);
|
|
EVP_VerifyUpdate(&ctx, RSTRING_PTR(data), RSTRING_LEN(data));
|
|
- switch (EVP_VerifyFinal(&ctx, RSTRING_PTR(sig), RSTRING_LEN(sig), pkey)) {
|
|
+ switch (EVP_VerifyFinal(&ctx, (unsigned char *)RSTRING_PTR(sig), RSTRING_LEN(sig), pkey)) {
|
|
case 0:
|
|
return Qfalse;
|
|
case 1:
|