Net::SSLeay with Socket or IO::Socket::SSL

--nextPart11722546.tys0faM3bO
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

hi folks
hi guru of perl

in the examples of Net::SSLeay, it shows various examples that use low-leve=
l=20
functions use Socket. what are the differences if we re writing the example=
s=20
with IO::Socket::SSL

all testimonials are welcome

=2D-=20
=A0http://pgp.mit.edu:11371/pks/lookup?op=3Dget&search=3D0x092164A7
=A0gpg --keyserver pgp.mit.edu --recv-key 092164A7

--nextPart11722546.tys0faM3bO
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBOOI9EtXI/OwkhZKcRApU2AJ4/ZY16HnsgSOF+aWSplIefioYQ5gCdFSrZ
ivc5gIknrCeYoMbiFtiSSYs=
=nUf0
-----END PGP SIGNATURE-----

--nextPart11722546.tys0faM3bO--
0
ml
8/2/2011 11:58:53 PM
perl.beginners 29388 articles. 4 followers. Follow

2 Replies
761 Views

Similar Articles

[PageSpeed] 36

>>>>> "mfe" == ml@smtp fakessh eu <ml@smtp.fakessh.eu> writes:

  mfe> in the examples of Net::SSLeay, it shows various examples that
  mfe> use low-level functions use Socket. what are the differences if
  mfe> we re writing the examples with IO::Socket::SSL


just use IO::Socket::SSL. then all the code is almost the same as when
using IO::Socket. the only differences are adding in the cert info and
minor other differences. there is plenty of stuff on how to code with
plain sockets which also usually works well with IO::Socket. using low
level Socket.pm calls is almost never needed and is clunky. a simple
connect is just:

	my $sock = IO::Socket::INET->new( 'host:port' ) ;

with the Socket.pm api you would need a whole section of code for
that. if you need more, the key/value api is easy to use and it easily
modified to be IO::Socket::SSL.

uri

-- 
Uri Guttman  --  uri AT perlhunter DOT com  ---  http://www.perlhunter.com --
------------  Perl Developer Recruiting and Placement Services  -------------
-----  Perl Code Review, Architecture, Development, Training, Support -------
0
uri
8/3/2011 12:12:02 AM
--nextPart2275792.t5OpBVhO3h
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Le mercredi 3 ao=FBt 2011 02:12, Uri Guttman a =E9crit=A0:
> >>>>> "mfe" =3D=3D ml@smtp fakessh eu <ml@smtp.fakessh.eu> writes:
>
>   mfe> in the examples of Net::SSLeay, it shows various examples that
>   mfe> use low-level functions use Socket. what are the differences if
>   mfe> we re writing the examples with IO::Socket::SSL
>
>
> just use IO::Socket::SSL. then all the code is almost the same as when
> using IO::Socket. the only differences are adding in the cert info and
> minor other differences. there is plenty of stuff on how to code with
> plain sockets which also usually works well with IO::Socket. using low
> level Socket.pm calls is almost never needed and is clunky. a simple
> connect is just:
>
> 	my $sock =3D IO::Socket::INET->new( 'host:port' ) ;
>
> with the Socket.pm api you would need a whole section of code for
> that. if you need more, the key/value api is easy to use and it easily
> modified to be IO::Socket::SSL.
>
> uri


I'm not much can be in perl Fu. but I can not run this example
that are present in the bundle IO::Socket::SSL

the server starts well but the client not starts well
The only changes I have made on the certificate and the key
key file and cert file are well present in the folder
# eg modification for exemple

if(!($sock =3D IO::Socket::SSL->new( PeerAddr =3D> 'localhost',
				   PeerPort =3D> '8000',
				   Proto    =3D> 'tcp',
				   SSL_use_cert =3D> 1,
				   SSL_verify_mode =3D> 0x01,
                                   SSL_key_file    =3D> 'key.txt',
                                   SSL_cert_file   =3D> 'cert.txt',
				   SSL_passwd_cb =3D> sub { return "" },
				 )))

I get the following error after starting the client
~]$ perl Desktop/IO-Socket-SSL-1.44/example/ssl_client.pl
unable to create socket: IO::Socket::INET6 configuration=20
failederror:00000000:lib(0):func(0):reason(0)

all testimonials are welcome


=2D-=20
=A0http://pgp.mit.edu:11371/pks/lookup?op=3Dget&search=3D0x092164A7
=A0gpg --keyserver pgp.mit.edu --recv-key 092164A7

--nextPart2275792.t5OpBVhO3h
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBOOKKytXI/OwkhZKcRAombAJ40rCuMohC/aVgMFXQlqLOmXQMHSQCfRni/
CMq7vVDq1TBQ1zl7gHsr3jU=
=XErG
-----END PGP SIGNATURE-----

--nextPart2275792.t5OpBVhO3h--
0
ml
8/3/2011 1:21:48 AM
Reply: