Import OpenSSL 1.1.0i
This commit is contained in:
@@ -21,7 +21,8 @@ $VERSION = "0.8";
|
||||
@EXPORT_OK = (@Test::More::EXPORT_OK, qw(bldtop_dir bldtop_file
|
||||
srctop_dir srctop_file
|
||||
data_file
|
||||
pipe with cmdstr quotify));
|
||||
pipe with cmdstr quotify
|
||||
openssl_versions));
|
||||
|
||||
=head1 NAME
|
||||
|
||||
@@ -695,6 +696,32 @@ sub quotify {
|
||||
return map { $arg_formatter->($_) } @_;
|
||||
}
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<openssl_versions>
|
||||
|
||||
Returns a list of two numbers, the first representing the build version,
|
||||
the second representing the library version. See opensslv.h for more
|
||||
information on those numbers.
|
||||
|
||||
= back
|
||||
|
||||
=cut
|
||||
|
||||
my @versions = ();
|
||||
sub openssl_versions {
|
||||
unless (@versions) {
|
||||
my %lines =
|
||||
map { s/\R$//;
|
||||
/^(.*): (0x[[:xdigit:]]{8})$/;
|
||||
die "Weird line: $_" unless defined $1;
|
||||
$1 => hex($2) }
|
||||
run(test(['versions']), capture => 1);
|
||||
@versions = ( $lines{'Build version'}, $lines{'Library version'} );
|
||||
}
|
||||
return @versions;
|
||||
}
|
||||
|
||||
######################################################################
|
||||
# private functions. These are never exported.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -8,15 +8,17 @@
|
||||
package with_fallback;
|
||||
|
||||
sub import {
|
||||
shift;
|
||||
|
||||
use File::Basename;
|
||||
use File::Spec::Functions;
|
||||
foreach (@_) {
|
||||
eval "require $_";
|
||||
eval "use $_";
|
||||
if ($@) {
|
||||
unshift @INC, catdir(dirname(__FILE__),
|
||||
"..", "..", "external", "perl");
|
||||
my $transfer = "transfer::$_";
|
||||
eval "require $transfer";
|
||||
eval "use $transfer";
|
||||
shift @INC;
|
||||
warn $@ if $@;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user