From 93e1583d735bac916ac815ee2737a9596dccad0f Mon Sep 17 00:00:00 2001 From: emboss Date: Sun, 26 Jun 2011 01:32:03 +0000 Subject: * ext/openssl/extconf.rb * ext/openssl/ossl_missing.h/.c: add ASN1_put_eoc if missing. * ext/openssl/ossl_asn1.c: introduce ossl_asn1_object_size and ossl_asn1_put_object to wrap functionality depending on OpenSSL version in use. Fixes [ Ruby 1.9 - Bug #4916 ] reported by Hiroshi Nakamura. [ruby-core:37286] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/openssl_missing.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ext/openssl/openssl_missing.c') diff --git a/ext/openssl/openssl_missing.c b/ext/openssl/openssl_missing.c index 3ffe651b5b..f88dd403be 100644 --- a/ext/openssl/openssl_missing.c +++ b/ext/openssl/openssl_missing.c @@ -342,3 +342,15 @@ PEM_def_callback(char *buf, int num, int w, void *key) } #endif +#if !defined(HAVE_ASN1_PUT_EOC) +int +ASN1_put_eoc(unsigned char **pp) +{ + unsigned char *p = *pp; + *p++ = 0; + *p++ = 0; + *pp = p; + return 2; +} +#endif + -- cgit v1.2.3