From bc6cc4153a036d7d8f3931eab080a10b3c88991a Mon Sep 17 00:00:00 2001 From: Toddr Bot Date: Fri, 22 May 2026 02:33:01 +0000 Subject: [PATCH] Remove unnecessary libssl dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This module performs RSA operations using libcrypto only — no TLS functions from libssl are called. Remove the unused #include from RSA.xs, drop -lssl from the Unix link flags in Makefile.PL, and update the Windows hints to query/link only libcrypto. This reduces build dependencies, allowing the module to compile in environments where only libcrypto headers and libraries are installed. Co-Authored-By: Claude Opus 4.6 --- Makefile.PL | 2 +- RSA.xs | 1 - hints/MSWin32.pl | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 3f43d36..5413eae 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -11,7 +11,7 @@ print "OpenSSL version: $major.$minor $patch", "\n"; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. -my $libs = ' -lssl -lcrypto'; +my $libs = ' -lcrypto'; if ( $Config{osname} eq 'aix' ) { $libs = $libs . ' -lz'; } diff --git a/RSA.xs b/RSA.xs index 238bebb..58f4f4c 100644 --- a/RSA.xs +++ b/RSA.xs @@ -19,7 +19,6 @@ #endif #include #include -#include #include #if OPENSSL_VERSION_NUMBER >= 0x30000000L #include diff --git a/hints/MSWin32.pl b/hints/MSWin32.pl index 3044da7..2bbe56d 100644 --- a/hints/MSWin32.pl +++ b/hints/MSWin32.pl @@ -1,10 +1,10 @@ use Config; use Crypt::OpenSSL::Guess 0.11 qw(openssl_lib_paths); -if (my $libs = `pkg-config --libs libssl libcrypto 2>nul`) { +if (my $libs = `pkg-config --libs libcrypto 2>nul`) { # strawberry perl has pkg-config $self->{LIBS} = [openssl_lib_paths() . " $libs"]; } else { - $self->{LIBS} = [openssl_lib_paths() . '-lssleay32 -llibeay32'] if $Config{cc} =~ /cl/; # msvc with ActivePerl - $self->{LIBS} = [openssl_lib_paths() . '-lssl32 -leay32'] if $Config{gccversion}; # gcc + $self->{LIBS} = [openssl_lib_paths() . '-llibeay32'] if $Config{cc} =~ /cl/; # msvc with ActivePerl + $self->{LIBS} = [openssl_lib_paths() . '-leay32'] if $Config{gccversion}; # gcc }