[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

Re: [Openvpn-users] OpenVPN 2.0-rc1 compile problems on NetBSD 2.0 / OpenSSL 0.9.7d


  • Subject: Re: [Openvpn-users] OpenVPN 2.0-rc1 compile problems on NetBSD 2.0 / OpenSSL 0.9.7d
  • From: James Yonan <jim@xxxxxxxxx>
  • Date: Wed, 8 Dec 2004 18:57:50 -0700 (MST)

On Wed, 8 Dec 2004, Ed Ravin wrote:

> The support for OpenSSL 0.9.7 in OpenVPN 2.0-rc1 appears incomplete: I
> got the following error messages when trying to build it:
> 
>   ntlm.c: In function `create_des_keys':
>   ntlm.c:55: error: `des_cblock' undeclared (first use in this function)
>   ntlm.c:55: error: (Each undeclared identifier is reported only once
>   ntlm.c:55: error: for each function it appears in.)
>   ntlm.c:55: error: parse error before ')' token
> 
> Looking into ntlm.c, I saw whole bunch of other issues - a handful
> of functions are still called in the form des_XXXX instead of DES_XXX,
> and the arguments for the various DES_ functions that used a type
> of des_key_schedule in older OpenSSL versions now need an &DES_key_schedule
> instead.

The existing ntlm.c code, even though it's written for OpenSSL 0.9.6,
should build fine with 0.9.7 if the correct compatibility headers are
included.  In fact, we probably don't really want to change des_ to DES_
in this file because then it will break 0.9.6 compatibility.

Try the attached patch (against rc1) and let me know if it builds 
correctly.

James
--- openvpn-2.0_rc1/crypto.h	2004-12-02 00:16:36.000000000 -0600
+++ openvpn-2.0_rc1.1/crypto.h	2004-12-08 17:43:04.000000000 -0600
@@ -42,6 +42,7 @@
 #include <openssl/hmac.h>
 #include <openssl/des.h>
 #include <openssl/md5.h>
+#include <openssl/md4.h>
 #include <openssl/sha.h>
 #include <openssl/err.h>
 
@@ -49,6 +50,10 @@
 #include <openssl/engine.h>
 #endif
 
+#if SSLEAY_VERSION_NUMBER >= 0x00907000L
+#include <openssl/des_old.h>
+#endif
+
 #include "basic.h"
 #include "buffer.h"
 #include "packet_id.h"
--- openvpn-2.0_rc1/ntlm.c	2004-12-02 00:16:37.000000000 -0600
+++ openvpn-2.0_rc1.1/ntlm.c	2004-12-08 17:29:32.000000000 -0600
@@ -29,8 +29,6 @@
 
 #if NTLM
 
-#include <openssl/des.h>
-#include <openssl/md4.h>
 #include "common.h"
 #include "buffer.h"
 #include "misc.h"
@@ -39,6 +37,8 @@
 #include "proxy.h"
 #include "ntlm.h"
 #include "base64.h"
+#include "crypto.h"
+
 #include "memdbg.h"
 
 static void