CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
PPM install of SSLeay

 



mozkill
Novice

Mar 4, 2003, 12:56 PM

Post #1 of 11 (3953 views)
PPM install of SSLeay Can't Post

As you all know, installing Net_SSLeay.pm-1.22 using CPAN is easy, and works great.

My problem is that for the first time, I need to develop a script that supports SSL on windows, and ActiveState perl 5.8 uses PPM as the package installer, and I cannot get CPAN to work in this windows installation, and I don't know why. Obviously, PPM does not have the SSLeay package up in the activestate repositories.

The only option I can think of is to use Visual C++ 6.x to compile the entire perl distribution with SSLeay in it and then compile my scripts to executables that i can place on windows machines.

I only have 1 year of college C++ experience and I dont really want to do this.

Can someone give me an idea of what I should really be doing here?


davorg
Thaumaturge / Moderator

Mar 5, 2003, 1:43 AM

Post #2 of 11 (3939 views)
Re: [mozkill] PPM install of SSLeay [In reply to] Can't Post

You could try emailing ActiveState and asking them to add the module to their repository. They are usually pretty good with those requests.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


mozkill
Novice

Mar 6, 2003, 9:54 AM

Post #3 of 11 (3934 views)
Re: [davorg] PPM install of SSLeay [In reply to] Can't Post

i have made some progress installing it, but I am still stuck. i am really close though, and it does not involve calling Active State.

basically, I used Active State PPM to install the newest CPAN::Bundle and then i typed "install Net::SSL" which will also automatically install SSLeay "IF" it were successful. i also unzipped and installed c:\openssl

my problem now is that the "make test" does not work. basically, during the CPAN setup, it asked where my tar.exe, gzip.exe, nmake.exe, and other programs were located and I skipped through that section and took the defaults, which resulted in CPAN not being able to build things.

Can anyone recommend what I need to do to setup those non-windows programs? I don't want to have to buy a copy of MKS toolkit. I do not have the nmake.exe that comes with Visual C++6.0, which i also cannot afford to buy. Should i find a free distribution of unix tools. Or , should i scrap it altogether and just use Cygwin?

HELP!



(This post was edited by mozkill on Mar 6, 2003, 10:10 AM)


Jasmine
Administrator / Moderator

Mar 6, 2003, 12:53 PM

Post #4 of 11 (3931 views)
Re: [mozkill] PPM install of SSLeay [In reply to] Can't Post

You can download nmake for free: http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe.

If you have winzip or other command-line zip program, point CPAN.pm to that. You can grab tar for Windows at ftp://ftp.gnu.org/gnu/tar/ and gzip at ftp://ftp.gnu.org/gnu/gzip/.


mozkill
Novice

Mar 6, 2003, 3:34 PM

Post #5 of 11 (3928 views)
Re: [Jasmine] PPM install of SSLeay [In reply to] Can't Post

one question:

is this the normal/usual way that "Windows Perl" people handle this? i am really curious what the most common solution is, so that I can make sure that anything i try to build within CPAN will work...

on a linux system, i would be comfortable with all of this, but i dont know how CPAN is supposed to behave on windows... i have no experience with it


(This post was edited by mozkill on Mar 6, 2003, 4:14 PM)


Jasmine
Administrator / Moderator

Mar 6, 2003, 6:04 PM

Post #6 of 11 (3923 views)
Re: [mozkill] PPM install of SSLeay [In reply to] Can't Post

I've seen this solution recommended many times; I've also seen Cygwin recommended as a solution probably as many times.

