LWP-Protocol-https-6.10/000755 000765 000024 00000000000 13766676120 016336 5ustar00olafaldersstaff000000 000000 LWP-Protocol-https-6.10/perltidyrc000644 000765 000024 00000000330 13766676120 020436 0ustar00olafaldersstaff000000 000000 --blank-lines-before-packages=0 --iterations=2 --no-outdent-long-comments -b -bar -boc -ci=4 -i=4 -l=78 -nolq -se -wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" LWP-Protocol-https-6.10/perlcriticrc000644 000765 000024 00000004405 13766676120 020751 0ustar00olafaldersstaff000000 000000 severity = 3 verbose = 11 theme = core + pbp + bugs + maintenance + cosmetic + complexity + security + tests + moose exclude = Subroutines::ProhibitCallsToUndeclaredSubs [BuiltinFunctions::ProhibitStringySplit] severity = 3 [CodeLayout::RequireTrailingCommas] severity = 3 [ControlStructures::ProhibitCStyleForLoops] severity = 3 [InputOutput::RequireCheckedSyscalls] functions = :builtins exclude_functions = sleep severity = 3 [Moose::RequireCleanNamespace] modules = Moose Moose::Role MooseX::Role::Parameterized Moose::Util::TypeConstraints cleaners = namespace::autoclean [NamingConventions::Capitalization] package_exemptions = [A-Z]\w+|minFraud file_lexical_variables = [A-Z]\w+|[^A-Z]+ global_variables = :starts_with_upper scoped_lexical_variables = [A-Z]\w+|[^A-Z]+ severity = 3 # Given our code base, leaving this at 5 would be a huge pain [Subroutines::ProhibitManyArgs] max_arguments = 10 [RegularExpressions::ProhibitComplexRegexes] max_characters = 200 [RegularExpressions::ProhibitUnusualDelimiters] severity = 3 [Subroutines::ProhibitUnusedPrivateSubroutines] private_name_regex = _(?!build)\w+ skip_when_using = Moo::Role Moose::Role MooseX::Role::Parameterized Role::Tiny Test::Class::Moose::Role [TestingAndDebugging::ProhibitNoWarnings] allow = redefine [ValuesAndExpressions::ProhibitEmptyQuotes] severity = 3 [ValuesAndExpressions::ProhibitInterpolationOfLiterals] severity = 3 [ValuesAndExpressions::RequireUpperCaseHeredocTerminator] severity = 3 [Variables::ProhibitPackageVars] add_packages = Test::Builder [TestingAndDebugging::RequireUseStrict] [TestingAndDebugging::RequireUseWarnings] [-ControlStructures::ProhibitCascadingIfElse] [-ErrorHandling::RequireCarping] [-InputOutput::RequireBriefOpen] [-ValuesAndExpressions::ProhibitConstantPragma] # No need for /xsm everywhere [-RegularExpressions::RequireDotMatchAnything] [-RegularExpressions::RequireExtendedFormatting] [-RegularExpressions::RequireLineBoundaryMatching] [-Subroutines::ProhibitExplicitReturnUndef] # http://stackoverflow.com/questions/2275317/why-does-perlcritic-dislike-using-shift-to-populate-subroutine-variables [-Subroutines::RequireArgUnpacking] [-Subroutines::RequireFinalReturn] # "use v5.14" is more readable than "use 5.014" [-ValuesAndExpressions::ProhibitVersionStrings] LWP-Protocol-https-6.10/cpanfile000644 000765 000024 00000002414 13766676120 020043 0ustar00olafaldersstaff000000 000000 on 'configure' => sub { requires "ExtUtils::MakeMaker" => "0"; requires "perl" => "5.008001"; }; on 'runtime' => sub { requires "base" => "0"; requires "IO::Socket::SSL" => "1.54"; requires "LWP::Protocol::http" => "0"; #requires "LWP::Protocol::http::SocketMethods" => "0"; requires "LWP::UserAgent" => "6.06"; requires "Mozilla::CA" => "20180117"; requires "Net::HTTPS" => "6"; requires "perl" => "5.008001"; requires "strict" => "0"; }; on 'test' => sub { requires "File::Temp" => "0"; requires "IO::Select" => "0"; requires "IO::Socket::INET" => "0"; requires "IO::Socket::SSL" => "1.54"; requires "IO::Socket::SSL::Utils" => "0"; requires "LWP::UserAgent" => "6.06"; requires "perl" => "5.008001"; requires "Socket" => "0"; requires "Test::More" => "0.96"; requires "Test::RequiresInternet" => "0"; requires "warnings" => "0"; }; on 'develop' => sub { requires 'Test::CheckManifest' => '1.29'; requires 'Test::CleanNamespaces'; requires "Test::CPAN::Changes" => "0.19"; requires 'Test::CPAN::Meta'; requires 'Test::Kwalitee'; requires 'Test::Kwalitee' => '1.22'; requires 'Test::Pod::Spelling::CommonMistakes' => '1.000'; #requires 'Try::Tiny' => '0.24'; }; LWP-Protocol-https-6.10/Install000644 000765 000024 00000001747 13766676120 017700 0ustar00olafaldersstaff000000 000000 This is the Perl distribution LWP-Protocol-https. Installing LWP-Protocol-https is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm LWP::Protocol::https If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S LWP::Protocol::https ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan LWP::Protocol::https ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Makefile.PL % make && make test Then install it: % make install If you are installing into a system-wide directory, you may need to run: % sudo make install ## Documentation LWP-Protocol-https documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc LWP::Protocol::https LWP-Protocol-https-6.10/Changes000644 000765 000024 00000004670 13766676120 017640 0ustar00olafaldersstaff000000 000000 Release history for LWP-Protocol-https 6.10 2020-12-17 15:42:06Z - Fix #39 - prevent user env from breaking the test (GH#63) (Gianni Ceccarelli) - Include Net::SSLeay in reported prereqs (GH#60) (Olaf Alders) - Use GitHub as a bug tracker (GH#59) (Olaf Alders) 6.09 2020-07-16 13:33:05Z - Make available the version of SSL/TLS protocol used in the connection (GH#56) (Jon Jensen) 6.08 2020-03-23 20:19:22Z (TRIAL RELEASE) - Add defined check (GH#53) (Mohammad S Anwar) - Fix copyright year (GH#55) (Olaf Alders) - Upgrade Mozilla::CA dependency; originally #26 by dolmen (GH#54) (Shoichi Kaji) - Adds coverage tests (GH#51) (Juan Julin Merelo Guervs) - Migrated to DZil (GH PR#30) - Moved bug tracking from RT to GitHub (GH#48) (Olaf Alders) 6.07 2017-02-19 - Cleaned up the Changes log - Explicitly add hostname for SNI to start_SSL (GH PR#17) - Fix the license name - Update some documentation on SSL args - Fix bug when checking for Mozilla::CA (GH PR#29) 6.06 2014-04-18 - Merge pull request #12 from drieux/subjectAltName - Merge pull request #9 from chorny/master - Updated libwww requirement to 6.06 to fix failing t/proxy.t test cases. - Getopt::Long isn't actually used - Merge pull request #7 from noxxi/master - better diagnostics in case of failures in apache.t - Merge pull request #8 from cpansprout/patch-1 - correct behavior for https_proxy, this goes together with change to - libwww-perl cb80c2ddb7, new method _upgrade_sock in LWP::Protocol::https - Typo fix: envirionment =~ s/io/o/ - support for subjectAltName 6.04 2013-04-29 - Fix IO::Socket::SSL warnings when not verifying hostname. - Doc spelling fix. 6.03 2012-02-18 - Skip test if offline [RT#74163] - Typo fixes - Restore perl-5.8.1 compatibility. 6.02 2011-03-27 - Initial release of LWP-Protocol-https as a separate distribution. There are no code changes besides setting the version number since libwww-perl-6.01. - The LWP::Protocol::https module used to be bundled with the libwww-perl distribution, but it was unbundled in v6.02 in order to be able to declare its dependencies properly for the CPAN tool chain. Applications that need https support can just declare their dependency on LWP::Protocol::https and will no longer need to know what underlying modules to install. LWP-Protocol-https-6.10/MANIFEST000644 000765 000024 00000001202 13766676120 017462 0ustar00olafaldersstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.017. CONTRIBUTING.md Changes Install LICENSE MANIFEST META.json META.yml Makefile.PL cpanfile dist.ini lib/LWP/Protocol/https.pm perlcriticrc perltidyrc t/00-report-prereqs.dd t/00-report-prereqs.t t/apache.t t/https_proxy.t t/method_in_san.t tidyall.ini xt/author/00-compile.t xt/author/clean-namespaces.t xt/author/distmeta.t xt/author/eol.t xt/author/kwalitee.t xt/author/minimum-version.t xt/author/mojibake.t xt/author/pod-coverage.t xt/author/pod-spell.t xt/author/pod-syntax.t xt/author/portability.t xt/author/test-version.t xt/release/changes_has_content.t LWP-Protocol-https-6.10/LICENSE000644 000765 000024 00000043644 13766676120 017356 0ustar00olafaldersstaff000000 000000 This software is copyright (c) 1997 by Gisle Aas. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 1997 by Gisle Aas. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 1997 by Gisle Aas. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End LWP-Protocol-https-6.10/t/000755 000765 000024 00000000000 13766676120 016601 5ustar00olafaldersstaff000000 000000 LWP-Protocol-https-6.10/xt/000755 000765 000024 00000000000 13766676120 016771 5ustar00olafaldersstaff000000 000000 LWP-Protocol-https-6.10/META.yml000644 000765 000024 00000040263 13766676120 017614 0ustar00olafaldersstaff000000 000000 --- abstract: 'Provide https support for LWP::UserAgent' author: - 'Gisle Aas ' build_requires: ExtUtils::MakeMaker: '0' File::Spec: '0' File::Temp: '0' IO::Select: '0' IO::Socket::INET: '0' IO::Socket::SSL: '1.54' IO::Socket::SSL::Utils: '0' LWP::UserAgent: '6.06' Socket: '0' Test::More: '0.96' Test::RequiresInternet: '0' perl: '5.008001' warnings: '0' configure_requires: ExtUtils::MakeMaker: '0' perl: '5.008001' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: LWP-Protocol-https no_index: directory: - t - xt provides: LWP::Protocol::https: file: lib/LWP/Protocol/https.pm version: '6.10' LWP::Protocol::https::Socket: file: lib/LWP/Protocol/https.pm version: '6.10' requires: IO::Socket::SSL: '1.54' LWP::Protocol::http: '0' LWP::UserAgent: '6.06' Mozilla::CA: '20180117' Net::HTTPS: '6' base: '0' perl: '5.008001' strict: '0' resources: IRC: irc://irc.perl.org/#lwp MailingList: mailto:libwww@perl.org bugtracker: https://github.com/libwww-perl/LWP-Protocol-https/issues homepage: https://github.com/libwww-perl/LWP-Protocol-https repository: https://github.com/libwww-perl/LWP-Protocol-https.git version: '6.10' x_Dist_Zilla: perl: version: '5.030003' plugins: - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - LICENSE - META.json - Makefile.PL - README.md exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: Git::GatherDir version: '2.047' - class: Dist::Zilla::Plugin::PruneCruft name: PruneCruft version: '6.017' - class: Dist::Zilla::Plugin::MetaConfig name: MetaConfig version: '6.017' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: MetaProvides::Package/AUTOVIV/:InstallModulesPM version: '6.017' include_underscores: 0 Dist::Zilla::Role::MetaProvider::Provider: $Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002004' inherit_missing: '1' inherit_version: '1' meta_noindex: '1' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000037' version: '0.006' name: MetaProvides::Package version: '2.004003' - class: Dist::Zilla::Plugin::MetaNoIndex name: MetaNoIndex version: '6.017' - class: Dist::Zilla::Plugin::MetaYAML name: MetaYAML version: '6.017' - class: Dist::Zilla::Plugin::MetaJSON name: MetaJSON version: '6.017' - class: Dist::Zilla::Plugin::MetaResources name: MetaResources version: '6.017' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - dist.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.29.2 repo_root: . name: Git::Check version: '2.047' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: git_version: 2.29.2 include_authors: 0 include_releaser: 1 order_by: name paths: [] name: Git::Contributors version: '0.035' - class: Dist::Zilla::Plugin::GithubMeta name: GithubMeta version: '0.58' - class: Dist::Zilla::Plugin::Authority name: Authority version: '1.009' - class: Dist::Zilla::Plugin::Manifest name: Manifest version: '6.017' - class: Dist::Zilla::Plugin::License name: License version: '6.017' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: Markdown_Readme version: '0.163250' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: recommends name: '@Git::VersionManager/pluginbundle version' version: '6.017' - class: Dist::Zilla::Plugin::RewriteVersion::Transitional config: Dist::Zilla::Plugin::RewriteVersion: add_tarball_name: 0 finders: - ':ExecFiles' - ':InstallModules' global: 0 skip_version_provider: 0 Dist::Zilla::Plugin::RewriteVersion::Transitional: {} name: '@Git::VersionManager/RewriteVersion::Transitional' version: '0.009' - class: Dist::Zilla::Plugin::MetaProvides::Update name: '@Git::VersionManager/MetaProvides::Update' version: '0.007' - class: Dist::Zilla::Plugin::CopyFilesFromRelease config: Dist::Zilla::Plugin::CopyFilesFromRelease: filename: - Changes match: [] name: '@Git::VersionManager/CopyFilesFromRelease' version: '0.007' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: v%V%n%n%c signoff: 0 Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - LICENSE - META.json - Makefile.PL allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.29.2 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Git::VersionManager/release snapshot' version: '2.047' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: v6.10 tag_format: v%V tag_message: v%V Dist::Zilla::Role::Git::Repo: git_version: 2.29.2 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Git::VersionManager/Git::Tag' version: '2.047' - class: Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional config: Dist::Zilla::Plugin::BumpVersionAfterRelease: finders: - ':ExecFiles' - ':InstallModules' global: 0 munge_makefile_pl: 1 Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional: {} name: '@Git::VersionManager/BumpVersionAfterRelease::Transitional' version: '0.009' - class: Dist::Zilla::Plugin::NextRelease name: '@Git::VersionManager/NextRelease' version: '6.017' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: 'increment $VERSION after %v release' signoff: 0 Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Build.PL - Changes - Makefile.PL allow_dirty_match: - (?^:^lib/.*\.pm$) changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.29.2 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Git::VersionManager/post-release commit' version: '2.047' - class: Dist::Zilla::Plugin::Prereqs::FromCPANfile name: Prereqs::FromCPANfile version: '0.08' - class: Dist::Zilla::Plugin::MakeMaker::Awesome config: Dist::Zilla::Plugin::MakeMaker: make_path: make version: '6.017' Dist::Zilla::Role::TestRunner: default_jobs: '4' version: '6.017' name: MakeMaker::Awesome version: '0.48' - class: Dist::Zilla::Plugin::CheckChangeLog name: CheckChangeLog version: '0.05' - class: Dist::Zilla::Plugin::CheckChangesHasContent name: CheckChangesHasContent version: '0.011' - class: Dist::Zilla::Plugin::Test::Kwalitee config: Dist::Zilla::Plugin::Test::Kwalitee: filename: xt/author/kwalitee.t skiptest: - has_readme name: Test::Kwalitee version: '2.12' - class: Dist::Zilla::Plugin::MojibakeTests name: MojibakeTests version: '0.8' - class: Dist::Zilla::Plugin::Test::Version name: Test::Version version: '1.09' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: Test::ReportPrereqs version: '0.028' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: '1' fail_on_warning: author fake_home: 0 filename: xt/author/00-compile.t module_finder: - ':InstallModules' needs_display: 0 phase: develop script_finder: - ':PerlExecFiles' skips: [] switch: [] name: Test::Compile version: '2.058' - class: Dist::Zilla::Plugin::Test::Portability config: Dist::Zilla::Plugin::Test::Portability: options: '' name: Test::Portability version: '2.001000' - class: Dist::Zilla::Plugin::Test::CleanNamespaces config: Dist::Zilla::Plugin::Test::CleanNamespaces: filename: xt/author/clean-namespaces.t skips: [] name: Test::CleanNamespaces version: '0.006' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':ExecFiles' - ':InstallModules' - ':TestFiles' trailing_whitespace: 1 name: Test::EOL version: '0.19' - class: Dist::Zilla::Plugin::MetaTests name: MetaTests version: '6.017' - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: Test::ChangesHasContent version: '0.011' - class: Dist::Zilla::Plugin::Test::MinimumVersion config: Dist::Zilla::Plugin::Test::MinimumVersion: max_target_perl: ~ name: Test::MinimumVersion version: '2.000010' - class: Dist::Zilla::Plugin::PodSyntaxTests name: PodSyntaxTests version: '6.017' - class: Dist::Zilla::Plugin::Test::Pod::Coverage::Configurable name: Test::Pod::Coverage::Configurable version: '0.07' - class: Dist::Zilla::Plugin::Test::PodSpelling config: Dist::Zilla::Plugin::Test::PodSpelling: directories: - bin - lib spell_cmd: 'aspell list' stopwords: [] wordlist: Pod::Wordlist name: Test::PodSpelling version: '2.007005' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: '4' name: RunExtraTests version: '0.029' - class: Dist::Zilla::Plugin::CheckStrictVersion name: CheckStrictVersion version: '0.001' - class: Dist::Zilla::Plugin::CopyFilesFromBuild name: CopyFilesFromBuild version: '0.170880' - class: Dist::Zilla::Plugin::TestRelease name: TestRelease version: '6.017' - class: Dist::Zilla::Plugin::ConfirmRelease name: ConfirmRelease version: '6.017' - class: Dist::Zilla::Plugin::UploadToCPAN name: UploadToCPAN version: '6.017' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: git_version: 2.29.2 repo_root: . name: Git::Push version: '2.047' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.017' - class: Dist::Zilla::Plugin::FinderCode name: MetaProvides::Package/AUTOVIV/:InstallModulesPM version: '6.017' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '6.017' x_authority: cpan:GAAS x_contributors: - 'Adam Kennedy ' - 'Adam Sjogren ' - 'Alexandr Ciornii ' - 'Alexey Tourbin ' - 'Alex Kapranoff ' - 'amire80 ' - 'Andreas J. Koenig ' - 'Bill Mann ' - 'Bron Gondwana ' - 'Chase Whitener ' - 'Christopher J. Madsen ' - 'cpansprout ' - 'Dan Book ' - 'Daniel Hedlund ' - 'David E. Wheeler ' - 'David Golden ' - 'DAVIDRW ' - 'drieux ' - 'Father Chrysostomos ' - 'FWILES ' - 'Gavin Peters ' - 'Gianni Ceccarelli ' - 'Gisle Aas ' - 'Graeme Thompson ' - 'Hans-H. Froehlich ' - 'Ian Kilgore ' - 'Jacob J ' - 'Jakub Wilk ' - 'jefflee ' - 'JJ Merelo ' - 'john9art ' - 'Jon Jensen ' - 'Karen Etheridge ' - 'Leo Lapworth ' - 'Mark Stosberg ' - 'Michael G. Schwern ' - 'Mike Schilli ' - 'Mohammad S Anwar ' - 'murphy ' - 'Olaf Alders ' - 'Ondrej Hanak ' - 'Peter Rabbitson ' - 'phrstbrn ' - 'Randy Stauner ' - 'Robert Stone ' - 'Rolf Grossmann ' - 'ruff ' - 'sasao ' - 'Sean M. Burke ' - 'Shoichi Kaji ' - 'Slaven Rezic ' - 'Spiros Denaxas ' - 'Steffen Ullrich ' - 'Steve Hay ' - 'Tim Couzins ' - 'Todd Lipcon ' - 'Tom Hukins ' - 'Tony Finch ' - 'Toru Yamaguchi ' - 'uid39246 ' - 'Ville Skyttä ' - 'Yuri Karaban ' - 'Yury Zavarin ' - 'Zefram ' x_generated_by_perl: v5.30.3 x_serialization_backend: 'YAML::Tiny version 1.73' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' LWP-Protocol-https-6.10/META.json000644 000765 000024 00000061602 13766676120 017764 0ustar00olafaldersstaff000000 000000 { "abstract" : "Provide https support for LWP::UserAgent", "author" : [ "Gisle Aas " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "LWP-Protocol-https", "no_index" : { "directory" : [ "t", "xt" ] }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0", "perl" : "5.008001" }, "suggests" : { "JSON::PP" : "2.27300" } }, "develop" : { "recommends" : { "Dist::Zilla::PluginBundle::Git::VersionManager" : "0.007" }, "requires" : { "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Pod::Coverage::TrustPod" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::CheckManifest" : "1.29", "Test::CleanNamespaces" : "0.15", "Test::EOL" : "0", "Test::Kwalitee" : "1.22", "Test::MinimumVersion" : "0", "Test::Mojibake" : "0", "Test::More" : "0.94", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08", "Test::Pod::Spelling::CommonMistakes" : "1.000", "Test::Portability::Files" : "0", "Test::Spelling" : "0.12", "Test::Version" : "1" } }, "runtime" : { "requires" : { "IO::Socket::SSL" : "1.54", "LWP::Protocol::http" : "0", "LWP::UserAgent" : "6.06", "Mozilla::CA" : "20180117", "Net::HTTPS" : "6", "base" : "0", "perl" : "5.008001", "strict" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "File::Temp" : "0", "IO::Select" : "0", "IO::Socket::INET" : "0", "IO::Socket::SSL" : "1.54", "IO::Socket::SSL::Utils" : "0", "LWP::UserAgent" : "6.06", "Socket" : "0", "Test::More" : "0.96", "Test::RequiresInternet" : "0", "perl" : "5.008001", "warnings" : "0" } } }, "provides" : { "LWP::Protocol::https" : { "file" : "lib/LWP/Protocol/https.pm", "version" : "6.10" }, "LWP::Protocol::https::Socket" : { "file" : "lib/LWP/Protocol/https.pm", "version" : "6.10" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/libwww-perl/LWP-Protocol-https/issues" }, "homepage" : "https://github.com/libwww-perl/LWP-Protocol-https", "repository" : { "type" : "git", "url" : "https://github.com/libwww-perl/LWP-Protocol-https.git", "web" : "https://github.com/libwww-perl/LWP-Protocol-https" }, "x_IRC" : "irc://irc.perl.org/#lwp", "x_MailingList" : "mailto:libwww@perl.org" }, "version" : "6.10", "x_Dist_Zilla" : { "perl" : { "version" : "5.030003" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "LICENSE", "META.json", "Makefile.PL", "README.md" ], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "Git::GatherDir", "version" : "2.047" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "PruneCruft", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "MetaConfig", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.017" } ], "include_underscores" : 0 }, "Dist::Zilla::Role::MetaProvider::Provider" : { "$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002004", "inherit_missing" : 1, "inherit_version" : 1, "meta_noindex" : 1 }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000037", "version" : "0.006" } }, "name" : "MetaProvides::Package", "version" : "2.004003" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "MetaNoIndex", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "MetaYAML", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "MetaJSON", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "MetaResources", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "dist.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.29.2", "repo_root" : "." } }, "name" : "Git::Check", "version" : "2.047" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "git_version" : "2.29.2", "include_authors" : 0, "include_releaser" : 1, "order_by" : "name", "paths" : [] } }, "name" : "Git::Contributors", "version" : "0.035" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "GithubMeta", "version" : "0.58" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "Authority", "version" : "1.009" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "Manifest", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "License", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "Markdown_Readme", "version" : "0.163250" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "recommends" } }, "name" : "@Git::VersionManager/pluginbundle version", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::RewriteVersion::Transitional", "config" : { "Dist::Zilla::Plugin::RewriteVersion" : { "add_tarball_name" : 0, "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 0, "skip_version_provider" : 0 }, "Dist::Zilla::Plugin::RewriteVersion::Transitional" : {} }, "name" : "@Git::VersionManager/RewriteVersion::Transitional", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Update", "name" : "@Git::VersionManager/MetaProvides::Update", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", "config" : { "Dist::Zilla::Plugin::CopyFilesFromRelease" : { "filename" : [ "Changes" ], "match" : [] } }, "name" : "@Git::VersionManager/CopyFilesFromRelease", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "v%V%n%n%c", "signoff" : 0 }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "LICENSE", "META.json", "Makefile.PL" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.29.2", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Git::VersionManager/release snapshot", "version" : "2.047" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "v6.10", "tag_format" : "v%V", "tag_message" : "v%V" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.29.2", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Git::VersionManager/Git::Tag", "version" : "2.047" }, { "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional", "config" : { "Dist::Zilla::Plugin::BumpVersionAfterRelease" : { "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 0, "munge_makefile_pl" : 1 }, "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : {} }, "name" : "@Git::VersionManager/BumpVersionAfterRelease::Transitional", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Git::VersionManager/NextRelease", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "increment $VERSION after %v release", "signoff" : 0 }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Build.PL", "Changes", "Makefile.PL" ], "allow_dirty_match" : [ "(?^:^lib/.*\\.pm$)" ], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.29.2", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Git::VersionManager/post-release commit", "version" : "2.047" }, { "class" : "Dist::Zilla::Plugin::Prereqs::FromCPANfile", "name" : "Prereqs::FromCPANfile", "version" : "0.08" }, { "class" : "Dist::Zilla::Plugin::MakeMaker::Awesome", "config" : { "Dist::Zilla::Plugin::MakeMaker" : { "make_path" : "make", "version" : "6.017" }, "Dist::Zilla::Role::TestRunner" : { "default_jobs" : "4", "version" : "6.017" } }, "name" : "MakeMaker::Awesome", "version" : "0.48" }, { "class" : "Dist::Zilla::Plugin::CheckChangeLog", "name" : "CheckChangeLog", "version" : "0.05" }, { "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", "name" : "CheckChangesHasContent", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "config" : { "Dist::Zilla::Plugin::Test::Kwalitee" : { "filename" : "xt/author/kwalitee.t", "skiptest" : [ "has_readme" ] } }, "name" : "Test::Kwalitee", "version" : "2.12" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "MojibakeTests", "version" : "0.8" }, { "class" : "Dist::Zilla::Plugin::Test::Version", "name" : "Test::Version", "version" : "1.09" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "Test::ReportPrereqs", "version" : "0.028" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : "1", "fail_on_warning" : "author", "fake_home" : 0, "filename" : "xt/author/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : 0, "phase" : "develop", "script_finder" : [ ":PerlExecFiles" ], "skips" : [], "switch" : [] } }, "name" : "Test::Compile", "version" : "2.058" }, { "class" : "Dist::Zilla::Plugin::Test::Portability", "config" : { "Dist::Zilla::Plugin::Test::Portability" : { "options" : "" } }, "name" : "Test::Portability", "version" : "2.001000" }, { "class" : "Dist::Zilla::Plugin::Test::CleanNamespaces", "config" : { "Dist::Zilla::Plugin::Test::CleanNamespaces" : { "filename" : "xt/author/clean-namespaces.t", "skips" : [] } }, "name" : "Test::CleanNamespaces", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":ExecFiles", ":InstallModules", ":TestFiles" ], "trailing_whitespace" : 1 } }, "name" : "Test::EOL", "version" : "0.19" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "MetaTests", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "Test::ChangesHasContent", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "config" : { "Dist::Zilla::Plugin::Test::MinimumVersion" : { "max_target_perl" : null } }, "name" : "Test::MinimumVersion", "version" : "2.000010" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "PodSyntaxTests", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::Test::Pod::Coverage::Configurable", "name" : "Test::Pod::Coverage::Configurable", "version" : "0.07" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "config" : { "Dist::Zilla::Plugin::Test::PodSpelling" : { "directories" : [ "bin", "lib" ], "spell_cmd" : "aspell list", "stopwords" : [], "wordlist" : "Pod::Wordlist" } }, "name" : "Test::PodSpelling", "version" : "2.007005" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : "4" } }, "name" : "RunExtraTests", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::CheckStrictVersion", "name" : "CheckStrictVersion", "version" : "0.001" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", "name" : "CopyFilesFromBuild", "version" : "0.170880" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "TestRelease", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "ConfirmRelease", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "UploadToCPAN", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.29.2", "repo_root" : "." } }, "name" : "Git::Push", "version" : "2.047" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.017" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.017" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "6.017" } }, "x_authority" : "cpan:GAAS", "x_contributors" : [ "Adam Kennedy ", "Adam Sjogren ", "Alexandr Ciornii ", "Alexey Tourbin ", "Alex Kapranoff ", "amire80 ", "Andreas J. Koenig ", "Bill Mann ", "Bron Gondwana ", "Chase Whitener ", "Christopher J. Madsen ", "cpansprout ", "Dan Book ", "Daniel Hedlund ", "David E. Wheeler ", "David Golden ", "DAVIDRW ", "drieux ", "Father Chrysostomos ", "FWILES ", "Gavin Peters ", "Gianni Ceccarelli ", "Gisle Aas ", "Graeme Thompson ", "Hans-H. Froehlich ", "Ian Kilgore ", "Jacob J ", "Jakub Wilk ", "jefflee ", "JJ Merelo ", "john9art ", "Jon Jensen ", "Karen Etheridge ", "Leo Lapworth ", "Mark Stosberg ", "Michael G. Schwern ", "Mike Schilli ", "Mohammad S Anwar ", "murphy ", "Olaf Alders ", "Ondrej Hanak ", "Peter Rabbitson ", "phrstbrn ", "Randy Stauner ", "Robert Stone ", "Rolf Grossmann ", "ruff ", "sasao ", "Sean M. Burke ", "Shoichi Kaji ", "Slaven Rezic ", "Spiros Denaxas ", "Steffen Ullrich ", "Steve Hay ", "Tim Couzins ", "Todd Lipcon ", "Tom Hukins ", "Tony Finch ", "Toru Yamaguchi ", "uid39246 ", "Ville Skytt\u00e4 ", "Yuri Karaban ", "Yury Zavarin ", "Zefram " ], "x_generated_by_perl" : "v5.30.3", "x_serialization_backend" : "Cpanel::JSON::XS version 4.19", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" } LWP-Protocol-https-6.10/CONTRIBUTING.md000644 000765 000024 00000010204 13766676120 020564 0ustar00olafaldersstaff000000 000000 # HOW TO CONTRIBUTE Thank you for considering contributing to this distribution. This file contains instructions that will help you work with the source code. The distribution is managed with [Dist::Zilla](https://metacpan.org/pod/Dist::Zilla). This means that many of the usual files you might expect are not in the repository, but are generated at release time. Some generated files are kept in the repository as a convenience (e.g. Build.PL/Makefile.PL and META.json). Generally, **you do not need Dist::Zilla to contribute patches**. You may need Dist::Zilla to create a tarball. See below for guidance. ## Getting dependencies If you have App::cpanminus 1.6 or later installed, you can use [cpanm](https://metacpan.org/pod/cpanm) to satisfy dependencies like this: $ cpanm --installdeps --with-develop . You can also run this command (or any other cpanm command) without installing App::cpanminus first, using the fatpacked `cpanm` script via curl or wget: $ curl -L https://cpanmin.us | perl - --installdeps --with-develop . $ wget -qO - https://cpanmin.us | perl - --installdeps --with-develop . Otherwise, look for either a `cpanfile` or `META.json` file for a list of dependencies to satisfy. ## Running tests You can run tests directly using the `prove` tool: $ prove -l $ prove -lv t/some_test_file.t For most of my distributions, `prove` is entirely sufficient for you to test any patches you have. I use `prove` for 99% of my testing during development. ## Code style and tidying Please try to match any existing coding style. If there is a `.perltidyrc` file, please install Perl::Tidy and use perltidy before submitting patches. ## Installing and using Dist::Zilla [Dist::Zilla](https://metacpan.org/pod/Dist::Zilla) is a very powerful authoring tool, optimized for maintaining a large number of distributions with a high degree of automation, but it has a large dependency chain, a bit of a learning curve and requires a number of author-specific plugins. To install it from CPAN, I recommend one of the following approaches for the quickest installation: # using CPAN.pm, but bypassing non-functional pod tests $ cpan TAP::Harness::Restricted $ PERL_MM_USE_DEFAULT=1 HARNESS_CLASS=TAP::Harness::Restricted cpan Dist::Zilla # using cpanm, bypassing *all* tests $ cpanm -n Dist::Zilla In either case, it's probably going to take about 10 minutes. Go for a walk, go get a cup of your favorite beverage, take a bathroom break, or whatever. When you get back, Dist::Zilla should be ready for you. Then you need to install any plugins specific to this distribution: $ dzil authordeps --missing | cpanm You can use Dist::Zilla to install the distribution's dependencies if you haven't already installed them with cpanm: $ dzil listdeps --missing --develop | cpanm Once everything is installed, here are some dzil commands you might try: $ dzil build $ dzil test $ dzil regenerate You can learn more about Dist::Zilla at http://dzil.org/ ## Other notes This distribution maintains the generated `META.json` and either `Makefile.PL` or `Build.PL` in the repository. This allows two things: [Travis CI](https://travis-ci.org/) can build and test the distribution without requiring Dist::Zilla, and the distribution can be installed directly from Github or a local git repository using `cpanm` for testing (again, not requiring Dist::Zilla). $ cpanm git://github.com/Author/Distribution-Name.git $ cd Distribution-Name; cpanm . Contributions are preferred in the form of a Github pull request. See [Using pull requests](https://help.github.com/articles/using-pull-requests/) for further information. You can use the Github issue tracker to report issues without an accompanying patch. # CREDITS This file was adapted from an initial `CONTRIBUTING.mkdn` file from David Golden under the terms of the Apache 2 license, with inspiration from the contributing documents from [Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING](https://metacpan.org/pod/Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING) and [Dist::Zilla::PluginBundle::Author::ETHER](https://metacpan.org/pod/Dist::Zilla::PluginBundle::Author::ETHER). LWP-Protocol-https-6.10/tidyall.ini000644 000765 000024 00000001106 13766676120 020477 0ustar00olafaldersstaff000000 000000 [PerlTidy] select = **/*.{pl,pm,t,psgi} ignore = t/00-* ignore = t/author-* ignore = t/release-* ignore = blib/**/* ignore = .build/**/* ignore = LWP-Protocol-https-*/**/* argv = --profile=$ROOT/perltidyrc ;[PerlCritic] ;select = **/*.{pl,pm,t,psgi} ;ignore = t/00-* ;ignore = t/author-* ;ignore = t/release-* ;ignore = blib/**/* ;ignore = .build/**/* ;ignore = LWP-Protocol-https-*/**/* ;argv = --profile $ROOT/perlcriticrc --program-extensions .pl --program-extensions .t --program-extensions .psgi [SortLines::Naturally] select = .gitignore [UniqueLines] select = .gitignore LWP-Protocol-https-6.10/lib/000755 000765 000024 00000000000 13766676120 017104 5ustar00olafaldersstaff000000 000000 LWP-Protocol-https-6.10/Makefile.PL000644 000765 000024 00000003726 13766676120 020320 0ustar00olafaldersstaff000000 000000 # This Makefile.PL for LWP-Protocol-https was generated by # Dist::Zilla::Plugin::MakeMaker::Awesome 0.48. # Don't edit it but the dist.ini and plugins used to construct it. use strict; use warnings; use 5.008001; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Provide https support for LWP::UserAgent", "AUTHOR" => "Gisle Aas ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "LWP-Protocol-https", "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.008001", "NAME" => "LWP::Protocol::https", "PREREQ_PM" => { "IO::Socket::SSL" => "1.54", "LWP::Protocol::http" => 0, "LWP::UserAgent" => "6.06", "Mozilla::CA" => 20180117, "Net::HTTPS" => 6, "base" => 0, "strict" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "File::Temp" => 0, "IO::Select" => 0, "IO::Socket::INET" => 0, "IO::Socket::SSL" => "1.54", "IO::Socket::SSL::Utils" => 0, "LWP::UserAgent" => "6.06", "Socket" => 0, "Test::More" => "0.96", "Test::RequiresInternet" => 0, "warnings" => 0 }, "VERSION" => "6.10", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "File::Temp" => 0, "IO::Select" => 0, "IO::Socket::INET" => 0, "IO::Socket::SSL" => "1.54", "IO::Socket::SSL::Utils" => 0, "LWP::Protocol::http" => 0, "LWP::UserAgent" => "6.06", "Mozilla::CA" => 20180117, "Net::HTTPS" => 6, "Socket" => 0, "Test::More" => "0.96", "Test::RequiresInternet" => 0, "base" => 0, "strict" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION('6.63_03') } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); LWP-Protocol-https-6.10/dist.ini000644 000765 000024 00000003754 13766676120 020013 0ustar00olafaldersstaff000000 000000 name = LWP-Protocol-https author = Gisle Aas license = Perl_5 main_module = lib/LWP/Protocol/https.pm copyright_holder = Gisle Aas copyright_year = 1997 ; Gather stuff in [Git::GatherDir] exclude_filename = Makefile.PL exclude_filename = META.json exclude_filename = README.md exclude_filename = LICENSE [PruneCruft] ; Handle the META resources [MetaConfig] [MetaProvides::Package] [MetaNoIndex] directory = t directory = xt [MetaYAML] [MetaJSON] [MetaResources] x_IRC = irc://irc.perl.org/#lwp x_MailingList = mailto:libwww@perl.org [Git::Check] [Git::Contributors] [GithubMeta] issues = 1 user = libwww-perl [Authority] do_munging = 0 authority = cpan:GAAS [Manifest] [License] ; Create Readme [ReadmeAnyFromPod / Markdown_Readme] source_filename = lib/LWP/Protocol/https.pm type = markdown filename = README.md location = root ; make the bin dir executables ; [ExecDir] ; [ShareDir] ; Handle Versioning [@Git::VersionManager] commit_files_after_release = LICENSE commit_files_after_release = Makefile.PL commit_files_after_release = META.json RewriteVersion::Transitional.fallback_version_provider = Git::NextVersion [Prereqs::FromCPANfile] [MakeMaker::Awesome] [CheckChangeLog] [CheckChangesHasContent] ; TODO strict and warnings to quiet the kwalitee tests [Test::Kwalitee] filename = xt/author/kwalitee.t skiptest = has_readme [MojibakeTests] [Test::Version] [Test::ReportPrereqs] include = Net::SSLeay [Test::Compile] bail_out_on_fail = 1 xt_mode = 1 [Test::Portability] ; TODO perltidy for NoTabs [Test::CleanNamespaces] ; [Test::NoTabs] [Test::EOL] [MetaTests] [Test::ChangesHasContent] [Test::MinimumVersion] [PodSyntaxTests] [Test::Pod::Coverage::Configurable] trustme = LWP::Protocol::https => qr/^(?:socket_type)$/ [Test::PodSpelling] wordlist = Pod::Wordlist spell_cmd = aspell list [RunExtraTests] [CheckStrictVersion] decimal_only = 1 [CopyFilesFromBuild] copy = Makefile.PL copy = META.json copy = LICENSE [TestRelease] [ConfirmRelease] [UploadToCPAN] [Git::Push] LWP-Protocol-https-6.10/lib/LWP/000755 000765 000024 00000000000 13766676120 017546 5ustar00olafaldersstaff000000 000000 LWP-Protocol-https-6.10/lib/LWP/Protocol/000755 000765 000024 00000000000 13766676120 021347 5ustar00olafaldersstaff000000 000000 LWP-Protocol-https-6.10/lib/LWP/Protocol/https.pm000644 000765 000024 00000015360 13766676120 023054 0ustar00olafaldersstaff000000 000000 package LWP::Protocol::https; use strict; our $VERSION = '6.10'; use base qw(LWP::Protocol::http); require Net::HTTPS; sub socket_type { return "https"; } sub _extra_sock_opts { my $self = shift; my %ssl_opts = %{$self->{ua}{ssl_opts} || {}}; if (delete $ssl_opts{verify_hostname}) { $ssl_opts{SSL_verify_mode} ||= 1; $ssl_opts{SSL_verifycn_scheme} = 'www'; } else { $ssl_opts{SSL_verify_mode} = 0; } if ($ssl_opts{SSL_verify_mode}) { unless (exists $ssl_opts{SSL_ca_file} || exists $ssl_opts{SSL_ca_path}) { eval { require Mozilla::CA; }; if ($@) { if ($@ =~ /^Can't locate Mozilla\/CA\.pm/) { $@ = <<'EOT'; Can't verify SSL peers without knowing which Certificate Authorities to trust This problem can be fixed by either setting the PERL_LWP_SSL_CA_FILE environment variable or by installing the Mozilla::CA module. To disable verification of SSL peers set the PERL_LWP_SSL_VERIFY_HOSTNAME environment variable to 0. If you do this you can't be sure that you communicate with the expected peer. EOT } die $@; } $ssl_opts{SSL_ca_file} = Mozilla::CA::SSL_ca_file(); } } $self->{ssl_opts} = \%ssl_opts; return (%ssl_opts, $self->SUPER::_extra_sock_opts); } #------------------------------------------------------------ # _cn_match($common_name, $san_name) # common_name: an IA5String # san_name: subjectAltName # initially we were only concerned with the dNSName # and the 'left-most' only wildcard as noted in # https://tools.ietf.org/html/rfc6125#section-6.4.3 # this method does not match any wildcarding in the # domain name as listed in section-6.4.3.3 # sub _cn_match { my( $me, $common_name, $san_name ) = @_; # /CN has a '*.' prefix # MUST be an FQDN -- fishing? return 0 if( $common_name =~ /^\*\./ ); my $re = q{}; # empty string # turn a leading "*." into a regex if( $san_name =~ /^\*\./ ) { $san_name =~ s/\*//; $re = "[^.]+"; } # quotemeta the rest and match anchored if( $common_name =~ /^$re\Q$san_name\E$/ ) { return 1; } return 0; } #------------------------------------------------------- # _in_san( cn, cert ) # 'cn' of the form /CN=host_to_check ( "Common Name" form ) # 'cert' any object that implements a peer_certificate('subjectAltNames') method # which will return an array of ( type-id, value ) pairings per # http://tools.ietf.org/html/rfc5280#section-4.2.1.6 # if there is no subjectAltNames there is nothing more to do. # currently we have a _cn_match() that will allow for simple compare. sub _in_san { my($me, $cn, $cert) = @_; # we can return early if there are no SAN options. my @sans = $cert->peer_certificate('subjectAltNames'); return unless scalar @sans; (my $common_name = $cn) =~ s/.*=//; # strip off the prefix. # get the ( type-id, value ) pairwise # currently only the basic CN to san_name check while( my ( $type_id, $value ) = splice( @sans, 0, 2 ) ) { return 'ok' if $me->_cn_match($common_name,$value); } return; } sub _check_sock { my($self, $req, $sock) = @_; my $check = $req->header("If-SSL-Cert-Subject"); if (defined $check) { my $cert = $sock->get_peer_certificate || die "Missing SSL certificate"; my $subject = $cert->subject_name; unless ( defined $subject && ( $subject =~ /$check/ ) ) { my $ok = $self->_in_san( $check, $cert); die "Bad SSL certificate subject: '$subject' !~ /$check/" unless $ok; } $req->remove_header("If-SSL-Cert-Subject"); # don't pass it on } } sub _get_sock_info { my $self = shift; $self->SUPER::_get_sock_info(@_); my($res, $sock) = @_; if ($sock->can('get_sslversion') and my $sslversion = $sock->get_sslversion) { $res->header("Client-SSL-Version" => $sslversion); } $res->header("Client-SSL-Cipher" => $sock->get_cipher); my $cert = $sock->get_peer_certificate; if ($cert) { $res->header("Client-SSL-Cert-Subject" => $cert->subject_name); $res->header("Client-SSL-Cert-Issuer" => $cert->issuer_name); } if (!$self->{ssl_opts}{SSL_verify_mode}) { $res->push_header("Client-SSL-Warning" => "Peer certificate not verified"); } elsif (!$self->{ssl_opts}{SSL_verifycn_scheme}) { $res->push_header("Client-SSL-Warning" => "Peer hostname match with certificate not verified"); } $res->header("Client-SSL-Socket-Class" => $Net::HTTPS::SSL_SOCKET_CLASS); } # upgrade plain socket to SSL, used for CONNECT tunnel when proxying https # will only work if the underlying socket class of Net::HTTPS is # IO::Socket::SSL, but code will only be called in this case if ( $Net::HTTPS::SSL_SOCKET_CLASS->can('start_SSL')) { *_upgrade_sock = sub { my ($self,$sock,$url) = @_; $sock = LWP::Protocol::https::Socket->start_SSL( $sock, SSL_verifycn_name => $url->host, SSL_hostname => $url->host, $self->_extra_sock_opts, ); $@ = LWP::Protocol::https::Socket->errstr if ! $sock; return $sock; } } #----------------------------------------------------------- package LWP::Protocol::https::Socket; use base qw(Net::HTTPS LWP::Protocol::http::SocketMethods); 1; __END__ =head1 NAME LWP::Protocol::https - Provide https support for LWP::UserAgent =head1 SYNOPSIS use LWP::UserAgent; $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 1 }); $res = $ua->get("https://www.example.com"); # specify a CA path $ua = LWP::UserAgent->new( ssl_opts => { SSL_ca_path => '/etc/ssl/certs', verify_hostname => 1, } ); =head1 DESCRIPTION The LWP::Protocol::https module provides support for using https schemed URLs with LWP. This module is a plug-in to the LWP protocol handling, so you don't use it directly. Once the module is installed LWP is able to access sites using HTTP over SSL/TLS. If hostname verification is requested by LWP::UserAgent's C, and neither C nor C is set, then C is implied to be the one provided by L. If the Mozilla::CA module isn't available SSL requests will fail. Either install this module, set up an alternative C or disable hostname verification. This module used to be bundled with the libwww-perl, but it was unbundled in v6.02 in order to be able to declare its dependencies properly for the CPAN tool-chain. Applications that need https support can just declare their dependency on LWP::Protocol::https and will no longer need to know what underlying modules to install. =head1 SEE ALSO L, L, L =head1 COPYRIGHT & LICENSE Copyright (c) 1997-2011 Gisle Aas. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut LWP-Protocol-https-6.10/xt/author/000755 000765 000024 00000000000 13766676120 020273 5ustar00olafaldersstaff000000 000000 LWP-Protocol-https-6.10/xt/release/000755 000765 000024 00000000000 13766676120 020411 5ustar00olafaldersstaff000000 000000 LWP-Protocol-https-6.10/xt/release/changes_has_content.t000644 000765 000024 00000002100 13766676120 024564 0ustar00olafaldersstaff000000 000000 use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '6.10'; my $trial_token = '-TRIAL'; my $encoding = 'UTF-8'; SKIP: { ok(-e $changes_file, "$changes_file file exists") or skip 'Changes is missing', 1; ok(_get_changes($newver), "$changes_file has content for $newver"); } done_testing; sub _get_changes { my $newver = shift; # parse changelog to find commit message open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!"; my $changelog = join('', <$fh>); if ($encoding) { require Encode; $changelog = Encode::decode($encoding, $changelog, Encode::FB_CROAK()); } close $fh; my @content = grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented split /\n/, $changelog; shift @content; # drop the version line # drop unindented last line and trailing blank lines pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ ); # return number of non-blank lines return scalar @content; } LWP-Protocol-https-6.10/xt/author/mojibake.t000644 000765 000024 00000000151 13766676120 022236 0ustar00olafaldersstaff000000 000000 #!perl use strict; use warnings qw(all); use Test::More; use Test::Mojibake; all_files_encoding_ok(); LWP-Protocol-https-6.10/xt/author/kwalitee.t000644 000765 000024 00000000320 13766676120 022260 0ustar00olafaldersstaff000000 000000 # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.12 use strict; use warnings; use Test::More 0.88; use Test::Kwalitee 1.21 'kwalitee_ok'; kwalitee_ok( qw( -has_readme ) ); done_testing; LWP-Protocol-https-6.10/xt/author/minimum-version.t000644 000765 000024 00000000154 13766676120 023616 0ustar00olafaldersstaff000000 000000 use strict; use warnings; use Test::More; use Test::MinimumVersion; all_minimum_version_from_metayml_ok(); LWP-Protocol-https-6.10/xt/author/test-version.t000644 000765 000024 00000000637 13766676120 023130 0ustar00olafaldersstaff000000 000000 use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::Version 1.09 use Test::Version; my @imports = qw( version_all_ok ); my $params = { is_strict => 0, has_version => 1, multiple => 0, }; push @imports, $params if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); Test::Version->import(@imports); version_all_ok; done_testing; LWP-Protocol-https-6.10/xt/author/00-compile.t000644 000765 000024 00000002553 13766676120 022332 0ustar00olafaldersstaff000000 000000 use 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058 use Test::More 0.94; plan tests => 2; my @module_files = ( 'LWP/Protocol/https.pm' ); # no fake home requested my @switches = ( -d 'blib' ? '-Mblib' : '-Ilib', ); use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} } $^X, @switches, '-e', "require q[$lib]")) if $ENV{PERL_COMPILE_TEST_DEBUG}; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { +require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', explain(\@warnings); BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing; LWP-Protocol-https-6.10/xt/author/eol.t000644 000765 000024 00000000577 13766676120 021250 0ustar00olafaldersstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.19 use Test::More 0.88; use Test::EOL; my @files = ( 'lib/LWP/Protocol/https.pm', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/apache.t', 't/https_proxy.t', 't/method_in_san.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; LWP-Protocol-https-6.10/xt/author/pod-syntax.t000644 000765 000024 00000000252 13766676120 022565 0ustar00olafaldersstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); LWP-Protocol-https-6.10/xt/author/portability.t000644 000765 000024 00000000267 13766676120 023027 0ustar00olafaldersstaff000000 000000 use strict; use warnings; use Test::More; eval 'use Test::Portability::Files'; plan skip_all => 'Test::Portability::Files required for testing portability' if $@; run_tests(); LWP-Protocol-https-6.10/xt/author/distmeta.t000644 000765 000024 00000000172 13766676120 022272 0ustar00olafaldersstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use Test::CPAN::Meta; meta_yaml_ok(); LWP-Protocol-https-6.10/xt/author/pod-spell.t000644 000765 000024 00000002601 13766676120 022356 0ustar00olafaldersstaff000000 000000 use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007005 use Test::Spelling 0.12; use Pod::Wordlist; set_spell_cmd('aspell list'); add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ Aas Adam Alders Alex Alexandr Alexey Andreas Anwar Bill Book Bron Burke Ceccarelli Chase Christopher Chrysostomos Ciornii Couzins DAVIDRW Dan Daniel David Denaxas Etheridge FWILES Father Finch Froehlich Gavin Gianni Gisle Golden Gondwana Graeme Grossmann Hanak Hans Hay Hedlund Hukins Ian JJ Jacob Jakub Jensen Jon Kaji Kapranoff Karaban Karen Kennedy Kilgore Koenig LWP Lapworth Leo Lipcon Madsen Mann Mark Merelo Michael Mike Mohammad Olaf Ondrej Peter Peters Protocol Rabbitson Randy Rezic Robert Rolf Schilli Schwern Sean Shoichi Sjogren Skyttä Slaven Spiros Stauner Steffen Steffen_Ullrich Steve SteveHay Stone Stosberg Thompson Tim Todd Tom Tony Toru Tourbin Ullrich Ville Wheeler Whitener Wilk Yamaguchi Yuri Yury Zavarin Zefram adamk alexchorny amir amire80 andreas asjo at brong capoeirab cjm cpansprout dagolden david davidrw denaxas dot drieux ether gianni gisle github gpeters grinnz hfroehlich https iank jefflee jjmerelo john9art jon jwilk ka leo lib mark mohammad murphy olaf ondrej phrstbrn randy rg ribasushi ruff sasao sburke schwern shaohua skaji slaven sprout talby tech tim todd tom uid39246 ville waif wfmann yury zefram zigorou LWP-Protocol-https-6.10/xt/author/clean-namespaces.t000644 000765 000024 00000000361 13766676120 023657 0ustar00olafaldersstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CleanNamespaces 0.006 use Test::More 0.94; use Test::CleanNamespaces 0.15; subtest all_namespaces_clean => sub { all_namespaces_clean() }; done_testing; LWP-Protocol-https-6.10/xt/author/pod-coverage.t000644 000765 000024 00000002155 13766676120 023036 0ustar00olafaldersstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::Test::Pod::Coverage::Configurable 0.07. use Test::Pod::Coverage 1.08; use Test::More 0.88; BEGIN { if ( $] <= 5.008008 ) { plan skip_all => 'These tests require Pod::Coverage::TrustPod, which only works with Perl 5.8.9+'; } } use Pod::Coverage::TrustPod; my %skip = map { $_ => 1 } qw( ); my @modules; for my $module ( all_modules() ) { next if $skip{$module}; push @modules, $module; } plan skip_all => 'All the modules we found were excluded from POD coverage test.' unless @modules; plan tests => scalar @modules; my %trustme = ( 'LWP::Protocol::https' => [ qr/^(?:socket_type)$/ ] ); my @also_private; for my $module ( sort @modules ) { pod_coverage_ok( $module, { coverage_class => 'Pod::Coverage::TrustPod', also_private => \@also_private, trustme => $trustme{$module} || [], }, "pod coverage for $module" ); } done_testing(); LWP-Protocol-https-6.10/t/apache.t000644 000765 000024 00000003051 13766676120 020206 0ustar00olafaldersstaff000000 000000 #!perl -w use strict; use Test::More; use Test::RequiresInternet 'www.apache.org' => 443; use LWP::UserAgent; my $ua = LWP::UserAgent->new( ssl_opts => {verify_hostname => 0} ); plan tests => 2; my $url = 'https://www.apache.org'; subtest "Request GET $url" => sub { plan tests => 6; my $res = $ua->simple_request(HTTP::Request->new(GET => $url)); ok($res->is_success, "success status"); my $h; $h = 'X-Died'; my $x_died = $res->header($h); is($x_died, undef, "no $h header"); $h = 'Client-SSL-Socket-Class'; my $socket_class = $res->header($h) || ''; ok($socket_class =~ /\S/, "have header $h"); SKIP: { $h = 'Client-SSL-Version'; my $ssl_version = $res->header($h) || ''; my $h_test = $ssl_version =~ /^(SSL|TLS)v\d/i; my $want_class = 'IO::Socket::SSL'; $h_test or $socket_class eq $want_class or skip "header $h only guaranteed when using $want_class", 1; ok($h_test, "have header $h"); } $h = 'Client-SSL-Cipher'; my $ssl_cipher = $res->header($h) || ''; ok($ssl_cipher =~ /\S/, "have header $h"); like($res->content, qr/Apache Software Foundation/, "found expected document content"); }; subtest "Check for warnings from GET $url (RT #81948)" => sub { plan tests => 2; my $warn = ''; $SIG{__WARN__} = sub { $warn = shift }; my $res = $ua->simple_request(HTTP::Request->new(GET => $url)); ok($res->is_success, "success status"); is($warn, '', "no warning seen"); $res->dump(prefix => "# "); }; LWP-Protocol-https-6.10/t/https_proxy.t000644 000765 000024 00000023742 13766676120 021401 0ustar00olafaldersstaff000000 000000 #!/usr/bin/perl # to run test with Net::SSL as backend set environment # PERL_NET_HTTPS_SSL_SOCKET_CLASS=Net::SSL use strict; use warnings; use Test::More; use File::Temp 'tempfile'; use IO::Socket::INET; use IO::Select; use Socket 'MSG_PEEK'; use LWP::UserAgent; use LWP::Protocol::https; plan skip_all => "fork not implemented on this platform" if grep { $^O =~m{$_} } qw( MacOS VOS vmesa riscos amigaos ); eval { require IO::Socket::SSL } and $IO::Socket::SSL::VERSION >= 1.953 and eval { require IO::Socket::SSL::Utils } or plan skip_all => "no recent version of IO::Socket::SSL::Utils"; IO::Socket::SSL::Utils->import; # create CA ------------------------------------------------------------- my ($cacert,$cakey) = CERT_create( CA => 1 ); my $cafile = do { my ($fh,$fname) = tempfile( CLEANUP => 1 ); print $fh PEM_cert2string($cacert); $fname }; # create two web servers ------------------------------------------------ my (@server,@saddr); for my $i (0,1) { my $server = IO::Socket::INET->new( LocalAddr => '127.0.0.1', LocalPort => 0, # let system pick port Listen => 10 ) or die "failed to create INET listener"; my $saddr = $server->sockhost.':'.$server->sockport; $server[$i] = $server; $saddr[$i] = $saddr; } my @childs; END { kill 9,@childs if @childs }; defined( my $pid = fork()) or die "fork failed: $!"; # child process runs _server and exits if ( ! $pid ) { @childs = (); exit( _server()); } # parent continues with closed server sockets push @childs,$pid; @server = (); # check which SSL implementation Net::HTTPS uses # Net::SSL behaves different than the default IO::Socket::SSL my $netssl = $Net::HTTPS::SSL_SOCKET_CLASS eq 'Net::SSL'; # do some tests ---------------------------------------------------------- my %ua; $ua{noproxy} = LWP::UserAgent->new( keep_alive => 10, # size of connection cache # server does not know the expected name and returns generic certificate ssl_opts => { verify_hostname => 0 } ); $ua{proxy} = LWP::UserAgent->new( keep_alive => 10, # size of connection cache ssl_opts => { # Net::SSL cannot verify hostnames :( verify_hostname => $netssl ? 0: 1, SSL_ca_file => $cafile } ); $ua{proxy_nokeepalive} = LWP::UserAgent->new( keep_alive => 0, ssl_opts => { # Net::SSL cannot verify hostnames :( verify_hostname => $netssl ? 0: 1, SSL_ca_file => $cafile } ); # both lower- and upper-case versions are accepted by `env_proxy`, and # the user may have any of them set: override them all $ENV{HTTP_PROXY} = $ENV{HTTPS_PROXY} = $ENV{http_proxy} = $ENV{https_proxy} = "http://foo:bar\@$saddr[0]"; $ua{proxy}->env_proxy; $ua{proxy_nokeepalive}->env_proxy; if ($netssl) { # Net::SSL cannot get user/pass from proxy url $ENV{HTTPS_PROXY_USERNAME} = 'foo'; $ENV{HTTPS_PROXY_PASSWORD} = 'bar'; } my @tests = ( # the expected ids are connid.reqid[tunnel_auth][req_auth]@sslhost # because we run different sets of test depending on the SSL class # used by Net::HTTPS we replace connid with a letter and later # match it to a number # keep-alive for non-proxy http # requests to same target use same connection, even if intermixed [ 'noproxy', "http://$saddr[0]/foo",'A.1@nossl' ], [ 'noproxy', "http://$saddr[0]/bar",'A.2@nossl' ], # reuse conn#1 [ 'noproxy', "http://$saddr[1]/foo",'B.1@nossl' ], [ 'noproxy', "http://$saddr[1]/bar",'B.2@nossl' ], # reuse conn#2 [ 'noproxy', "http://$saddr[0]/tor",'A.3@nossl' ], # reuse conn#1 again [ 'noproxy', "http://$saddr[1]/tor",'B.3@nossl' ], # reuse conn#2 again # keep-alive for proxy http # use the same proxy connection for all even if the target host differs [ 'proxy', "http://foo/foo",'C.1.auth@nossl' ], [ 'proxy', "http://foo/bar",'C.2.auth@nossl' ], [ 'proxy', "http://bar/foo",'C.3.auth@nossl' ], [ 'proxy', "http://bar/bar",'C.4.auth@nossl' ], [ 'proxy', "http://foo/tor",'C.5.auth@nossl' ], [ 'proxy', "http://bar/tor",'C.6.auth@nossl' ], # keep-alive for non-proxy https # requests to same target use same connection, even if intermixed [ 'noproxy', "https://$saddr[0]/foo",'D.1@direct.ssl.access' ], [ 'noproxy', "https://$saddr[0]/bar",'D.2@direct.ssl.access' ], [ 'noproxy', "https://$saddr[1]/foo",'E.1@direct.ssl.access' ], [ 'noproxy', "https://$saddr[1]/bar",'E.2@direct.ssl.access' ], [ 'noproxy', "https://$saddr[0]/tor",'D.3@direct.ssl.access' ], [ 'noproxy', "https://$saddr[1]/tor",'E.3@direct.ssl.access' ], # keep-alive for proxy https ! $netssl ? ( # note that we reuse proxy conn#C in first request. Although the last id # from this conn was C.6 the new one is C.8, because request C.7 was the # socket upgrade via CONNECT request [ 'proxy', "https://foo/foo",'C.8.Tauth@foo' ], [ 'proxy', "https://foo/bar",'C.9.Tauth@foo' ], # if the target of the tunnel is different we need another connection # note that it starts with F.2, because F.1 is the CONNECT request which # established the tunnel [ 'proxy', "https://bar/foo",'F.2.Tauth@bar' ], [ 'proxy', "https://bar/bar",'F.3.Tauth@bar' ], [ 'proxy', "https://foo/tor",'C.10.Tauth@foo' ], [ 'proxy', "https://bar/tor",'F.4.Tauth@bar' ], ):( # Net::SSL will cannot reuse socket for CONNECT, but once inside tunnel # keep-alive is possible [ 'proxy', "https://foo/foo",'G.2.Tauth@foo' ], [ 'proxy', "https://foo/bar",'G.3.Tauth@foo' ], [ 'proxy', "https://bar/foo",'F.2.Tauth@bar' ], [ 'proxy', "https://bar/bar",'F.3.Tauth@bar' ], [ 'proxy', "https://foo/tor",'G.4.Tauth@foo' ], [ 'proxy', "https://bar/tor",'F.4.Tauth@bar' ], ), # non-keep alive for proxy https [ 'proxy_nokeepalive', "https://foo/foo",'H.2.Tauth@foo' ], [ 'proxy_nokeepalive', "https://foo/bar",'I.2.Tauth@foo' ], [ 'proxy_nokeepalive', "https://bar/foo",'J.2.Tauth@bar' ], [ 'proxy_nokeepalive', "https://bar/bar",'K.2.Tauth@bar' ], ); plan tests => 2*@tests; my (%conn2id,%id2conn); for my $test (@tests) { my ($uatype,$url,$expect_id) = @$test; my $ua = $ua{$uatype} or die "no such ua: $uatype"; # Net::SSL uses only the environment to decide about proxy, so we need the # proxy/non-proxy environment for each request if ( $netssl && $url =~m{^https://} ) { $ENV{https_proxy} = $uatype =~m{^proxy} ? "http://$saddr[0]":"" } my $response = $ua->get($url) or die "no response"; if ( $response->is_success and ( my $body = $response->content()) =~m{^ID: *(\d+)\.(\S+)}m ) { my $id = [ $1,$2 ]; my $xid = [ $expect_id =~m{(\w+)\.(\S+)} ]; if ( my $x = $id2conn{$id->[0]} ) { $id->[0] = $x; } elsif ( ! $conn2id{$xid->[0]} ) { $conn2id{ $xid->[0] } = $id->[0]; $id2conn{ $id->[0] } = $xid->[0]; $id->[0] = $xid->[0]; } is("$id->[0].$id->[1]",$expect_id,"$uatype $url -> $expect_id") or diag($response->as_string); # inside proxy tunnel and for non-proxy there should be only absolute # URI in request w/o scheme my $expect_rqurl = $url; $expect_rqurl =~s{^\w+://[^/]+}{} if $uatype eq 'noproxy' or $url =~m{^https://}; my ($rqurl) = $body =~m{^GET (\S+) HTTP/}m; is($rqurl,$expect_rqurl,"URL in request -> $expect_rqurl"); } else { die "unexpected response: ".$response->as_string } } # ------------------------------------------------------------------------ # simple web server with keep alive and SSL, which can also simulate proxy # ------------------------------------------------------------------------ sub _server { my $connid = 0; my %certs; # generated certificates ACCEPT: my ($server) = IO::Select->new(@server)->can_read(); my $cl = $server->accept or goto ACCEPT; # peek into socket to determine if this is direct SSL or not # minimal request is "GET / HTTP/1.1\n\n" my $buf = ''; while (length($buf)<15) { my $lbuf; if ( ! IO::Select->new($cl)->can_read(30) or ! defined recv($cl,$lbuf,20,MSG_PEEK)) { warn "not enough data for request ($buf): $!"; goto ACCEPT; } $buf .= $lbuf; } my $ssl_host = ''; if ( $buf !~m{\A[A-Z]{3,} } ) { # does not look like HTTP, assume direct SSL $ssl_host = "direct.ssl.access"; } $connid++; defined( my $pid = fork()) or die "failed to fork: $!"; if ( $pid ) { push @childs,$pid; goto ACCEPT; # wait for next connection } # child handles requests @server = (); my $reqid = 0; my $tunnel_auth = ''; SSL_UPGRADE: if ( $ssl_host ) { my ($cert,$key) = @{ $certs{$ssl_host} ||= do { note("creating cert for $ssl_host"); my ($c,$k) = CERT_create( subject => { commonName => $ssl_host }, issuer_cert => $cacert, issuer_key => $cakey, # just reuse cakey as key for certificate key => $cakey, ); [ $c,$k ]; }; }; IO::Socket::SSL->start_SSL( $cl, SSL_server => 1, SSL_cert => $cert, SSL_key => $key, ) or do { diag("SSL handshake failed: ".IO::Socket::SSL->errstr); exit(1); }; } REQUEST: # read header my $req = ''; while (<$cl>) { $_ eq "\r\n" and last; $req .= $_; } $reqid++; my $req_auth = $req =~m{^Proxy-Authorization:}mi ? '.auth':''; if ( $req =~m{\ACONNECT ([^\s:]+)} ) { if ( $ssl_host ) { diag("CONNECT inside SSL tunnel"); exit(1); } $ssl_host = $1; $tunnel_auth = $req_auth ? '.Tauth':''; #diag($req); # simulate proxy and establish SSL tunnel print $cl "HTTP/1.0 200 ok\r\n\r\n"; goto SSL_UPGRADE; } if ( $req =~m{^Content-length: *(\d+)}mi ) { read($cl,my $buf,$1) or die "eof while reading request body"; } my $keep_alive = $req =~m{^(?:Proxy-)?Connection: *(?:(keep-alive)|close)}mi ? $1 : $req =~m{\A.*HTTP/1\.1} ? 1 : 0; # just echo request back, including connid and reqid my $body = "ID: $connid.$reqid$tunnel_auth$req_auth\@" . ( $ssl_host || 'nossl' )."\n" . "---------\n$req"; print $cl "HTTP/1.1 200 ok\r\nContent-type: text/plain\r\n" . "Connection: ".( $keep_alive ? 'keep-alive':'close' )."\r\n" . "Content-length: ".length($body)."\r\n" . "\r\n" . $body; goto REQUEST if $keep_alive; exit(0); # done handling requests } LWP-Protocol-https-6.10/t/method_in_san.t000644 000765 000024 00000007727 13766676120 021612 0ustar00olafaldersstaff000000 000000 use warnings; use strict; use Test::More tests => 17; #-------------------------------------------------------------- # this is just for testing the '_in_san()' method #-------------------------------------------------------------- use LWP::Protocol::https; sub class_under_test { return 'LWP::Protocol::https'; } #----------------------------- test__in_san(); test__cn_match(); #----------------- sub test__in_san { my $class = class_under_test(); can_ok( $class, '_in_san' ); { no strict qw(refs); ## no critic (ProhibitNoStrict) no warnings qw(redefine); ## no critic (ProhibitNoWarnings) # a bit of a monkey patch to make it simpler to test # the various basic cases under test my $p_cert = bless {}, 'fauxCert'; my @san_list; my $p_peer_certificate = 'fauxCert::peer_certificate'; local *{$p_peer_certificate} = sub { return @san_list; }; #----------------------------------- # We need three simple cases, one without SAN # one with a pass, one with a fail connection. # until we need to deal with more than just the simple dns_match # futureNote: what if we use the 'type_id' -- and need to dispatch # to other than the '_cn_match()' method -- we may want to extend this # basic list of tests. my @tests = ( { 'san' => [], 'cn' => '/CN=foo.bar.baz', 'want' => undef, 'label' => 'empty SAN', }, { 'san' => [2, '*.bar.baz'], 'cn' => '/CN=foo.bar.baz', 'want' => 'ok', 'label' => 'CN matched by wild card SAN', }, { 'san' => [2, '*.bar.baz',], 'cn' => '/CN=cat.rat.bat', 'want' => undef, 'label' => 'CN not in SAN', } ); foreach my $test (@tests) { my ($san, $cn,$want, $label) = @{$test}{qw(san cn want label)}; @san_list = @{$san}; my $have = $class->_in_san($cn, $p_cert); is($have, $want, $label); } } return; } sub test__cn_match { my $class = class_under_test(); can_ok( $class, '_cn_match' ); # [ common_name , san_name, must_match , 'label' ] my @fail_cases = ( ['hostbar.foo' ,'ho*bar.foo' ,0, 'inline wildcard' ], ['host.cat.foo','host.*.foo' ,0, 'wildcard between levels' ], ['host.foo.bar','*foo.bar' ,0, 'wild card without a dot'], ['abcdfoo.com' ,'*.foo.com' ,0, 'different domain name'], ['*.foo.com' ,'*.foo.com' ,0, 'wild card query CN must be FQDN'], ['baz.foo.bar' ,'*.red.foo.bar' ,0, 'wild card from the section below'], ['baz.foo.bar' ,'*.foo.bar.' ,0, 'extra dot in SAN -- "dns style" dot at the end' ], ); my @ok_cases = ( ['baz.foo.bar' ,'baz.foo.bar' ,1, 'matches directly' ], ['baz.foo.bar' ,'*.foo.bar' ,1, 'matches by wild card' ], ); # Include these non-dns-specific-cases, as they could be things that # might be passed in the /CN= and be a part of the SAN, but it is # not quite clear which way they should be addressed. Nor is it clear # that they should be rejected by the _cn_match() my @non_dns_specific_cases = ( ['127.0.0.1' , '127.0.0.1' ,1, 'dotQuad notation' ], ['bob@bob.com' , 'bob@bob.com' ,1, 'email compare' ], ['schem://host', 'schem://host' ,1, 'url compare' ], ); my @tests = (@fail_cases, @ok_cases, @non_dns_specific_cases ); # now we can just iterate over the groups foreach my $test ( @tests) { my ( $cn, $san_dns, $must_match, $label ) = @{$test}; my $match = $class->_cn_match($cn, $san_dns); my $test_label = sprintf("%12s ~ %14s : %s", $cn,$san_dns,$label); is($match, $must_match, $test_label); } return; } LWP-Protocol-https-6.10/t/00-report-prereqs.t000644 000765 000024 00000013467 13766676120 022210 0ustar00olafaldersstaff000000 000000 #!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.028 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( Net::SSLeay ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do './t/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; my $cpan_meta_error; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if $mod eq 'perl'; next if grep { $_ eq $mod } @exclude; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( $cpan_meta_error || @dep_errors ) { diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; } if ( $cpan_meta_error ) { my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; } if ( @dep_errors ) { diag join("\n", "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass('Reported prereqs'); # vim: ts=4 sts=4 sw=4 et: LWP-Protocol-https-6.10/t/00-report-prereqs.dd000644 000765 000024 00000007076 13766676120 022333 0ustar00olafaldersstaff000000 000000 do { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0', 'perl' => '5.008001' }, 'suggests' => { 'JSON::PP' => '2.27300' } }, 'develop' => { 'recommends' => { 'Dist::Zilla::PluginBundle::Git::VersionManager' => '0.007' }, 'requires' => { 'File::Spec' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', 'Pod::Coverage::TrustPod' => '0', 'Test::CPAN::Changes' => '0.19', 'Test::CPAN::Meta' => '0', 'Test::CheckManifest' => '1.29', 'Test::CleanNamespaces' => '0.15', 'Test::EOL' => '0', 'Test::Kwalitee' => '1.22', 'Test::MinimumVersion' => '0', 'Test::Mojibake' => '0', 'Test::More' => '0.94', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.08', 'Test::Pod::Spelling::CommonMistakes' => '1.000', 'Test::Portability::Files' => '0', 'Test::Spelling' => '0.12', 'Test::Version' => '1' } }, 'runtime' => { 'requires' => { 'IO::Socket::SSL' => '1.54', 'LWP::Protocol::http' => '0', 'LWP::UserAgent' => '6.06', 'Mozilla::CA' => '20180117', 'Net::HTTPS' => '6', 'base' => '0', 'perl' => '5.008001', 'strict' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'File::Temp' => '0', 'IO::Select' => '0', 'IO::Socket::INET' => '0', 'IO::Socket::SSL' => '1.54', 'IO::Socket::SSL::Utils' => '0', 'LWP::UserAgent' => '6.06', 'Socket' => '0', 'Test::More' => '0.96', 'Test::RequiresInternet' => '0', 'perl' => '5.008001', 'warnings' => '0' } } }; $x; }