$NetBSD: patch-bd,v 1.1 2005/11/02 08:56:40 taca Exp $

--- ext/openssl/ossl.c.orig	2005-09-10 09:54:29.000000000 +0900
+++ ext/openssl/ossl.c
@@ -278,9 +278,14 @@ ossl_raise(VALUE exc, const char *fmt, .
     va_list args;
     char buf[BUFSIZ];
     const char *msg;
-    long e = ERR_peek_last_error();
+    long e;
     int len = 0;
 
+#ifdef HAVE_ERR_PEEK_LAST_ERROR
+    e = ERR_peek_last_error();
+#else
+    e = ERR_peek_error();
+#endif
     if (fmt) {
 	va_start(args, fmt);
 	len = vsnprintf(buf, BUFSIZ, fmt, args);
@@ -382,6 +387,7 @@ Init_openssl()
      */
     /* CRYPTO_malloc_init(); */
     /* ENGINE_load_builtin_engines(); */
+    OpenSSL_add_ssl_algorithms();
     OpenSSL_add_all_algorithms();
     ERR_load_crypto_strings();
     SSL_load_error_strings();
