Can anyone help a beginner *please*?

My ISP supplied me with the the following information;
platform   = OpenBSD/i386 2.5
perl       = 5.005_03
OpenSSL    = 0.9.3a
C compiler = gcc 2.5
libc       = bsd

When I ran Sampo's examples/sslcat.pl script via telnet by typing "perl
sslcat.pl" at the command line as follows I get;

mimosa:examples {105} perl sslcat.pl
localhost 443 get


SSL_connect 19562: 1 - error:140770FC:SSL
routines:SSL23_GET_SERVER_HELLO:unknown proto
col
-1SSL_connect 19562: 1 - error:140770FC:SSL
routines:SSL23_GET_SERVER_HELLO:unknown pro
tocol

-----------

Is that what I should have gotten?

I'm wondering if this has anything to do with my script failing which worked
for a month and now now longer works even though AuthorizeNet and my ISP
both claim nothing on their servers has changed.

The following is a simplified but hopefully executable segment of my
complete script;

#!/usr/bin/perl

# Flush buffers.
  $| = 1;

# Set output type.
  print STDOUT "Content-type: text/html\n\n";

# Turn on verbose SSLeay debugging.
  $Net::SSLeay::trace = 3;

# Set SSL version.
$Net::SSLeay::ssl_version = 2;
        # I've tried 1, 2 and 3.

$host = "www.authorize.net";
$port = "443";
$processing_script = "/scripts/authnet25/AuthRequest.asp";
$agent = "NAS/1.0";
$data = "LOGIN=testdrive&TYPE=NA&AMOUNT=49.95
         &NAME=John%20Doe&METHOD=VISA&CARDNUM=4007000000027
         &EXPDATE=09/99&ECHODATA=TRUE";

# Get the message length.
  $msgLength=length($data);

# This stuff is required by AuthorizeNet's server I'm told.
  $request  = "POST $processing_script HTTP/1.0\n";
  $request .= "Accept: www/source\n";
  $request .= "Accept: text/html\n";
  $request .= "Accept: text/plain\n";
  $request .= "User-Agent: $agentVersion\n";
  $request .= "Content-type: application/x-www-form-urlencoded\n";
# Add the message length.
  $request .= "Content-length: $msgLength\n\n";
# add the data.
  $request .= $data;

# Load the Net:SSLeay module.
use Net::SSLeay qw(sslcat);

# Send and receive data.
$reply = Net::SSLeay::sslcat($host, $port, $request);
#         or die "Can't connect to $host\n";

# Print the reply in the format we received it.
print STDOUT "$reply\n\n";

exit;
# EOF

-----------

My script returns the following;

mimosa:cgi-bin {112} an-ssl.cgi
Content-type: text/html

