Project

General

Profile

Bug #1278 ยป openssl.patch

cfis (Charlie Savage), 03/13/2009 01:26 AM

View differences:

ext/openssl/openssl_missing.h (working copy)
#if !defined(PEM_write_bio_DSAPublicKey)
# define PEM_write_bio_DSAPublicKey(bp,x) \
PEM_ASN1_write_bio((int (*)())i2d_DSAPublicKey,\
PEM_ASN1_write_bio((i2d_of_void *)i2d_DSAPublicKey,\
PEM_STRING_DSA_PUBLIC,\
bp,(char *)x, NULL, NULL, 0, NULL, NULL)
#endif
#if !defined(DSAPrivateKey_dup)
# define DSAPrivateKey_dup(dsa) (DSA *)ASN1_dup((int (*)())i2d_DSAPrivateKey, \
# define DSAPrivateKey_dup(dsa) (DSA *)ASN1_dup((i2d_of_void *)i2d_DSAPrivateKey, \
(d2i_of_void *)d2i_DSAPrivateKey,(char *)dsa)
#endif
#if !defined(DSAPublicKey_dup)
# define DSAPublicKey_dup(dsa) (DSA *)ASN1_dup((int (*)())i2d_DSAPublicKey, \
# define DSAPublicKey_dup(dsa) (DSA *)ASN1_dup((i2d_of_void *)i2d_DSAPublicKey, \
(d2i_of_void *)d2i_DSAPublicKey,(char *)dsa)
#endif
#if !defined(X509_REVOKED_dup)
# define X509_REVOKED_dup(rev) (X509_REVOKED *)ASN1_dup((int (*)())i2d_X509_REVOKED, \
# define X509_REVOKED_dup(rev) (X509_REVOKED *)ASN1_dup((i2d_of_void *)i2d_X509_REVOKED, \
(d2i_of_void *)d2i_X509_REVOKED, (char *)rev)
#endif
#if !defined(PKCS7_SIGNER_INFO_dup)
# define PKCS7_SIGNER_INFO_dup(si) (PKCS7_SIGNER_INFO *)ASN1_dup((int (*)())i2d_PKCS7_SIGNER_INFO, \
# define PKCS7_SIGNER_INFO_dup(si) (PKCS7_SIGNER_INFO *)ASN1_dup((i2d_of_void *)i2d_PKCS7_SIGNER_INFO, \
(d2i_of_void *)d2i_PKCS7_SIGNER_INFO, (char *)si)
#endif
#if !defined(PKCS7_RECIP_INFO_dup)
# define PKCS7_RECIP_INFO_dup(ri) (PKCS7_RECIP_INFO *)ASN1_dup((int (*)())i2d_PKCS7_RECIP_INFO, \
# define PKCS7_RECIP_INFO_dup(ri) (PKCS7_RECIP_INFO *)ASN1_dup((i2d_of_void *)i2d_PKCS7_RECIP_INFO, \
(d2i_of_void *)d2i_PKCS7_RECIP_INFO, (char *)ri)
#endif
ext/openssl/ossl_engine.c (working copy)
if(!ENGINE_init(e))
ossl_raise(eEngineError, NULL);
ENGINE_ctrl(e, ENGINE_CTRL_SET_PASSWORD_CALLBACK,
0, NULL, (void(*)())ossl_pem_passwd_cb);
0, NULL, (void(*)(void))ossl_pem_passwd_cb);
ERR_clear_error();
return obj;
ext/openssl/ossl_pkey.c (working copy)
str = rb_str_new(0, EVP_PKEY_size(pkey)+16);
if (!EVP_SignFinal(&ctx, (unsigned char *)RSTRING_PTR(str), &buf_len, pkey))
ossl_raise(ePKeyError, NULL);
assert(buf_len <= RSTRING_LEN(str));
assert((long)buf_len <= RSTRING_LEN(str));
rb_str_set_len(str, buf_len);
return str;
ext/openssl/ossl_ssl.c (working copy)
rb_raise(rb_eArgError, "arg must be Time or nil");
}
SSL_CTX_flush_sessions(ctx, tm);
SSL_CTX_flush_sessions(ctx, (long)tm);
return self;
}
ext/openssl/ossl_ssl_session.c (working copy)
if (t == 0)
return Qnil;
return rb_funcall(rb_cTime, rb_intern("at"), 1, LONG2NUM(t));
return rb_funcall(rb_cTime, rb_intern("at"), 1, LONG2NUM((long)t));
}
/*
......
t = SSL_SESSION_get_timeout(ctx);
return ULONG2NUM(t);
return ULONG2NUM((unsigned long)t);
}
#define SSLSESSION_SET_TIME(func) \
......
\
t = NUM2ULONG(time_v); \
\
SSL_SESSION_set_##func(ctx, t); \
SSL_SESSION_set_##func(ctx, (long)t); \
\
return ossl_ssl_session_get_##func(self); \
}
    (1-1/1)