aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_pkcs7.c
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-25 06:50:55 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-25 06:50:55 +0000
commitb35031495aa90afed7f82c55d36ceb6382e9e62a (patch)
tree2f2862df8c9180afbb4acb0f1f746ebd8d5e3875 /ext/openssl/ossl_pkcs7.c
parente4bbe657dc9f11157c6b12afbea23b90ac153dab (diff)
downloadruby-b35031495aa90afed7f82c55d36ceb6382e9e62a.tar.gz
* ext/openssl/extconf.rb: add check for BN_rand_range() and
BN_pseudo_rand_range(). * ext/openssl/ossl_bn.c (ossl_bn_s_rand_range): should raise NotImplementedError if BN_rand_range() wan not defined. * ext/openssl/ossl_bn.c (ossl_bn_s_pseudo_rand_range): should raise NotImplementedError if BN_pseudo_rand_range() wan not defined. * ext/openssl/ossl_pkcs7.c (ossl_pkcs7_s_encrypt): avoid compiler warning for OpenSSL-0.9.6. * ext/openssl/ossl_pkcs7.c (ossl_pkcs7si_initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_pkcs7.c')
-rw-r--r--ext/openssl/ossl_pkcs7.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/ossl_pkcs7.c b/ext/openssl/ossl_pkcs7.c
index e8efdf4b69..c612eb43ff 100644
--- a/ext/openssl/ossl_pkcs7.c
+++ b/ext/openssl/ossl_pkcs7.c
@@ -226,7 +226,7 @@ ossl_pkcs7_s_encrypt(int argc, VALUE *argv, VALUE klass)
BIO_free(in);
rb_jump_tag(status);
}
- if(!(p7 = PKCS7_encrypt(x509s, in, ciph, flg))){
+ if(!(p7 = PKCS7_encrypt(x509s, in, (EVP_CIPHER*)ciph, flg))){
BIO_free(in);
sk_X509_pop_free(x509s, X509_free);
ossl_raise(ePKCS7Error, NULL);
@@ -665,7 +665,7 @@ ossl_pkcs7si_initialize(VALUE self, VALUE cert, VALUE key, VALUE digest)
pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */
x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */
md = GetDigestPtr(digest);
- if (!(PKCS7_SIGNER_INFO_set(p7si, x509, pkey, md))) {
+ if (!(PKCS7_SIGNER_INFO_set(p7si, x509, pkey, (EVP_MD*)md))) {
ossl_raise(ePKCS7Error, NULL);
}