Opening connection to www.authorize.net:443 (0)
Creating SSL 2 context...
Creating SSL connection (context was '910848')...
Setting fd (ctx 910848, con 911104)...
Entering SSL negotiation phase...
SSLeay connect returned 1
Cipher `EXP-RC2-CBC-MD5'
Subject Name: /C=US/ST=Utah/L=Provo/O=NETSolutions International
Inc/OU=Transaction Pro
cessing/CN=www.authorize.net
Issuer  Name: /C=US/O=RSA Data Security, Inc./OU=Secure Server Certification
Authority
sslcat 5883: sending 321 bytes...
cat: /proc/5883/stat: No such file or directory
  write_all VM at entry=
cat: /proc/5883/stat: No such file or directory
  written so far 321:321 bytes (VM=)
waiting for reply...
cat: /proc/5883/stat: No such file or directory
  got 0:0 bytes (VM=).
Got 0 bytes.

------------

When I run the Sampo's test.pl script he supplied it returns;

mimosa:cgi-bin {114} perl test.pl
1..16
ok 1
ok 2
        Spawning a test server on port 1212, pid=17581...
ok 3
ok 4
Use of uninitialized value at examples/callback.pl line 47.
ok 5
        Sending 1 MB over localhost, may take a while (and some VM)...
                ...took 3 secs (341 KB/s)
ok 6
        Sending 1 MB over pipes, may take a while (and some VM)...
                ...took 4 secs (256 KB/s)
ok 7
    Now about to contact external sites...
        www.bacus.pt
        www.openssl.org
        www.apache-ssl.org
        www.cdw.com
        www.rsa.com
        developer.netscape.com
        banking.wellsfargo.com
        secure.worldgaming.net
        www.engelschall.com
    You have 5 seconds of time to hit Ctrl-C if you do not like this.
    So far there were no errors in tests.
    Following tests _will_ fail if you do not have network
    connectivity (or if the servers are down or have changed).
ok 8 www.bacus.pt
ok 9 www.openssl.org (Apache/1.3.6 (Unix) mod_perl/1.20 mod_ssl/2.3.5
OpenSSL/0.9.3a DA
V/0.9.8)
ok 10 www.apache-ssl.org (Apache/1.3.6 Ben-SSL/1.36 (Unix))
ok 11 www.cdw.com (Microsoft-IIS/4.0)
ok 12 www.rsa.com (Netscape-Enterprise/3.6)
ok 13 developer.netscape.com (Netscape-Enterprise/3.6)
ok 14 banking.wellsfargo.com (Netscape-Enterprise/3.6 SP2)
ok 15 secure.worldgaming.net (Stronghold/2.3 Apache/1.2.6 C2NetUS/2010)
ok 16 www.engelschall.com (Apache/1.3.6 (Unix) mod_perl/1.20 mod_ssl/2.3.5
OpenSSL/0.9.
3a DAV/0.9.8)
All tests completed OK.

----------

When I replace www.bacus.pt through out Sampo's script with
www.authorize.net it now returns;

mimosa:cgi-bin {116} perl test.pl
1..16
ok 1
ok 2
        Spawning a test server on port 1212, pid=16381...
ok 3
ok 4
Use of uninitialized value at examples/callback.pl line 47.
ok 5
        Sending 1 MB over localhost, may take a while (and some VM)...
                ...took 3 secs (341 KB/s)
ok 6
        Sending 1 MB over pipes, may take a while (and some VM)...
                ...took 3 secs (341 KB/s)
ok 7
    Now about to contact external sites...
        www.authorize.net
        www.openssl.org
        www.apache-ssl.org
        www.cdw.com
        www.rsa.com
        developer.netscape.com
        banking.wellsfargo.com
        secure.worldgaming.net
        www.engelschall.com
    You have 5 seconds of time to hit Ctrl-C if you do not like this.
    So far there were no errors in tests.
    Following tests _will_ fail if you do not have network
    connectivity (or if the servers are down or have changed).
SSL_write 24573: 1 - error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl
handshake failure
*** not ok 8 www.authorize.net

ok 9 www.openssl.org (Apache/1.3.6 (Unix) mod_perl/1.20 mod_ssl/2.3.5
OpenSSL/0.9.3a DA
V/0.9.8)
ok 10 www.apache-ssl.org (Apache/1.3.6 Ben-SSL/1.36 (Unix))
ok 11 www.cdw.com (Microsoft-IIS/4.0)
ok 12 www.rsa.com (Netscape-Enterprise/3.6)
ok 13 developer.netscape.com (Netscape-Enterprise/3.6)
ok 14 banking.wellsfargo.com (Netscape-Enterprise/3.6 SP2)
ok 15 secure.worldgaming.net (Stronghold/2.3 Apache/1.2.6 C2NetUS/2010)
ok 16 www.engelschall.com (Apache/1.3.6 (Unix) mod_perl/1.20 mod_ssl/2.3.5
OpenSSL/0.9.
3a DAV/0.9.8)
*** WARNING: There were 1 errors in the tests.

-----------

If I may impose on you what happens we you run Sampo's test.pl with
www.authorize.net substituted in place of www.bacus.pt?

What do you get if you run my script?

Russ
[EMAIL PROTECTED]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to