NT perl SSL

1999-03-31 Thread Andy Shaw

Hi all,

My continued efforts to install Net::SSLeay on NT have hit another
hurdle.

Firstly I have,

1. Built openssl-0.9.1c without asm to build the win32dll's.
2. Copied this entire directory structure toit's installation directory.
3. Renames out32dll to bin so that Makefile.pl in Net::SSLeay can find
ssleay
4. Altered Makefile.pl to check for ssleay.exe not ssleay
5. Finally got a make file to build the Perl.

Now running nmake install gives 
c:\openssl/include\bn.h(266) : error C2143: syntax error : missing ';'
before '-'
c:\openssl/include\bn.h(266) : error C2238: unexpected token(s)
preceding ';'
c:\openssl/include\bn.h(417) : error C2143: syntax error : missing ')'
before '-'
c:\openssl/include\bn.h(417) : error C2059: syntax error : '-'
c:\openssl/include\bn.h(417) : error C2059: syntax error : ')'
c:\openssl/include\bn.h(426) : error C2143: syntax error : missing ')'
before '-'
c:\openssl/include\bn.h(426) : error C2059: syntax error : '-'
c:\openssl/include\bn.h(426) : error C2501: 'PL_na' : missing
decl-specifiers
c:\openssl/include\bn.h(426) : error C2062: type 'unsigned long'
unexpected
c:\openssl/include\bn.h(426) : error C2501: 'b' : missing
decl-specifiers
c:\openssl/include\bn.h(426) : warning C4228: nonstandard extension used
: qualifiers after comma in declarator list are ignored
c:\openssl/include\bn.h(426) : error C2062: type 'int' unexpected
c:\openssl/include\bn.h(426) : error C2059: syntax error : ')'
c:\openssl/include\bn.h(426) : error C2501: 'nb' : missing
decl-specifiers
c:\openssl/include\bn.h(426) : warning C4228: nonstandard extension used
: qualifiers after comma in declarator list are ignored
c:\openssl/include\asn1.h(138) : fatal error C1903: unable to recover
from previous error(s); stopping compilation
NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
Stop.

What am I doing wrong? Why is this so hard?

Andy

-- 

Andy Shaw
[EMAIL PROTECTED]
Phone: +44 (0)1223 715002
__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: NT perl SSL

1999-03-31 Thread dougc

Andy,
I just went throught the considerable pain in almost exactly what you
have
done so far. I was extremly lucky to get the help of the folks on
this and
some other news groups. I am including 4 messages that detail many
steps that
need to be taken to fix files in the build process. Read all the
messages first
then see what your files look like, then take the steps slowly. Thats
what I
did and was finally able to compile yesterday. I did need to get a
new
Makefile.PL for the net::ssleay that had the correct set of
libraries. I
would be happy to send you that if you need it. Hope this helps. Here
goes

From: "Francois Orsini" [EMAIL PROTECTED]
To: dougc@lynxhub
Subject: Re: Win 32 DLL library  NET_SSLEAY
Date: Sat, 20 Mar 1999 14:28:53 -0800


Doug,

To get you moving, Here is what you need to do to fix your
compilation problem. I used Net_SSLeay 1.0.3, SSLeay 0.9.0b
and MSVC++ 6.0

1) The \use\local\ssl\include\bn.h file contains a  bn_blinding_st
structure
 definition with a "mod" member.  Rename it to "modnum".

2) In the \usr\local\ssl\include\ssl.h file, a function declaration
used a argument
name of "list", which appears to be an MSVC reserved word, as this
generates a
compiler error (under VC6 at least).  Rename the argument to
"listref". 
NOTE: (2 instances of this type of error, in ssl.h)

3) ssleay.xs - Conversion errors with regards to the
SSL_CTX_set_verify function. 
Attempting to convert a (SV *) to a (void *) - This is easy to
fix:
   
SSL_CTX_set_verify(ctx,mode,(int(*)(void))ssleay_ctx_verify_callback_g
lue);

4) If you get some undefined for RAND_seed(), RAND_xxx(), etc...:
   Add: #include rand.h
   in ssleay.xs before "buffer.h"


Date: Sat, 20 Mar 1999 17:37:44 -0500
From: Jack Velte [EMAIL PROTECTED]
Subject: Compiling Crypt::SSLeay on Windows with VC++
To: dougc@lynxhub


Manually add the 3 ssl libraries to Crypt::SSLeay Makefile.  I couldn't get
makefile.pl to write the libraries correctly to the created Makefile.  I
added them to the EXTRALIBS and LDLOADLIBS lines.  You probably want to use
the path to the output of Your compilation in step 0.  :-)

"C:/Perl/local/openssl-SNAP-19990314-0330/out32dll/libeay32.lib"
"C:/Perl/local/openssl-SNAP-19990314-0330/out32dll/RSAglue.lib"
"C:/Perl/local/openssl-SNAP-19990314-0330/out32dll/ssleay32.lib"

-- 
3
-- 

Fix reserved words in openssl ssl.h and bn.h function prototype
headers.  My system needs the same fix for older versions of ssleay.
(Back to SSLeay-0.9.0b at least.)  Since you already compiled
openssl, and we are only changing function prototypes, this should
have no effect on Crypt::SSLeay.

I don't know why the C compiler complains about these reserved words when
compiling SSLeay/OpenSSL suite compiles, but it does.
--

ssl.h:
('list')
void SSL_set_client_CA_list(SSL *s, STACK *list);
-
void SSL_set_client_CA_list(SSL *s, STACK *list_x);

('list')
void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK *list);
-
void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK *list_x);

('mod')
bn.h:
 BIGNUM *mod; /* just a reference */
-
 BIGNUM *mod_x; /* just a reference */

('mod')
BN_BLINDING *BN_BLINDING_new(BIGNUM *A,BIGNUM *Ai,BIGNUM *mod);
-
BN_BLINDING *BN_BLINDING_new(BIGNUM *A,BIGNUM *Ai,BIGNUM *mod_x);

('na')
void bn_mul_normal(BN_ULONG *r,BN_ULONG *a,int na,BN_ULONG *b,int nb);
-
void bn_mul_normal(BN_ULONG *r,BN_ULONG *a,int na_x,BN_ULONG *b,int nb);

--
4
--

copy the openssl libraries to somewhere on your path.  (or your perl5lib
path -- i have my lib directory on both for now.)

--
"nmake" should now compile Crypt::SSLeay
"nmake install" installs the library.

now if you use 

new HTTP::Request('GET', "https://www.foo.com/"); 

the LWP library will automatically use the SSL libraries.

a simple test downloading a secure page worked for me.

-jack

From: "Francois Orsini" [EMAIL PROTECTED]
To: dougc@lynxhub
Subject: Re: Win 32 DLL library  NET_SSLEAY
Date: Sat, 20 Mar 1999 15:21:44 -0800


I know what it is...
all the functions must be declared ANSI (PROTO)...

so make sure the args type is declared within the function ()
such as:
static int
not_here(char *s)
{


}

You need to do this for all of them...
I must have done it but do not remember...

if it is too much hassle for you : i'll send you my ssleay.xs

Hope this helps,

--francois

-Original Message-
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: Francois Orsini [EMAIL PROTECTED]
Date: Saturday, March 20, 1999 3:11 PM
Subject: Re: Win 32 DLL library  NET_SSLEAY


Francois,
I made good progress with your help, thanks so much. I have now
gotten past the compile problem for SSLeay.c, but have run into
something strange