1Crypt::OpenSSL::Guess(3U)ser Contributed Perl DocumentatiCornypt::OpenSSL::Guess(3)
2
3
4

NAME

6       Crypt::OpenSSL::Guess - Guess OpenSSL include path
7

SYNOPSIS

9           use ExtUtils::MakeMaker;
10           use Crypt::OpenSSL::Guess;
11
12           WriteMakefile(
13               # ...
14               LIBS => [openssl_lib_paths() . ' -lssl -lcrypto'],
15               INC  => openssl_inc_paths(), # guess include path or get from $ENV{OPENSSL_PREFIX}
16           );
17

DESCRIPTION

19       Crypt::OpenSSL::Guess provides helpers to guess OpenSSL include path on
20       any platforms.
21
22       Often macOS's homebrew OpenSSL cause a problem on installation due to
23       include path is not added.  Some CPAN module provides to modify include
24       path with configure-args, but Carton or Module::CPANfile is not
25       supported to pass configure-args to each modules. Crypt::OpenSSL::*
26       modules should use it on your Makefile.PL.
27
28       This module resolves the include path by Net::SSLeay's workaround.
29       Original code is taken from "inc/Module/Install/PRIVATE/Net/SSLeay.pm"
30       by Net::SSLeay.
31

FUNCTIONS

33       openssl_inc_paths()
34           This functions returns include paths in the format passed to CC. If
35           OpenSSL could not find, then empty string is returned.
36
37               openssl_inc_paths(); # on macOS: "-I/usr/local/opt/openssl/include"
38
39       openssl_lib_paths()
40           This functions returns library paths in the format passed to CC. If
41           OpenSSL could not find, then empty string is returned.
42
43               openssl_lib_paths(); # on macOS: "-L/usr/local/opt/openssl/lib"
44
45       find_openssl_prefix([$dir])
46           This function returns OpenSSL's prefix. If set "OPENSSL_PREFIX"
47           environment variable, you can overwrite the return value.
48
49               find_openssl_prefix(); # on macOS: "/usr/local/opt/openssl"
50
51       find_openssl_exec($prefix)
52           This functions returns OpenSSL's executable path.
53
54               find_openssl_exec(); # on macOS: "/usr/local/opt/openssl/bin/openssl"
55
56       ($major, $minor, $letter) = openssl_version()
57           This functions returns OpenSSL's version as major, minor, letter.
58
59               openssl_version(); # ("1.0", "2", "n")
60

SEE ALSO

62       Net::SSLeay
63

LICENSE

65       Copyright (C) Takumi Akiyama.
66
67       This library is free software; you can redistribute it and/or modify it
68       under the same terms as Perl itself.
69

AUTHOR

71       Takumi Akiyama <t.akiym@gmail.com>
72
73
74
75perl v5.36.0                      2022-07-22          Crypt::OpenSSL::Guess(3)
Impressum