• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

lib/Crypt/OpenSSL/H03-May-2022-297178

t/H03-May-2022-106

ChangesH A D28-Oct-2021807 3418

LICENSEH A D28-Oct-202118 KiB379292

MANIFESTH A D28-Oct-2021127 1111

META.jsonH A D28-Oct-20212 KiB8382

META.ymlH A D28-Oct-20211 KiB4645

Makefile.PLH A D28-Oct-2021792 3728

README.mdH A D28-Oct-20212.5 KiB7442

cpanfileH A D28-Oct-2021178 118

minil.tomlH A D28-Oct-2021107 74

README.md

1[![Build Status](https://travis-ci.org/akiym/Crypt-OpenSSL-Guess.svg?branch=master)](https://travis-ci.org/akiym/Crypt-OpenSSL-Guess)
2# NAME
3
4Crypt::OpenSSL::Guess - Guess OpenSSL include path
5
6# SYNOPSIS
7
8    use ExtUtils::MakerMaker;
9    use Crypt::OpenSSL::Guess;
10
11    WriteMakefile(
12        # ...
13        LIBS => ['-lssl -lcrypto ' . openssl_lib_paths()],
14        INC  => openssl_inc_paths(), # guess include path or get from $ENV{OPENSSL_PREFIX}
15    );
16
17# DESCRIPTION
18
19Crypt::OpenSSL::Guess provides helpers to guess OpenSSL include path on any platforms.
20
21Often macOS's homebrew OpenSSL cause a problem on installation due to include path is not added.
22Some CPAN module provides to modify include path with configure-args, but [Carton](https://metacpan.org/pod/Carton) or [Module::CPANfile](https://metacpan.org/pod/Module%3A%3ACPANfile)
23is not supported to pass configure-args to each modules. Crypt::OpenSSL::\* modules should use it on your [Makefile.PL](https://metacpan.org/pod/Makefile.PL).
24
25This module resolves the include path by [Net::SSLeay](https://metacpan.org/pod/Net%3A%3ASSLeay)'s workaround.
26Original code is taken from `inc/Module/Install/PRIVATE/Net/SSLeay.pm` by [Net::SSLeay](https://metacpan.org/pod/Net%3A%3ASSLeay).
27
28# FUNCTIONS
29
30- openssl\_inc\_paths()
31
32    This functions returns include paths in the format passed to CC. If OpenSSL could not find, then empty string is returned.
33
34        openssl_inc_paths(); # on macOS: "-I/usr/local/opt/openssl/include"
35
36- openssl\_lib\_paths()
37
38    This functions returns library paths in the format passed to CC. If OpenSSL could not find, then empty string is returned.
39
40        openssl_lib_paths(); # on macOS: "-L/usr/local/opt/openssl/lib"
41
42- find\_openssl\_prefix(\[$dir\])
43
44    This function returns OpenSSL's prefix. If set `OPENSSL_PREFIX` environment variable, you can overwrite the return value.
45
46        find_openssl_prefix(); # on macOS: "/usr/local/opt/openssl"
47
48- find\_openssl\_exec($prefix)
49
50    This functions returns OpenSSL's executable path.
51
52        find_openssl_exec(); # on macOS: "/usr/local/opt/openssl/bin/openssl"
53
54- ($major, $minor, $letter) = openssl\_version()
55
56    This functions returns OpenSSL's version as major, minor, letter.
57
58        openssl_version(); # ("1.0", "2", "n")
59
60# SEE ALSO
61
62[Net::SSLeay](https://metacpan.org/pod/Net%3A%3ASSLeay)
63
64# LICENSE
65
66Copyright (C) Takumi Akiyama.
67
68This library is free software; you can redistribute it and/or modify
69it under the same terms as Perl itself.
70
71# AUTHOR
72
73Takumi Akiyama <t.akiym@gmail.com>
74