Name : perl-Net_SSLeay.pm
| |
Version : 1.25
| Vendor : Sampo Kellomaki < sampo_iki_fi>
|
Release : 1
| Date : 2004-05-21 08:27:04
|
Group : Applications/CPAN
| Source RPM : perl-Net_SSLeay.pm-1.25-1.src.rpm
|
Size : 0.44 MB
| |
Packager : Peter Pramberger < peter_pramberger_1012surf_net>
| |
Summary : Net_SSLeay.pm - Perl extension for using OpenSSL
|
Description :
There is a related module called Net::SSLeay::Handle included in this distribution that you might want to use instead. It has its own pod documentation.
This module offers some high level convinience functions for accessing web pages on SSL servers (for symmetry, same API is offered for accessing http servers, too), a sslcat() function for writing your own clients, and finally access to the SSL api of SSLeay/OpenSSL package so you can write servers or clients for more complicated applications.
For high level functions it is most convinient to import them to your main namespace as indicated in the synopsis.
Case 1 demonstrates typical invocation of get_https() to fetch an HTML page from secure server. The first argument provides host name or ip in dotted decimal notation of the remote server to contact. Second argument is the TCP port at the remote end (your own port is picked arbitrarily from high numbered ports as usual for TCP). The third argument is the URL of the page without the host name part. If in doubt consult HTTP specifications at < http://www.w3c.org>
Case 2 demonstrates full fledged use of get_https(). As can be seen, get_https() parses the response and response headers and returns them as a list, which can be captured in a hash for later reference. Also a fourth argument to get_https() is used to insert some additional headers in the request. make_headers() is a function that will convert a list or hash to such headers. By default get_https() supplies Host (make virtual hosting easy) and Accept (reportedly needed by IIS) headers.
Case 2b demonstrates how to get password protected page. Refer to HTTP protocol specifications for further details (e.g. RFC2617).
Case 3 invokes post_https() to submit a HTML/CGI form to secure server. First four arguments are equal to get_https() (note that empty string (\'\') is passed as header argument). The fifth argument is the contents of the form formatted according to CGI specification. In this case the helper function make_https() is used to do the formatting, but you could pass any string. The post_https() automatically adds Content-Type and Content-Length headers to the request.
Case 4 shows the fundamental sslcat() function (inspired in spirit by netcat utility :-). Its your swiss army knife that allows you to easily contact servers, send some data, and then get the response. You are responsible for formatting the data and parsing the response - sslcat() is just a transport.
Case 5 is a full invocation of sslcat() which allows return of errors as well as the server (peer) certificate.
The $trace global variable can be used to control the verbosity of high level functions. Level 0 guarantees silence, level 1 (the default) only emits error messages.
|
RPM found in directory: /packages/linux-pbone/archive/ftp.pramberger.at/systems/linux/contrib/rh73/i386 |