Personally, I've never needed a module that wasn't in the PPM repository (one of the reasons I chose to not upgrade to ActivePerl 5.8.0 is that 5.6.1's repository seemed more complete) or a module that wasn't happy just being copied into the directory tree.

Because of this, I may not be the one to ask if it's the "Windows Perl" way.


mozkill
Novice

Mar 7, 2003, 10:14 AM

Post #7 of 11 (3919 views)
Re: [Jasmine] PPM install of SSLeay [In reply to] Can't Post

THANK YOU! You gave me a good hint. I downgraded to ActivePerl 5.6.1.635 and now I have the following ssl stuf available, which is all i need:

4. Crypt-OpenSSL-Random [0.03]
5. Crypt-OpenSSL-RSA [0.12]
6. Crypt-SSLeay [0.17.1] OpenSSL glue that provides LWP https support
7. IO-Socket-SSL [0.75] a SSL socket interface class
8. Net-Daemon-SSL [1.0] perl extensions for portable ssl daemons
9. Net-Server [0.81] Extensible, general Perl server engine
10. Net_SSLeay [1.05] Perl extension for using OpenSSL
11. OpenCA-OpenSSL [0.4.51] Perl Crypto Extention to OpenSSL

Unfortunately, I cannot install any of them. When I try typing 'install Net_SSLeay' in PPM, I get the following message: Error: no suitable installation target found for package Crypt-SSLeay. This is because the PPM packages that are available are UNIX packages and not Windows packages. Here is my 'describe' output in PPM:

ppm> describe Net_SSLeay
====================
Name: Net_SSLeay
Version: 1.21
Author: Sampo Kellomaki (sampo@iki.fi)
Title: Net_SSLeay
Abstract: Perl extension for using OpenSSL or SSLeay
Location: ActiveState PPM2 Repository
Available Platforms:
1. i686-linux-thread-multi

NOTE: I tried 'install Time::HiRes' and that worked fine.

At this point, I think I am going to go back to Perl 5.8 and try to compile it manually again using CPAN. Im not expecting to be successful.


(This post was edited by mozkill on Mar 7, 2003, 11:08 AM)


Jasmine
Administrator / Moderator

Mar 9, 2003, 7:48 PM

Post #8 of 11 (3905 views)
Re: [mozkill] PPM install of SSLeay [In reply to] Can't Post

At your ppm prompt, type:


Code
install http://www.atlcon.net/downloads/opensrs/SF/Net_SSLeay.pm.ppd


It worked -- I tested it (ActivePerl 5.6.1 on XP)

So all you need it to find the url to the ppd (which may be a task unto itself), and install it like above.


mozkill
Novice

Mar 10, 2003, 9:30 AM

Post #9 of 11 (3901 views)
Re: [Jasmine] PPM install of SSLeay [In reply to] Can't Post

you were right. that worked beautifully. Thanks soooooo much. I learned a lot from this. You rock! :-)

Also, I tried it on Perl 5.8 and the module does not seem to be compatible with it, and so I am stuck with Perl 5.6, but thats ok. Thanks again. :-)

When I get a simple example working with that, I will post it for others to peruse.


(This post was edited by mozkill on Mar 10, 2003, 9:31 AM)


mozkill
Novice

Mar 10, 2003, 10:49 AM

Post #10 of 11 (3896 views)
Re: [mozkill] PPM install of SSLeay [In reply to] Can't Post

Ok, basically, after I installed the PPM package, I still had to find some pre-compiled .DLL files from the openSSL distribution. The hard thing was finding a SSLEAY32.DLL file that came in a package with a matching LIBEAY32.DLL file. I wanted to skip the work of trying to compile this thing. Anyways, I found the stuff, and finally got it working.

The following script works, just edit it to point at your favorite site that delivers a SSL cert, and it should accept it and make a connection. I tested it and it works fine for me:

----------------------
#!/usr/bin/perl

use Net::SSLeay qw(get_https make_headers make_form);

print "Content-type: text/html\n\n";

#Uncomment the following line to enable tracing (for debugging)
#values are: 0=no debugging, 1=ciphers, 2=trace, 3=dump data
$Net::SSLeay::trace = 2;

#send data via SSLeay and gather encrypted reply.

$host = 'www.yoursite.com';
$script = '/login.jsp';
$port = '443';

$Net::SSLeay::ssl_version = 3;

($replyData, $response, %reply_headers) = get_https($host, $port, "$script");

####Parse the reponse from the gateway.
@replyPairs = split(/&/,$replyData);
foreach $replyPair (@replyPairs)
{
($name,$value) = split(/=/,$replyPair);
$value =~ s/\+/ /g;
$value =~ s/%(..)/pack("c",hex($1))/ge;
$reply{$name} .= "\0" if (defined($reply{$name}));
$reply{$name} .= "$value";
}

####OUTPUT SECTION:
#following is a generic unprocessed output of the gateway's response.
#you will need to change the code to format it to your site's look and feel
#and give your users a more informative result.

print "replyData =\n$replyData\nresponse = $response\nreply headers:\n";
foreach $key (keys %reply_headers)
{
print "$key: $reply_headers{$key}\n";
}


mozkill
Novice

Mar 18, 2003, 9:10 AM

Post #11 of 11 (3886 views)
Re: [mozkill] PPM install of SSLeay [In reply to] Can't Post

furthermore, the Net_SSLeay PPM package in perl 5.6.1 will not install on Windows XP. It will only work on Win2K.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives