summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl.h
diff options
context:
space:
mode:
authortechnorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-08 15:02:04 +0000
committertechnorama <technorama@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-08 15:02:04 +0000
commit18342ff8e00ebe27584786276a68d99767a2c38d (patch)
tree9e7f4f09dace24fe7af05763aa9dbb6ae67550b8 /ext/openssl/ossl.h
parentf5be4ddc8d2d76f8d3543c5ecfd852199b20b7d2 (diff)
import OpenSSL from trunk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl.h')
-rw-r--r--ext/openssl/ossl.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h
index c0325229c1..b11614560e 100644
--- a/ext/openssl/ossl.h
+++ b/ext/openssl/ossl.h
@@ -17,6 +17,11 @@
extern "C" {
#endif
+#if 0
+ mOSSL = rb_define_module("OpenSSL");
+ mX509 = rb_define_module_under(mOSSL, "X509");
+#endif
+
/*
* OpenSSL has defined RFILE and Ruby has defined RFILE - so undef it!
*/
@@ -40,8 +45,8 @@ extern "C" {
#endif
#if defined(_WIN32)
-# define OpenFile WINAPI_OpenFile
# define OSSL_NO_CONF_API 1
+# include <winsock2.h>
#endif
#include <errno.h>
#include <openssl/err.h>
@@ -64,9 +69,6 @@ extern "C" {
# define OSSL_OCSP_ENABLED
# include <openssl/ocsp.h>
#endif
-#if defined(_WIN32)
-# undef OpenFile
-#endif
/*
* Common Module
@@ -117,11 +119,10 @@ VALUE ossl_x509crl_sk2ary(STACK_OF(X509_CRL) *crl);
VALUE ossl_buf2str(char *buf, int len);
#define ossl_str_adjust(str, p) \
do{\
- int len = RSTRING(str)->len;\
- int newlen = (p) - (unsigned char*)RSTRING(str)->ptr;\
+ int len = RSTRING_LEN(str);\
+ int newlen = (p) - (unsigned char*)RSTRING_PTR(str);\
assert(newlen <= len);\
- RSTRING(str)->len = newlen;\
- RSTRING(str)->ptr[newlen] = 0;\
+ rb_str_set_len(str, newlen);\
}while(0)
/*