Skip to content

Remove unnecessary libssl dependency#188

Draft
toddr-bot wants to merge 1 commit into
cpan-authors:mainfrom
toddr-bot:koan.toddr.bot/remove-libssl-dependency
Draft

Remove unnecessary libssl dependency#188
toddr-bot wants to merge 1 commit into
cpan-authors:mainfrom
toddr-bot:koan.toddr.bot/remove-libssl-dependency

Conversation

@toddr-bot
Copy link
Copy Markdown
Contributor

What

Drop the unused libssl linkage and #include <openssl/ssl.h> — this module only calls libcrypto functions.

Why

RSA.xs performs key generation, encryption, signing, and verification using libcrypto's RSA/EVP API. It has never called any TLS function from libssl. The -lssl link flag and ssl.h include were inherited from early boilerplate but serve no purpose.

Removing them:

  • Reduces build dependencies (the module can now compile in environments where only libcrypto-dev is installed)
  • Eliminates unnecessary shared library loading at runtime
  • Cleans up the include list to match actual usage

How

  • RSA.xs: Remove #include <openssl/ssl.h> (line 22)
  • Makefile.PL: Change -lssl -lcrypto to -lcrypto
  • hints/MSWin32.pl: Query only pkg-config --libs libcrypto and remove ssl libraries from manual fallbacks

Testing

  • Clean build on OpenSSL 3.5.1 — compiles with zero warnings
  • Full test suite passes (26 test files)
  • ldd confirms only libcrypto.so.3 is linked, no libssl

🤖 Generated with Claude Code

This module performs RSA operations using libcrypto only — no TLS
functions from libssl are called. Remove the unused #include
<openssl/ssl.h> 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 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant