znasir has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

Hope you are doing fine!

I want to ask that how can I upgrade the Openssl from 0.9 to 1.0.* in Strawberry Perl version 5.10.*?

PS: I do not want to upgrade the strawberry perl version as well as I am using windows environment. Thanks!

Replies are listed 'Best First'.
Re: Openssl upgrade in Strawberry Perl
by stevieb (Canon) on Oct 15, 2016 at 12:45 UTC

    When you cross-post to numerous sites, it's considered polite to inform people of that, so efforts aren't duplicated needlessly.

    As far as I know, you can't simply upgrade OpenSSL within a Strawberry installation. Also, Perl 5.10 was released way back in 2007, so it's probably best you upgrade the whole shebang anyways.

    berrybrew for Windows offers you a way to both upgrade your Perl (and OpenSSL), while providing you the ability to switch between Perl versions, and even move them around from system to system, copy instances, create template instances that you can restore to at any time, and even revert back to your original Strawberry Perl installation if you need to.

    First, take inventory of the Perl modules you have installed:

    perl -MCPAN -e 'autobundle;'

    ...after that runs, you'll end up with a file name as output. Eg: .../Bundle/Snapshot_2016_10_15_00.pm. Copy that file to say your desktop.

    Download the berrybrew zip file, and extract it in a directory on your system (but NOT c:\berrybrew, as this is the default location where we store our Perl instances). Then, open a cmd.exe window, and:

    cd berrybrew bin\berrybrew.exe config # close the current cmd.exe window, and open a new one berrybrew install 5.24.0_64 berrybrew switch 5.24.0_64 # close cmd.exe, open a new one

    Now, you've got the most recent version of Perl usable system-wide, and you've left your Strawberry install in place in case you need it. If you do, just run berrybrew off, and open a new cmd window. The closing/reopening of new cmd windows is required thanks to how Windows handles its environment variables.

    Now, reinstall all of your modules into the new version of Perl:

    cpan -i file://Desktop/Snapshot_2016_10_15_00.pm

    Make a backup of this freshly set up instance of Perl:

    berrybrew clone 5.24.0_64 5.24_template

    Now you're up-to-date with everything, ready to go.

    By the way, berrybrew uses Strawberry Perl portable edition for all of its instances.

      berrybrew is not a solution to the OPs question

        What?

        Although it was a little expansive, my solution avoids the OP from, on Windows, having to research out and install OpenSSL, provided an easy method of ensuring any testing was compartmentalized, ensured easy return to original configuration, and ensured that they didn't have to manually download individual copies of the Strawberry portable edition if and/or when things went wrong.

        If berrybrew isn't a solution to the problem, it's sure better than any manual work that would be required without it.

        ...or can you extrapolate on what you're saying here?

Re: Openssl upgrade in Strawberry Perl
by Anonymous Monk on Oct 16, 2016 at 01:39 UTC

    I want to ask that how can I upgrade the Openssl from 0.9 to 1.0.* in Strawberry Perl version 5.10.*?

    Go to openssl.org and download source code or binaries .... until you have a directory with the latest version like this

    openssl\bin\libeay32.dll openssl\exp\libeay32.exp openssl\lib\libeay32.a openssl\lib\libeay32.def openssl\lib\libeay32.lib openssl\include\openssl\...

    Copy the bin/lib/include that to strawberry perl directory c

    ...strawberryperl\c\bin\libeay32.dll ...strawberryperl\c\lib\libeay32.a ...strawberryperl\c\lib\libeay32.def ...strawberryperl\c\lib\libeay32.lib ...strawberryperl\c\include\openssl...

    You could try binaries from http://strawberryperl.com/package/kmx/64_libs/gcc49-2016Q4/

    After you have appropriate openssl binaries, then

    Then install / reinstall any perl modules that depend on openssl, like  cpan Net::SSLeay IO::Socket::SSL

    If it works it works, if it doesn't work, then you gotta work through each error .....

    A better idea is go to http://strawberryperl.com/releases.html and download a recent PortableZIP edition = suitable for "perl on USB stick" (you can move/rename the perl directory and it will still work)

    You can many different portablezip editions installed, as long as you use a different directory for each, they won't trip over each other, and they'll already have a resonably recent version of openssl