Skip Menu |

This queue is for tickets about the Web-ID CPAN distribution.

Report information
The Basics
Id: 84215
Status: resolved
Priority: 0/
Queue: Web-ID

People
Owner: perl [...] toby.ink
Requestors: JONASS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Web::ID uses the non-Perl tool openssl, with hardcoded paths to it (and skipping test t/04webid.t on 32bit Windows, but maybe for other reasons). How about instead using (recently emerged) Alien::OpenSSL - if that is not deemed too young and unstable yet? Thanks for this nice module! - Jonas
Subject: Suggestion: use Alien::OpenSSL
Forgot to add title before - not sure if this will do, or it will just cause extra noise :-/
Alien::OpenSSL's focus is installing the linkable C library in a place where (XS) Perl modules can link to it. Web-ID uses the OpenSSL command-line tool, but Alien::OpenSSL doesn't have a documented method the get the path for this. I'm installing Alien::OpenSSL now (after setting the ALIEN_FORCE environment variable to true) to see if Alien::OpenSSL installs the command-line tool in any kind of predictable location.
This works... use File::Spec; use File::ShareDir qw(dist_dir); my $f = File::Spec->catfile( dist_dir("Alien-OpenSSL"), "bin", "openssl", ); system($f, "version");
Subject: Re: [rt.cpan.org #84215] Suggestion: use Alien::OpenSSL
Date: Sat, 18 May 2013 18:48:30 +0200
To: bug-Web-ID [...] rt.cpan.org
From: Jonas Smedegaard <dr [...] jones.dk>
Quoting Toby Inkster via RT (2013-05-18 15:19:40) Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=84215 > > > Alien::OpenSSL's focus is installing the linkable C library in a place > where (XS) Perl modules can link to it. > > Web-ID uses the OpenSSL command-line tool, but Alien::OpenSSL doesn't > have a documented method the get the path for this. > > I'm installing Alien::OpenSSL now (after setting the ALIEN_FORCE > environment variable to true) to see if Alien::OpenSSL installs the > command-line tool in any kind of predictable location.
My point of suggesting Alien::OpenSSL was to abstract away from executing openssl binary directly. Ideal would be IMO for an OpenSSL module to exist which would offer a perl interface for openssl functionality, and either use Alien::OpenSSL or or some alternative means of reaching the openssl binary (or, possibly more reliable, XS to libssl library). Such alternative could for Debian be to rely on the Debian packaging system and use a path hardcoded at Perl module build time. ...but since no such ideal module exist I suggested the second-best of relying on Alien::OpenSSL - but did not imagine you would then subvert the suggestion into being a way of then depending on a Perl-provided openssl while still bypassing it and executing openssl directly :-/ - Jonas -- * Jonas Smedegaard - idealist & Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private
But that is all Alien::OpenSSL does. It doesn't provide any API for Perl to call the OpenSSL library - it just installs it, and provides methods that tell compilers where OpenSSL is installed. e.g.: $ perl -MAlien::OpenSSL -E'say Alien::OpenSSL->libs' -L/home/tai/.perlbrew/libs/perl-5.16.2@default/lib/perl5/auto/share/dist/Alien-OpenSSL/lib -lssl -lcrypto It doesn't provide any way for me to call OpenSSL; just a way to locate OpenSSL files. For the most part, Web-ID uses Crypt-X509, a pure Perl implementation of X.509. It only uses the OpenSSL binary for certificate generation. It *may* be possible to perform the certificate generation using Crypt::OpenSSL::CA. Patches welcome. :-)
The Makefile.PL in Web-ID 1.923 will check to see if OpenSSL is available at "standard" paths (including /usr/bin/openssl), and if not, will add Alien-OpenSSL to Web-ID's dependencies list. The OpenSSL binary installed by Alien-OpenSSL will be used by Web::ID::Certificate::Generator and t/04webid.t.