[32557] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3823 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Nov 23 03:09:20 2012

Date: Fri, 23 Nov 2012 00:09:04 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 23 Nov 2012     Volume: 11 Number: 3823

Today's topics:
    Re: IO::Select and PerlIO <ben@morrow.me.uk>
    Re: Trying to get SSL with client cert to work within P patrick.viet@gmail.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 22 Nov 2012 23:15:22 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: IO::Select and PerlIO
Message-Id: <a9o2o9-ck5.ln1@anubis.morrow.me.uk>


Quoth "Peter J. Holzer" <hjp-usenet2@hjp.at>:
> On 2012-11-22 07:22, Ben Morrow <ben@morrow.me.uk> wrote:
> > Quoth "Peter J. Holzer" <hjp-usenet2@hjp.at>:
> >> Does IO::Select take into account data buffered by PerlIO?
> >> 
> >> Specifically, I would like to do something like the following:
> >> 
> >> my $s = IO::Select->new();
> >> $s->add($socket_fh);
> >> 
> >> while (...) {
> >>     print $socket_fh "$request\n";
> >> 
> >>     while ($s->can_read(0)) {
> >
> > Thinking a little more about this, would something like this be
> > sufficient?
> >
> >     use IO::Pending qw/pending_read/;
> >
> >     while (pending_read($socket_fh) || $s->can_read(0)) {
> 
> Is this an idea for a new module? IO::Pending doesn't seem to exist.

Yes, this is an idea for a new extension which exports this information
to Perl space.

> Yes, that sounds useful.
> 
> > PerlIO provides the information at the C level, so it shouldn't be too
> > hard to export it to Perl, at least for real PerlIO filehandles.
> 
> I'll have a look at it.

I've got a basic implementation working but... it's not as simple as I
thought (surprise!). The flag PERLIO_F_RDBUF indicates if there is data
buffered, but it isn't cleared until next time you try to read. For
layers which support PerlIO_fast_gets (basically, :perlio and layers
derived from it), PerlIO_get_cnt can be used to check if there is
actually anything there; I'm not sure if anything can be done about
other cases.

Ben



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

Date: Thu, 22 Nov 2012 15:25:20 -0800 (PST)
From: patrick.viet@gmail.com
Subject: Re: Trying to get SSL with client cert to work within POE environment
Message-Id: <0bdcf574-0e9a-4bf5-9380-75ced55b7272@googlegroups.com>

On Thursday, 22 November 2012 18:52:46 UTC+11, patric...@learnosity.com  wr=
ote:
> > POE::Filter::SSL appears to have explicit support for verifying client
> > certificates against a custom CA. If you'd rather stick with SSLify, it
>=20
> > looks to me like you want to create a custom SSL context (using the
>=20
> > Net::SSLeay CTX_* functions) which will allow you to set any options yo=
u

OK so I managed to get a few things working with the POE::Filter::SSL, but =
it's not usable as is. For example, it's not properly installable with CPAN=
 (let alone available as a system package), it has a few bugs, and requires=
 very recent versions of different packages to work. The good news is that =
I can look at the source code of this module to get it to work as custom co=
ntext with SSLify.

Thanks for your help

--=20
  Patrick Viet


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 3823
***************************************


home help back first fref pref prev next nref lref last post