Update - OpenSSL 1.1.1-pre7-dev
This commit is contained in:
+249
-13
@@ -6,45 +6,281 @@
|
||||
# in the file LICENSE in the source distribution or at
|
||||
# https://www.openssl.org/source/license.html
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use lib '.';
|
||||
use configdata;
|
||||
|
||||
use File::Spec::Functions qw(:DEFAULT rel2abs);
|
||||
use File::Compare qw(compare_text);
|
||||
use feature 'state';
|
||||
|
||||
# When using stat() on Windows, we can get it to perform better by avoid some
|
||||
# data. This doesn't affect the mtime field, so we're not losing anything...
|
||||
${^WIN32_SLOPPY_STAT} = 1;
|
||||
|
||||
my $debug = $ENV{ADD_DEPENDS_DEBUG};
|
||||
my $buildfile = $config{build_file};
|
||||
my $buildfile_new = "$buildfile-$$";
|
||||
my $build_mtime = (stat($buildfile))[9];
|
||||
my $rebuild = 0;
|
||||
my $depext = $target{dep_extension} || ".d";
|
||||
my @deps =
|
||||
grep { -f $_ }
|
||||
my @depfiles =
|
||||
sort
|
||||
grep {
|
||||
# This grep has side effects. Not only does if check the existence
|
||||
# of the dependency file given in $_, but it also checks if it's
|
||||
# newer than the build file, and if it is, sets $rebuild.
|
||||
my @st = stat($_);
|
||||
$rebuild = 1 if @st && $st[9] > $build_mtime;
|
||||
scalar @st > 0; # Determines the grep result
|
||||
}
|
||||
map { (my $x = $_) =~ s|\.o$|$depext|; $x; }
|
||||
grep { $unified_info{sources}->{$_}->[0] =~ /\.cc?$/ }
|
||||
keys %{$unified_info{sources}};
|
||||
|
||||
exit 0 unless $rebuild;
|
||||
|
||||
# Ok, primary checks are done, time to do some real work
|
||||
|
||||
my $producer = shift @ARGV;
|
||||
die "Producer not given\n" unless $producer;
|
||||
|
||||
my $srcdir = $config{sourcedir};
|
||||
my $blddir = $config{builddir};
|
||||
my $abs_srcdir = rel2abs($srcdir);
|
||||
my $abs_blddir = rel2abs($blddir);
|
||||
|
||||
# Convenient cache of absolute to relative map. We start with filling it
|
||||
# with mappings for the known generated header files. They are relative to
|
||||
# the current working directory, so that's an easy task.
|
||||
# NOTE: there's more than C header files that are generated. They will also
|
||||
# generate entries in this map. We could of course deal with C header files
|
||||
# only, but in case we decide to handle more than just C files in the future,
|
||||
# we already have the mechanism in place here.
|
||||
# NOTE2: we lower case the index to make it searchable without regard for
|
||||
# character case. That could seem dangerous, but as long as we don't have
|
||||
# files we depend on in the same directory that only differ by character case,
|
||||
# we're fine.
|
||||
my %depconv_cache =
|
||||
map { lc catfile($abs_blddir, $_) => $_ }
|
||||
keys %{$unified_info{generate}};
|
||||
|
||||
my %procedures = (
|
||||
'gcc' => undef, # gcc style dependency files needs no mods
|
||||
'makedepend' =>
|
||||
sub {
|
||||
# makedepend, in its infinite wisdom, wants to have the object file
|
||||
# in the same directory as the source file. This doesn't work too
|
||||
# well with out-of-source-tree builds, so we must resort to tricks
|
||||
# to get things right. Fortunately, the .d files are always placed
|
||||
# parallel with the object files, so all we need to do is construct
|
||||
# the object file name from the dep file name.
|
||||
(my $objfile = shift) =~ s|\.d$|.o|i;
|
||||
my $line = shift;
|
||||
|
||||
# Discard comments
|
||||
return undef if $line =~ /^(#.*|\s*)$/;
|
||||
|
||||
# Remove the original object file
|
||||
$line =~ s|^.*\.o: | |;
|
||||
# Also, remove any dependency that starts with a /, because those
|
||||
# are typically system headers
|
||||
$line =~ s/\s+\/(\\.|\S)*//g;
|
||||
# Finally, discard all empty lines
|
||||
return undef if $line =~ /^\s*$/;
|
||||
|
||||
# All we got now is a dependency, just shave off surrounding spaces
|
||||
$line =~ s/^\s+//;
|
||||
$line =~ s/\s+$//;
|
||||
return ($objfile, $line);
|
||||
},
|
||||
'VMS C' =>
|
||||
sub {
|
||||
state $abs_srcdir_shaved = undef;
|
||||
state $srcdir_shaved = undef;
|
||||
|
||||
unless (defined $abs_srcdir_shaved) {
|
||||
($abs_srcdir_shaved = $abs_srcdir) =~ s|[>\]]$||;
|
||||
($srcdir_shaved = $srcdir) =~ s|[>\]]$||;
|
||||
}
|
||||
|
||||
# current versions of DEC / Compaq / HP / VSI C strips away all
|
||||
# directory information from the object file, so we must insert it
|
||||
# back. To make life simpler, we simply replace it with the
|
||||
# corresponding .D file that's had its extension changed. Since
|
||||
# .D files are always written parallel to the object files, we
|
||||
# thereby get the directory information for free.
|
||||
(my $objfile = shift) =~ s|\.D$|.OBJ|i;
|
||||
my $line = shift;
|
||||
|
||||
# Shave off the target.
|
||||
#
|
||||
# The pattern for target and dependencies will always take this
|
||||
# form:
|
||||
#
|
||||
# target SPACE : SPACE deps
|
||||
#
|
||||
# This is so a volume delimiter (a : without any spaces around it)
|
||||
# won't get mixed up with the target / deps delimiter. We use this
|
||||
# to easily identify what needs to be removed.
|
||||
m|\s:\s|; $line = $';
|
||||
|
||||
# We know that VMS has system header files in text libraries,
|
||||
# extension .TLB. We also know that our header files aren't stored
|
||||
# in text libraries. Finally, we know that VMS C produces exactly
|
||||
# one dependency per line, so we simply discard any line ending with
|
||||
# .TLB.
|
||||
return undef if /\.TLB\s*$/;
|
||||
|
||||
# All we got now is a dependency, just shave off surrounding spaces
|
||||
$line =~ s/^\s+//;
|
||||
$line =~ s/\s+$//;
|
||||
|
||||
# VMS C gives us absolute paths, always. Let's see if we can
|
||||
# make them relative instead.
|
||||
$line = lc canonpath($line);
|
||||
|
||||
unless (defined $depconv_cache{$line}) {
|
||||
my $dep = $line;
|
||||
# Since we have already pre-populated the cache with
|
||||
# mappings for generated headers, we only need to deal
|
||||
# with the source tree.
|
||||
if ($dep =~ s|^\Q$abs_srcdir_shaved\E([\.>\]])?|$srcdir_shaved$1|i) {
|
||||
$depconv_cache{$line} = $dep;
|
||||
}
|
||||
}
|
||||
return ($objfile, $depconv_cache{$line})
|
||||
if defined $depconv_cache{$line};
|
||||
print STDERR "DEBUG[VMS C]: ignoring $objfile <- $line\n"
|
||||
if $debug;
|
||||
|
||||
return undef;
|
||||
},
|
||||
'VC' =>
|
||||
sub {
|
||||
# For the moment, we only support Visual C on native Windows, or
|
||||
# compatible compilers. With those, the flags /Zs /showIncludes
|
||||
# give us the necessary output to be able to create dependencies
|
||||
# that nmake (or any 'make' implementation) should be able to read,
|
||||
# with a bit of help. The output we're interested in looks like
|
||||
# this (it always starts the same)
|
||||
#
|
||||
# Note: including file: {whatever header file}
|
||||
#
|
||||
# Since there's no object file name at all in that information,
|
||||
# we must construct it ourselves.
|
||||
|
||||
(my $objfile = shift) =~ s|\.d$|.obj|i;
|
||||
my $line = shift;
|
||||
|
||||
# There are also other lines mixed in, for example compiler
|
||||
# warnings, so we simply discard anything that doesn't start with
|
||||
# the Note:
|
||||
|
||||
if (/^Note: including file: */) {
|
||||
(my $tail = $') =~ s/\s*\R$//;
|
||||
|
||||
# VC gives us absolute paths for all include files, so to
|
||||
# remove system header dependencies, we need to check that
|
||||
# they don't match $abs_srcdir or $abs_blddir.
|
||||
$tail = lc canonpath($tail);
|
||||
|
||||
unless (defined $depconv_cache{$tail}) {
|
||||
my $dep = $tail;
|
||||
# Since we have already pre-populated the cache with
|
||||
# mappings for generated headers, we only need to deal
|
||||
# with the source tree.
|
||||
if ($dep =~ s|^\Q$abs_srcdir\E\\|\$(SRCDIR)\\|i) {
|
||||
$depconv_cache{$tail} = $dep;
|
||||
}
|
||||
}
|
||||
return ($objfile, '"'.$depconv_cache{$tail}.'"')
|
||||
if defined $depconv_cache{$tail};
|
||||
print STDERR "DEBUG[VC]: ignoring $objfile <- $tail\n"
|
||||
if $debug;
|
||||
}
|
||||
|
||||
return undef;
|
||||
},
|
||||
);
|
||||
my %continuations = (
|
||||
'gcc' => undef,
|
||||
'makedepend' => "\\",
|
||||
'VMS C' => "-",
|
||||
'VC' => "\\",
|
||||
);
|
||||
|
||||
die "Producer unrecognised: $producer\n"
|
||||
unless exists $procedures{$producer} && exists $continuations{$producer};
|
||||
|
||||
my $procedure = $procedures{$producer};
|
||||
my $continuation = $continuations{$producer};
|
||||
|
||||
my $buildfile_new = "$buildfile-$$";
|
||||
|
||||
my %collect = ();
|
||||
if (defined $procedure) {
|
||||
foreach my $depfile (@depfiles) {
|
||||
open IDEP,$depfile or die "Trying to read $depfile: $!\n";
|
||||
while (<IDEP>) {
|
||||
s|\R$||; # The better chomp
|
||||
my ($target, $deps) = $procedure->($depfile, $_);
|
||||
$collect{$target}->{$deps} = 1 if defined $target;
|
||||
}
|
||||
close IDEP;
|
||||
}
|
||||
}
|
||||
|
||||
open IBF, $buildfile or die "Trying to read $buildfile: $!\n";
|
||||
open OBF, '>', $buildfile_new or die "Trying to write $buildfile_new: $!\n";
|
||||
while (<IBF>) {
|
||||
$force_rewrite = 0;
|
||||
last if /^# DO NOT DELETE THIS LINE/;
|
||||
print OBF or die "$!\n";
|
||||
$force_rewrite = 1;
|
||||
}
|
||||
close IBF;
|
||||
|
||||
print OBF "# DO NOT DELETE THIS LINE -- make depend depends on it.\n";
|
||||
|
||||
foreach (@deps) {
|
||||
open IBF,$_ or die "Trying to read $_: $!\n";
|
||||
while (<IBF>) {
|
||||
print OBF or die "$!\n";
|
||||
if (defined $procedure) {
|
||||
foreach my $target (sort keys %collect) {
|
||||
my $prefix = $target . ' :';
|
||||
my @deps = sort keys %{$collect{$target}};
|
||||
|
||||
while (@deps) {
|
||||
my $buf = $prefix;
|
||||
$prefix = '';
|
||||
|
||||
while (@deps && ($buf eq ''
|
||||
|| length($buf) + length($deps[0]) <= 77)) {
|
||||
$buf .= ' ' . shift @deps;
|
||||
}
|
||||
$buf .= ' '.$continuation if @deps;
|
||||
|
||||
print OBF $buf,"\n" or die "Trying to print: $!\n"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach my $depfile (@depfiles) {
|
||||
open IDEP,$depfile or die "Trying to read $depfile: $!\n";
|
||||
while (<IDEP>) {
|
||||
print OBF or die "Trying to print: $!\n";
|
||||
}
|
||||
close IDEP;
|
||||
}
|
||||
close IBF;
|
||||
}
|
||||
|
||||
close OBF;
|
||||
|
||||
if (compare_text($buildfile_new, $buildfile) != 0) {
|
||||
rename $buildfile_new, $buildfile
|
||||
or die "Trying to rename $buildfile_new -> $buildfile: $!\n";
|
||||
}
|
||||
# On VMS, we want to remove all generations of this file, in case there are
|
||||
# more than one
|
||||
while (unlink $buildfile_new) {}
|
||||
|
||||
END {
|
||||
# On VMS, we want to remove all generations of this file, in case there
|
||||
# are more than one, so we loop.
|
||||
if (defined $buildfile_new) {
|
||||
while (unlink $buildfile_new) {}
|
||||
}
|
||||
}
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#! /bin/sh
|
||||
# Copyright 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
|
||||
# in the file LICENSE in the source distribution or at
|
||||
# https://www.openssl.org/source/license.html
|
||||
|
||||
(
|
||||
pcregrep -rnM 'OPENSSL_.?alloc.*\n.*if.*NULL.*\n.*return' crypto ssl
|
||||
pcregrep -rnM 'if.*OPENSSL_.?alloc.*NULL.*\n.*.*return' crypto ssl
|
||||
) | tee /tmp/out$$
|
||||
X=0
|
||||
test -s /tmp/out$$ && X=1
|
||||
rm /tmp/out$$
|
||||
exit $X
|
||||
+8
-2
@@ -18,6 +18,7 @@ use Fcntl;
|
||||
my $stripcr = 0;
|
||||
|
||||
my $arg;
|
||||
my @excludes = ();
|
||||
|
||||
foreach $arg (@ARGV) {
|
||||
if ($arg eq "-stripcr")
|
||||
@@ -25,11 +26,16 @@ foreach $arg (@ARGV) {
|
||||
$stripcr = 1;
|
||||
next;
|
||||
}
|
||||
if ($arg =~ /^-exclude_re=(.*)$/)
|
||||
{
|
||||
push @excludes, $1;
|
||||
next;
|
||||
}
|
||||
$arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob...
|
||||
$arg = qq("$arg") if ($arg =~ /\s/); # compensate for bug in 5.10...
|
||||
foreach (glob $arg)
|
||||
foreach my $f (glob $arg)
|
||||
{
|
||||
push @filelist, $_;
|
||||
push @filelist, $f unless grep { $f =~ /$_/ } @excludes;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# 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
|
||||
@@ -99,9 +99,9 @@ package main;
|
||||
# This adds quotes (") around the given string, and escapes any $, @, \,
|
||||
# " and ' by prepending a \ to them.
|
||||
sub quotify1 {
|
||||
my $s = my $orig = shift @_;
|
||||
my $s = shift @_;
|
||||
$s =~ s/([\$\@\\"'])/\\$1/g;
|
||||
$s ne $orig || $s =~ /\s/ ? '"'.$s.'"' : $s;
|
||||
'"'.$s.'"';
|
||||
}
|
||||
|
||||
# quotify_l LIST
|
||||
|
||||
@@ -636,3 +636,4 @@
|
||||
-T ossl_intmax_t
|
||||
-T ossl_uintmax_t
|
||||
-T ossl_uintmax_t
|
||||
-T CT_POLICY_EVAL_CTX
|
||||
+131
-120
@@ -4402,123 +4402,134 @@ EVP_PKEY_set1_engine 4347 1_1_0g EXIST::FUNCTION:ENGINE
|
||||
DH_new_by_nid 4348 1_1_1 EXIST::FUNCTION:DH
|
||||
DH_get_nid 4349 1_1_1 EXIST::FUNCTION:DH
|
||||
CRYPTO_get_alloc_counts 4350 1_1_1 EXIST::FUNCTION:CRYPTO_MDEBUG
|
||||
RAND_POOL_new 4351 1_1_1 EXIST::FUNCTION:
|
||||
RAND_POOL_free 4352 1_1_1 EXIST::FUNCTION:
|
||||
RAND_POOL_buffer 4353 1_1_1 EXIST::FUNCTION:
|
||||
RAND_POOL_detach 4354 1_1_1 EXIST::FUNCTION:
|
||||
RAND_POOL_entropy 4355 1_1_1 EXIST::FUNCTION:
|
||||
RAND_POOL_length 4356 1_1_1 EXIST::FUNCTION:
|
||||
RAND_POOL_entropy_available 4357 1_1_1 EXIST::FUNCTION:
|
||||
RAND_POOL_entropy_needed 4358 1_1_1 EXIST::FUNCTION:
|
||||
RAND_POOL_bytes_needed 4359 1_1_1 EXIST::FUNCTION:
|
||||
RAND_POOL_bytes_remaining 4360 1_1_1 EXIST::FUNCTION:
|
||||
RAND_POOL_add 4361 1_1_1 EXIST::FUNCTION:
|
||||
RAND_POOL_add_begin 4362 1_1_1 EXIST::FUNCTION:
|
||||
RAND_POOL_add_end 4363 1_1_1 EXIST::FUNCTION:
|
||||
RAND_POOL_acquire_entropy 4364 1_1_1 EXIST::FUNCTION:
|
||||
OPENSSL_sk_new_reserve 4365 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_asn1_set_check 4366 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_asn1_set_siginf 4367 1_1_1 EXIST::FUNCTION:
|
||||
EVP_sm4_ctr 4368 1_1_1 EXIST::FUNCTION:SM4
|
||||
EVP_sm4_cbc 4369 1_1_1 EXIST::FUNCTION:SM4
|
||||
EVP_sm4_ofb 4370 1_1_1 EXIST::FUNCTION:SM4
|
||||
EVP_sm4_ecb 4371 1_1_1 EXIST::FUNCTION:SM4
|
||||
EVP_sm4_cfb128 4372 1_1_1 EXIST::FUNCTION:SM4
|
||||
EVP_sm3 4373 1_1_1 EXIST::FUNCTION:SM3
|
||||
OCSP_resp_get0_signer 4374 1_1_0h EXIST::FUNCTION:OCSP
|
||||
EVP_PKEY_public_check 4375 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_param_check 4376 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_meth_set_public_check 4377 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_meth_set_param_check 4378 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_meth_get_public_check 4379 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_meth_get_param_check 4380 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_asn1_set_public_check 4381 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_asn1_set_param_check 4382 1_1_1 EXIST::FUNCTION:
|
||||
DH_check_ex 4383 1_1_1 EXIST::FUNCTION:DH
|
||||
DH_check_pub_key_ex 4384 1_1_1 EXIST::FUNCTION:DH
|
||||
DH_check_params_ex 4385 1_1_1 EXIST::FUNCTION:DH
|
||||
RSA_generate_multi_prime_key 4386 1_1_1 EXIST::FUNCTION:RSA
|
||||
RSA_get_multi_prime_extra_count 4387 1_1_1 EXIST::FUNCTION:RSA
|
||||
RSA_get0_multi_prime_factors 4388 1_1_1 EXIST::FUNCTION:RSA
|
||||
RSA_get0_multi_prime_crt_params 4389 1_1_1 EXIST::FUNCTION:RSA
|
||||
RSA_set0_multi_prime_params 4390 1_1_1 EXIST::FUNCTION:RSA
|
||||
RSA_get_version 4391 1_1_1 EXIST::FUNCTION:RSA
|
||||
RSA_meth_get_multi_prime_keygen 4392 1_1_1 EXIST::FUNCTION:RSA
|
||||
RSA_meth_set_multi_prime_keygen 4393 1_1_1 EXIST::FUNCTION:RSA
|
||||
RAND_DRBG_get0_master 4394 1_1_1 EXIST::FUNCTION:
|
||||
RAND_DRBG_set_reseed_time_interval 4395 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_get0_addProfessionInfo 4396 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSION_SYNTAX_free 4397 1_1_1 EXIST::FUNCTION:
|
||||
d2i_ADMISSION_SYNTAX 4398 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_set0_authorityId 4399 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_set0_authorityURL 4400 1_1_1 EXIST::FUNCTION:
|
||||
d2i_PROFESSION_INFO 4401 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_it 4402 1_1_1 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
|
||||
NAMING_AUTHORITY_it 4402 1_1_1 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
|
||||
ADMISSION_SYNTAX_get0_contentsOfAdmissions 4403 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_set0_professionItems 4404 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_new 4405 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_get0_authorityURL 4406 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSION_SYNTAX_get0_admissionAuthority 4407 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_new 4408 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_new 4409 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSION_SYNTAX_set0_admissionAuthority 4410 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_get0_professionOIDs 4411 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_it 4412 1_1_1 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
|
||||
PROFESSION_INFO_it 4412 1_1_1 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
|
||||
i2d_PROFESSION_INFO 4413 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_set0_professionInfos 4414 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_get0_namingAuthority 4415 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_free 4416 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_set0_addProfessionInfo 4417 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_set0_registrationNumber 4418 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSION_SYNTAX_set0_contentsOfAdmissions 4419 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_get0_authorityId 4420 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSION_SYNTAX_it 4421 1_1_1 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
|
||||
ADMISSION_SYNTAX_it 4421 1_1_1 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
|
||||
i2d_ADMISSION_SYNTAX 4422 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_get0_authorityText 4423 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_set0_namingAuthority 4424 1_1_1 EXIST::FUNCTION:
|
||||
i2d_NAMING_AUTHORITY 4425 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_free 4426 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_set0_admissionAuthority 4427 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_free 4428 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_get0_registrationNumber 4429 1_1_1 EXIST::FUNCTION:
|
||||
d2i_ADMISSIONS 4430 1_1_1 EXIST::FUNCTION:
|
||||
i2d_ADMISSIONS 4431 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_get0_professionItems 4432 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_get0_admissionAuthority 4433 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_set0_professionOIDs 4434 1_1_1 EXIST::FUNCTION:
|
||||
d2i_NAMING_AUTHORITY 4435 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_it 4436 1_1_1 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
|
||||
ADMISSIONS_it 4436 1_1_1 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
|
||||
ADMISSIONS_get0_namingAuthority 4437 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_set0_authorityText 4438 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_set0_namingAuthority 4439 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_get0_professionInfos 4440 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSION_SYNTAX_new 4441 1_1_1 EXIST::FUNCTION:
|
||||
EVP_sha512_256 4442 1_1_1 EXIST::FUNCTION:
|
||||
EVP_sha512_224 4443 1_1_1 EXIST::FUNCTION:
|
||||
OCSP_basic_sign_ctx 4444 1_1_1 EXIST::FUNCTION:OCSP
|
||||
RAND_DRBG_bytes 4445 1_1_1 EXIST::FUNCTION:
|
||||
RAND_DRBG_secure_new 4446 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_vctrl 4447 1_1_1 EXIST::FUNCTION:
|
||||
X509_get0_authority_key_id 4448 1_1_0h EXIST::FUNCTION:
|
||||
BIO_bind 4449 1_1_1 EXIST::FUNCTION:SOCK
|
||||
OSSL_STORE_LOADER_set_expect 4450 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_expect 4451 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_by_key_fingerprint 4452 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_get0_serial 4453 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_by_name 4454 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_supports_search 4455 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_find 4456 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_get_type 4457 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_get0_bytes 4458 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_get0_string 4459 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_by_issuer_serial 4460 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_get0_name 4461 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_by_alias 4462 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_LOADER_set_find 4463 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_free 4464 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_get0_digest 4465 1_1_1 EXIST::FUNCTION:
|
||||
RAND_DRBG_set_reseed_defaults 4466 1_1_1 EXIST::FUNCTION:
|
||||
OPENSSL_sk_new_reserve 4351 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_asn1_set_check 4352 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_asn1_set_siginf 4353 1_1_1 EXIST::FUNCTION:
|
||||
EVP_sm4_ctr 4354 1_1_1 EXIST::FUNCTION:SM4
|
||||
EVP_sm4_cbc 4355 1_1_1 EXIST::FUNCTION:SM4
|
||||
EVP_sm4_ofb 4356 1_1_1 EXIST::FUNCTION:SM4
|
||||
EVP_sm4_ecb 4357 1_1_1 EXIST::FUNCTION:SM4
|
||||
EVP_sm4_cfb128 4358 1_1_1 EXIST::FUNCTION:SM4
|
||||
EVP_sm3 4359 1_1_1 EXIST::FUNCTION:SM3
|
||||
OCSP_resp_get0_signer 4360 1_1_0h EXIST::FUNCTION:OCSP
|
||||
EVP_PKEY_public_check 4361 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_param_check 4362 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_meth_set_public_check 4363 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_meth_set_param_check 4364 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_meth_get_public_check 4365 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_meth_get_param_check 4366 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_asn1_set_public_check 4367 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_asn1_set_param_check 4368 1_1_1 EXIST::FUNCTION:
|
||||
DH_check_ex 4369 1_1_1 EXIST::FUNCTION:DH
|
||||
DH_check_pub_key_ex 4370 1_1_1 EXIST::FUNCTION:DH
|
||||
DH_check_params_ex 4371 1_1_1 EXIST::FUNCTION:DH
|
||||
RSA_generate_multi_prime_key 4372 1_1_1 EXIST::FUNCTION:RSA
|
||||
RSA_get_multi_prime_extra_count 4373 1_1_1 EXIST::FUNCTION:RSA
|
||||
RSA_get0_multi_prime_factors 4374 1_1_1 EXIST::FUNCTION:RSA
|
||||
RSA_get0_multi_prime_crt_params 4375 1_1_1 EXIST::FUNCTION:RSA
|
||||
RSA_set0_multi_prime_params 4376 1_1_1 EXIST::FUNCTION:RSA
|
||||
RSA_get_version 4377 1_1_1 EXIST::FUNCTION:RSA
|
||||
RSA_meth_get_multi_prime_keygen 4378 1_1_1 EXIST::FUNCTION:RSA
|
||||
RSA_meth_set_multi_prime_keygen 4379 1_1_1 EXIST::FUNCTION:RSA
|
||||
RAND_DRBG_get0_master 4380 1_1_1 EXIST::FUNCTION:
|
||||
RAND_DRBG_set_reseed_time_interval 4381 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_get0_addProfessionInfo 4382 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSION_SYNTAX_free 4383 1_1_1 EXIST::FUNCTION:
|
||||
d2i_ADMISSION_SYNTAX 4384 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_set0_authorityId 4385 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_set0_authorityURL 4386 1_1_1 EXIST::FUNCTION:
|
||||
d2i_PROFESSION_INFO 4387 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_it 4388 1_1_1 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
|
||||
NAMING_AUTHORITY_it 4388 1_1_1 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
|
||||
ADMISSION_SYNTAX_get0_contentsOfAdmissions 4389 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_set0_professionItems 4390 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_new 4391 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_get0_authorityURL 4392 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSION_SYNTAX_get0_admissionAuthority 4393 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_new 4394 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_new 4395 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSION_SYNTAX_set0_admissionAuthority 4396 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_get0_professionOIDs 4397 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_it 4398 1_1_1 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
|
||||
PROFESSION_INFO_it 4398 1_1_1 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
|
||||
i2d_PROFESSION_INFO 4399 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_set0_professionInfos 4400 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_get0_namingAuthority 4401 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_free 4402 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_set0_addProfessionInfo 4403 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_set0_registrationNumber 4404 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSION_SYNTAX_set0_contentsOfAdmissions 4405 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_get0_authorityId 4406 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSION_SYNTAX_it 4407 1_1_1 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
|
||||
ADMISSION_SYNTAX_it 4407 1_1_1 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
|
||||
i2d_ADMISSION_SYNTAX 4408 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_get0_authorityText 4409 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_set0_namingAuthority 4410 1_1_1 EXIST::FUNCTION:
|
||||
i2d_NAMING_AUTHORITY 4411 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_free 4412 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_set0_admissionAuthority 4413 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_free 4414 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_get0_registrationNumber 4415 1_1_1 EXIST::FUNCTION:
|
||||
d2i_ADMISSIONS 4416 1_1_1 EXIST::FUNCTION:
|
||||
i2d_ADMISSIONS 4417 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_get0_professionItems 4418 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_get0_admissionAuthority 4419 1_1_1 EXIST::FUNCTION:
|
||||
PROFESSION_INFO_set0_professionOIDs 4420 1_1_1 EXIST::FUNCTION:
|
||||
d2i_NAMING_AUTHORITY 4421 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_it 4422 1_1_1 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
|
||||
ADMISSIONS_it 4422 1_1_1 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
|
||||
ADMISSIONS_get0_namingAuthority 4423 1_1_1 EXIST::FUNCTION:
|
||||
NAMING_AUTHORITY_set0_authorityText 4424 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_set0_namingAuthority 4425 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSIONS_get0_professionInfos 4426 1_1_1 EXIST::FUNCTION:
|
||||
ADMISSION_SYNTAX_new 4427 1_1_1 EXIST::FUNCTION:
|
||||
EVP_sha512_256 4428 1_1_1 EXIST::FUNCTION:
|
||||
EVP_sha512_224 4429 1_1_1 EXIST::FUNCTION:
|
||||
OCSP_basic_sign_ctx 4430 1_1_1 EXIST::FUNCTION:OCSP
|
||||
RAND_DRBG_bytes 4431 1_1_1 EXIST::FUNCTION:
|
||||
RAND_DRBG_secure_new 4432 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_vctrl 4433 1_1_1 EXIST::FUNCTION:
|
||||
X509_get0_authority_key_id 4434 1_1_0h EXIST::FUNCTION:
|
||||
BIO_bind 4435 1_1_1 EXIST::FUNCTION:SOCK
|
||||
OSSL_STORE_LOADER_set_expect 4436 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_expect 4437 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_by_key_fingerprint 4438 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_get0_serial 4439 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_by_name 4440 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_supports_search 4441 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_find 4442 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_get_type 4443 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_get0_bytes 4444 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_get0_string 4445 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_by_issuer_serial 4446 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_get0_name 4447 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_by_alias 4448 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_LOADER_set_find 4449 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_free 4450 1_1_1 EXIST::FUNCTION:
|
||||
OSSL_STORE_SEARCH_get0_digest 4451 1_1_1 EXIST::FUNCTION:
|
||||
RAND_DRBG_set_reseed_defaults 4452 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_new_raw_private_key 4453 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_new_raw_public_key 4454 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_new_CMAC_key 4455 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_asn1_set_set_priv_key 4456 1_1_1 EXIST::FUNCTION:
|
||||
EVP_PKEY_asn1_set_set_pub_key 4457 1_1_1 EXIST::FUNCTION:
|
||||
RAND_DRBG_set_defaults 4458 1_1_1 EXIST::FUNCTION:
|
||||
SM2_decrypt 4459 1_1_1 EXIST::FUNCTION:SM2
|
||||
SM2_do_sign 4460 1_1_1 EXIST::FUNCTION:SM2
|
||||
SM2_compute_userid_digest 4461 1_1_1 EXIST::FUNCTION:SM2
|
||||
SM2_encrypt 4462 1_1_1 EXIST::FUNCTION:SM2
|
||||
SM2_ciphertext_size 4463 1_1_1 EXIST::FUNCTION:SM2
|
||||
SM2_verify 4464 1_1_1 EXIST::FUNCTION:SM2
|
||||
SM2_do_verify 4465 1_1_1 EXIST::FUNCTION:SM2
|
||||
SM2_sign 4466 1_1_1 EXIST::FUNCTION:SM2
|
||||
ERR_load_SM2_strings 4467 1_1_1 EXIST::FUNCTION:SM2
|
||||
SM2_plaintext_size 4468 1_1_1 EXIST::FUNCTION:SM2
|
||||
conf_ssl_name_find 4469 1_1_0i EXIST::FUNCTION:
|
||||
conf_ssl_get_cmd 4470 1_1_0i EXIST::FUNCTION:
|
||||
conf_ssl_get 4471 1_1_0i EXIST::FUNCTION:
|
||||
X509_VERIFY_PARAM_get_hostflags 4472 1_1_0i EXIST::FUNCTION:
|
||||
DH_get0_p 4473 1_1_0i EXIST::FUNCTION:DH
|
||||
DH_get0_q 4474 1_1_0i EXIST::FUNCTION:DH
|
||||
DH_get0_g 4475 1_1_0i EXIST::FUNCTION:DH
|
||||
DH_get0_priv_key 4476 1_1_0i EXIST::FUNCTION:DH
|
||||
DH_get0_pub_key 4477 1_1_0i EXIST::FUNCTION:DH
|
||||
@@ -484,3 +484,9 @@ SSL_SESSION_set1_ticket_appdata 484 1_1_1 EXIST::FUNCTION:
|
||||
SSL_CTX_set_session_ticket_cb 485 1_1_1 EXIST::FUNCTION:
|
||||
SSL_CTX_set_stateless_cookie_generate_cb 486 1_1_1 EXIST::FUNCTION:
|
||||
SSL_CTX_set_stateless_cookie_verify_cb 487 1_1_1 EXIST::FUNCTION:
|
||||
SSL_CTX_set_ciphersuites 488 1_1_1 EXIST::FUNCTION:
|
||||
SSL_set_ciphersuites 489 1_1_1 EXIST::FUNCTION:
|
||||
SSL_set_num_tickets 490 1_1_1 EXIST::FUNCTION:
|
||||
SSL_CTX_get_num_tickets 491 1_1_1 EXIST::FUNCTION:
|
||||
SSL_get_num_tickets 492 1_1_1 EXIST::FUNCTION:
|
||||
SSL_CTX_set_num_tickets 493 1_1_1 EXIST::FUNCTION:
|
||||
+1
-1
@@ -241,7 +241,7 @@ my $crypto ="include/internal/dso.h";
|
||||
$crypto.=" include/internal/o_dir.h";
|
||||
$crypto.=" include/internal/o_str.h";
|
||||
$crypto.=" include/internal/err.h";
|
||||
$crypto.=" include/internal/rand.h";
|
||||
$crypto.=" include/internal/sslconf.h";
|
||||
foreach my $f ( glob(catfile($config{sourcedir},'include/openssl/*.h')) ) {
|
||||
my $fn = "include/openssl/" . lc(basename($f));
|
||||
$crypto .= " $fn" if !defined $skipthese{$fn};
|
||||
|
||||
+11
-10
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2006-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
|
||||
@@ -39,13 +39,14 @@ while (<FD>) {
|
||||
close(FD);
|
||||
|
||||
my $filename = $ARGV[0];
|
||||
$filename =~ /(.*)\.([^.]+)$/;
|
||||
my $basename = $1;
|
||||
my $extname = $2;
|
||||
|
||||
my $description = "OpenSSL application";
|
||||
$description = "OpenSSL shared library" if $extname =~ /dll/i;
|
||||
my $description = "OpenSSL library";
|
||||
my $vft = "VFT_DLL";
|
||||
if ( $filename =~ /openssl/i ) {
|
||||
$description = "OpenSSL application";
|
||||
$vft = "VFT_APP";
|
||||
}
|
||||
|
||||
my $YEAR = [localtime()]->[5] + 1900;
|
||||
print <<___;
|
||||
#include <winver.h>
|
||||
|
||||
@@ -61,7 +62,7 @@ LANGUAGE 0x09,0x01
|
||||
FILEFLAGS 0x00L
|
||||
#endif
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_DLL
|
||||
FILETYPE $vft
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
@@ -72,13 +73,13 @@ BEGIN
|
||||
VALUE "CompanyName", "The OpenSSL Project, http://www.openssl.org/\\0"
|
||||
VALUE "FileDescription", "$description\\0"
|
||||
VALUE "FileVersion", "$version\\0"
|
||||
VALUE "InternalName", "$basename\\0"
|
||||
VALUE "InternalName", "$filename\\0"
|
||||
VALUE "OriginalFilename", "$filename\\0"
|
||||
VALUE "ProductName", "The OpenSSL Toolkit\\0"
|
||||
VALUE "ProductVersion", "$version\\0"
|
||||
// Optional:
|
||||
//VALUE "Comments", "\\0"
|
||||
VALUE "LegalCopyright", "Copyright 1998-2016 The OpenSSL Authors. All rights reserved.\\0"
|
||||
VALUE "LegalCopyright", "Copyright 1998-$YEAR The OpenSSL Authors. All rights reserved.\\0"
|
||||
//VALUE "LegalTrademarks", "\\0"
|
||||
//VALUE "PrivateBuild", "\\0"
|
||||
//VALUE "SpecialBuild", "\\0"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -606,6 +607,23 @@ sub srctop_file {
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<data_dir LIST>
|
||||
|
||||
LIST is a list of directories that make up a path from the data directory
|
||||
associated with the test (see L</DESCRIPTION> above).
|
||||
C<data_dir> returns the resulting directory as a string, adapted to the local
|
||||
operating system.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub data_dir {
|
||||
return __data_dir(@_);
|
||||
}
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<data_file LIST, FILENAME>
|
||||
|
||||
LIST is a list of directories that make up a path from the data directory
|
||||
@@ -788,6 +806,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.
|
||||
|
||||
@@ -940,6 +984,12 @@ sub __data_file {
|
||||
return catfile($directories{SRCDATA},@_,$f);
|
||||
}
|
||||
|
||||
sub __data_dir {
|
||||
BAIL_OUT("Must run setup() first") if (! $test_name);
|
||||
|
||||
return catdir($directories{SRCDATA},@_);
|
||||
}
|
||||
|
||||
sub __results_file {
|
||||
BAIL_OUT("Must run setup() first") if (! $test_name);
|
||||
|
||||
|
||||
@@ -267,14 +267,17 @@ sub get_messages
|
||||
}
|
||||
} elsif ($record->content_type == TLSProxy::Record::RT_ALERT) {
|
||||
my ($alertlev, $alertdesc) = unpack('CC', $record->decrypt_data);
|
||||
print " [$alertlev, $alertdesc]\n";
|
||||
#A CloseNotify from the client indicates we have finished successfully
|
||||
#(we assume)
|
||||
if (!$end && !$server && $alertlev == AL_LEVEL_WARN
|
||||
&& $alertdesc == AL_DESC_CLOSE_NOTIFY) {
|
||||
$success = 1;
|
||||
}
|
||||
#All alerts end the test
|
||||
$end = 1;
|
||||
#Fatal or close notify alerts end the test
|
||||
if ($alertlev == AL_LEVEL_FATAL || $alertdesc == AL_DESC_CLOSE_NOTIFY) {
|
||||
$end = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return @messages;
|
||||
|
||||
+320
-196
@@ -22,52 +22,16 @@ use TLSProxy::Certificate;
|
||||
use TLSProxy::CertificateVerify;
|
||||
use TLSProxy::ServerKeyExchange;
|
||||
use TLSProxy::NewSessionTicket;
|
||||
use Time::HiRes qw/usleep/;
|
||||
|
||||
my $have_IPv6 = 0;
|
||||
my $have_IPv6;
|
||||
my $IP_factory;
|
||||
|
||||
my $is_tls13 = 0;
|
||||
my $ciphersuite = undef;
|
||||
|
||||
sub new
|
||||
BEGIN
|
||||
{
|
||||
my $class = shift;
|
||||
my ($filter,
|
||||
$execute,
|
||||
$cert,
|
||||
$debug) = @_;
|
||||
|
||||
my $self = {
|
||||
#Public read/write
|
||||
proxy_addr => "localhost",
|
||||
proxy_port => 4453,
|
||||
server_addr => "localhost",
|
||||
server_port => 4443,
|
||||
filter => $filter,
|
||||
serverflags => "",
|
||||
clientflags => "",
|
||||
serverconnects => 1,
|
||||
serverpid => 0,
|
||||
clientpid => 0,
|
||||
reneg => 0,
|
||||
sessionfile => undef,
|
||||
|
||||
#Public read
|
||||
execute => $execute,
|
||||
cert => $cert,
|
||||
debug => $debug,
|
||||
cipherc => "",
|
||||
ciphers => "AES128-SHA:TLS13-AES-128-GCM-SHA256",
|
||||
flight => 0,
|
||||
record_list => [],
|
||||
message_list => [],
|
||||
};
|
||||
|
||||
# IO::Socket::IP is on the core module list, IO::Socket::INET6 isn't.
|
||||
# However, IO::Socket::INET6 is older and is said to be more widely
|
||||
# deployed for the moment, and may have less bugs, so we try the latter
|
||||
# first, then fall back on the code modules. Worst case scenario, we
|
||||
# first, then fall back on the core modules. Worst case scenario, we
|
||||
# fall back to IO::Socket::INET, only supports IPv4.
|
||||
eval {
|
||||
require IO::Socket::INET6;
|
||||
@@ -98,26 +62,72 @@ sub new
|
||||
$have_IPv6 = 1;
|
||||
} else {
|
||||
$IP_factory = sub { IO::Socket::INET->new(@_); };
|
||||
$have_IPv6 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $is_tls13 = 0;
|
||||
my $ciphersuite = undef;
|
||||
|
||||
sub new
|
||||
{
|
||||
my $class = shift;
|
||||
my ($filter,
|
||||
$execute,
|
||||
$cert,
|
||||
$debug) = @_;
|
||||
|
||||
my $self = {
|
||||
#Public read/write
|
||||
proxy_addr => $have_IPv6 ? "[::1]" : "127.0.0.1",
|
||||
filter => $filter,
|
||||
serverflags => "",
|
||||
clientflags => "",
|
||||
serverconnects => 1,
|
||||
reneg => 0,
|
||||
sessionfile => undef,
|
||||
|
||||
#Public read
|
||||
proxy_port => 0,
|
||||
server_port => 0,
|
||||
serverpid => 0,
|
||||
clientpid => 0,
|
||||
execute => $execute,
|
||||
cert => $cert,
|
||||
debug => $debug,
|
||||
cipherc => "",
|
||||
ciphersuitesc => "",
|
||||
ciphers => "AES128-SHA",
|
||||
ciphersuitess => "TLS_AES_128_GCM_SHA256",
|
||||
flight => -1,
|
||||
direction => -1,
|
||||
partial => ["", ""],
|
||||
record_list => [],
|
||||
message_list => [],
|
||||
};
|
||||
|
||||
# Create the Proxy socket
|
||||
my $proxaddr = $self->{proxy_addr};
|
||||
$proxaddr =~ s/[\[\]]//g; # Remove [ and ]
|
||||
my @proxyargs = (
|
||||
LocalHost => $proxaddr,
|
||||
LocalPort => $self->{proxy_port},
|
||||
LocalPort => 0,
|
||||
Proto => "tcp",
|
||||
Listen => SOMAXCONN,
|
||||
);
|
||||
push @proxyargs, ReuseAddr => 1
|
||||
unless $^O eq "MSWin32";
|
||||
$self->{proxy_sock} = $IP_factory->(@proxyargs);
|
||||
|
||||
if ($self->{proxy_sock}) {
|
||||
print "Proxy started on port ".$self->{proxy_port}."\n";
|
||||
if (my $sock = $IP_factory->(@proxyargs)) {
|
||||
$self->{proxy_sock} = $sock;
|
||||
$self->{proxy_port} = $sock->sockport();
|
||||
$self->{proxy_addr} = $sock->sockhost();
|
||||
$self->{proxy_addr} =~ s/(.*:.*)/[$1]/;
|
||||
print "Proxy started on port ",
|
||||
"$self->{proxy_addr}:$self->{proxy_port}\n";
|
||||
# use same address for s_server
|
||||
$self->{server_addr} = $self->{proxy_addr};
|
||||
} else {
|
||||
warn "Failed creating proxy socket (".$proxaddr.",".$self->{proxy_port}."): $!\n";
|
||||
warn "Failed creating proxy socket (".$proxaddr.",0): $!\n";
|
||||
}
|
||||
|
||||
return bless $self, $class;
|
||||
@@ -135,7 +145,10 @@ sub clearClient
|
||||
my $self = shift;
|
||||
|
||||
$self->{cipherc} = "";
|
||||
$self->{flight} = 0;
|
||||
$self->{ciphersuitec} = "";
|
||||
$self->{flight} = -1;
|
||||
$self->{direction} = -1;
|
||||
$self->{partial} = ["", ""];
|
||||
$self->{record_list} = [];
|
||||
$self->{message_list} = [];
|
||||
$self->{clientflags} = "";
|
||||
@@ -153,7 +166,8 @@ sub clear
|
||||
my $self = shift;
|
||||
|
||||
$self->clearClient;
|
||||
$self->{ciphers} = "AES128-SHA:TLS13-AES-128-GCM-SHA256";
|
||||
$self->{ciphers} = "AES128-SHA";
|
||||
$self->{ciphersuitess} = "TLS_AES_128_GCM_SHA256";
|
||||
$self->{serverflags} = "";
|
||||
$self->{serverconnects} = 1;
|
||||
$self->{serverpid} = 0;
|
||||
@@ -176,6 +190,25 @@ sub clientrestart
|
||||
$self->clientstart;
|
||||
}
|
||||
|
||||
sub connect_to_server
|
||||
{
|
||||
my $self = shift;
|
||||
my $servaddr = $self->{server_addr};
|
||||
|
||||
$servaddr =~ s/[\[\]]//g; # Remove [ and ]
|
||||
|
||||
my $sock = $IP_factory->(PeerAddr => $servaddr,
|
||||
PeerPort => $self->{server_port},
|
||||
Proto => 'tcp');
|
||||
if (!defined($sock)) {
|
||||
my $err = $!;
|
||||
kill(3, $self->{real_serverpid});
|
||||
die "unable to connect: $err\n";
|
||||
}
|
||||
|
||||
$self->{server_sock} = $sock;
|
||||
}
|
||||
|
||||
sub start
|
||||
{
|
||||
my ($self) = shift;
|
||||
@@ -185,28 +218,90 @@ sub start
|
||||
return 0;
|
||||
}
|
||||
|
||||
$pid = fork();
|
||||
if ($pid == 0) {
|
||||
my $execcmd = $self->execute
|
||||
." s_server -no_comp -rev -engine ossltest -accept "
|
||||
.($self->server_port)
|
||||
." -cert ".$self->cert." -cert2 ".$self->cert
|
||||
." -naccept ".$self->serverconnects;
|
||||
unless ($self->supports_IPv6) {
|
||||
$execcmd .= " -4";
|
||||
}
|
||||
if ($self->ciphers ne "") {
|
||||
$execcmd .= " -cipher ".$self->ciphers;
|
||||
}
|
||||
if ($self->serverflags ne "") {
|
||||
$execcmd .= " ".$self->serverflags;
|
||||
}
|
||||
if ($self->debug) {
|
||||
print STDERR "Server command: $execcmd\n";
|
||||
}
|
||||
exec($execcmd);
|
||||
my $execcmd = $self->execute
|
||||
." s_server -max_protocol TLSv1.3 -no_comp -rev -engine ossltest"
|
||||
#In TLSv1.3 we issue two session tickets. The default session id
|
||||
#callback gets confused because the ossltest engine causes the same
|
||||
#session id to be created twice due to the changed random number
|
||||
#generation. Using "-ext_cache" replaces the default callback with a
|
||||
#different one that doesn't get confused.
|
||||
." -ext_cache"
|
||||
." -accept $self->{server_addr}:0"
|
||||
." -cert ".$self->cert." -cert2 ".$self->cert
|
||||
." -naccept ".$self->serverconnects;
|
||||
if ($self->ciphers ne "") {
|
||||
$execcmd .= " -cipher ".$self->ciphers;
|
||||
}
|
||||
$self->serverpid($pid);
|
||||
if ($self->ciphersuitess ne "") {
|
||||
$execcmd .= " -ciphersuites ".$self->ciphersuitess;
|
||||
}
|
||||
if ($self->serverflags ne "") {
|
||||
$execcmd .= " ".$self->serverflags;
|
||||
}
|
||||
if ($self->debug) {
|
||||
print STDERR "Server command: $execcmd\n";
|
||||
}
|
||||
|
||||
open(my $savedin, "<&STDIN");
|
||||
|
||||
# Temporarily replace STDIN so that sink process can inherit it...
|
||||
$pid = open(STDIN, "$execcmd 2>&1 |") or die "Failed to $execcmd: $!\n";
|
||||
$self->{real_serverpid} = $pid;
|
||||
|
||||
# Process the output from s_server until we find the ACCEPT line, which
|
||||
# tells us what the accepting address and port are.
|
||||
while (<>) {
|
||||
print;
|
||||
s/\R$//; # Better chomp
|
||||
next unless (/^ACCEPT\s.*:(\d+)$/);
|
||||
$self->{server_port} = $1;
|
||||
last;
|
||||
}
|
||||
|
||||
if ($self->{server_port} == 0) {
|
||||
# This actually means that s_server exited, because otherwise
|
||||
# we would still searching for ACCEPT...
|
||||
waitpid($pid, 0);
|
||||
die "no ACCEPT detected in '$execcmd' output: $?\n";
|
||||
}
|
||||
|
||||
# Just make sure everything else is simply printed [as separate lines].
|
||||
# The sub process simply inherits our STD* and will keep consuming
|
||||
# server's output and printing it as long as there is anything there,
|
||||
# out of our way.
|
||||
my $error;
|
||||
$pid = undef;
|
||||
if (eval { require Win32::Process; 1; }) {
|
||||
if (Win32::Process::Create(my $h, $^X, "perl -ne print", 0, 0, ".")) {
|
||||
$pid = $h->GetProcessID();
|
||||
$self->{proc_handle} = $h; # hold handle till next round [or exit]
|
||||
} else {
|
||||
$error = Win32::FormatMessage(Win32::GetLastError());
|
||||
}
|
||||
} else {
|
||||
if (defined($pid = fork)) {
|
||||
$pid or exec("$^X -ne print") or exit($!);
|
||||
} else {
|
||||
$error = $!;
|
||||
}
|
||||
}
|
||||
|
||||
# Change back to original stdin
|
||||
open(STDIN, "<&", $savedin);
|
||||
close($savedin);
|
||||
|
||||
if (!defined($pid)) {
|
||||
kill(3, $self->{real_serverpid});
|
||||
die "Failed to capture s_server's output: $error\n";
|
||||
}
|
||||
|
||||
$self->{serverpid} = $pid;
|
||||
|
||||
print STDERR "Server responds on ",
|
||||
"$self->{server_addr}:$self->{server_port}\n";
|
||||
|
||||
# Connect right away...
|
||||
$self->connect_to_server();
|
||||
|
||||
return $self->clientstart;
|
||||
}
|
||||
@@ -214,41 +309,57 @@ sub start
|
||||
sub clientstart
|
||||
{
|
||||
my ($self) = shift;
|
||||
my $oldstdout;
|
||||
|
||||
if ($self->execute) {
|
||||
my $pid = fork();
|
||||
if ($pid == 0) {
|
||||
my $echostr;
|
||||
if ($self->reneg()) {
|
||||
$echostr = "R";
|
||||
} else {
|
||||
$echostr = "test";
|
||||
}
|
||||
my $execcmd = "echo ".$echostr." | ".$self->execute
|
||||
." s_client -engine ossltest -connect "
|
||||
.($self->proxy_addr).":".($self->proxy_port);
|
||||
unless ($self->supports_IPv6) {
|
||||
$execcmd .= " -4";
|
||||
}
|
||||
if ($self->cipherc ne "") {
|
||||
$execcmd .= " -cipher ".$self->cipherc;
|
||||
}
|
||||
if ($self->clientflags ne "") {
|
||||
$execcmd .= " ".$self->clientflags;
|
||||
}
|
||||
if (defined $self->sessionfile) {
|
||||
$execcmd .= " -ign_eof";
|
||||
}
|
||||
if ($self->debug) {
|
||||
print STDERR "Client command: $execcmd\n";
|
||||
}
|
||||
exec($execcmd);
|
||||
my $pid;
|
||||
my $execcmd = $self->execute
|
||||
." s_client -max_protocol TLSv1.3 -engine ossltest"
|
||||
." -connect $self->{proxy_addr}:$self->{proxy_port}";
|
||||
if ($self->cipherc ne "") {
|
||||
$execcmd .= " -cipher ".$self->cipherc;
|
||||
}
|
||||
$self->clientpid($pid);
|
||||
if ($self->ciphersuitesc ne "") {
|
||||
$execcmd .= " -ciphersuites ".$self->ciphersuitesc;
|
||||
}
|
||||
if ($self->clientflags ne "") {
|
||||
$execcmd .= " ".$self->clientflags;
|
||||
}
|
||||
if ($self->clientflags !~ m/-(no)?servername/) {
|
||||
$execcmd .= " -servername localhost";
|
||||
}
|
||||
if (defined $self->sessionfile) {
|
||||
$execcmd .= " -ign_eof";
|
||||
}
|
||||
if ($self->debug) {
|
||||
print STDERR "Client command: $execcmd\n";
|
||||
}
|
||||
|
||||
open(my $savedout, ">&STDOUT");
|
||||
# If we open pipe with new descriptor, attempt to close it,
|
||||
# explicitly or implicitly, would incur waitpid and effectively
|
||||
# dead-lock...
|
||||
if (!($pid = open(STDOUT, "| $execcmd"))) {
|
||||
my $err = $!;
|
||||
kill(3, $self->{real_serverpid});
|
||||
die "Failed to $execcmd: $err\n";
|
||||
}
|
||||
$self->{clientpid} = $pid;
|
||||
|
||||
# queue [magic] input
|
||||
print $self->reneg ? "R" : "test";
|
||||
|
||||
# this closes client's stdin without waiting for its pid
|
||||
open(STDOUT, ">&", $savedout);
|
||||
close($savedout);
|
||||
}
|
||||
|
||||
# Wait for incoming connection from client
|
||||
my $fdset = IO::Select->new($self->{proxy_sock});
|
||||
if (!$fdset->can_read(60)) {
|
||||
kill(3, $self->{real_serverpid});
|
||||
die "s_client didn't try to connect\n";
|
||||
}
|
||||
|
||||
my $client_sock;
|
||||
if(!($client_sock = $self->{proxy_sock}->accept())) {
|
||||
warn "Failed accepting incoming connection: $!\n";
|
||||
@@ -257,100 +368,96 @@ sub clientstart
|
||||
|
||||
print "Connection opened\n";
|
||||
|
||||
# Now connect to the server
|
||||
my $retry = 50;
|
||||
my $server_sock;
|
||||
#We loop over this a few times because sometimes s_server can take a while
|
||||
#to start up
|
||||
do {
|
||||
my $servaddr = $self->server_addr;
|
||||
$servaddr =~ s/[\[\]]//g; # Remove [ and ]
|
||||
eval {
|
||||
$server_sock = $IP_factory->(
|
||||
PeerAddr => $servaddr,
|
||||
PeerPort => $self->server_port,
|
||||
MultiHomed => 1,
|
||||
Proto => 'tcp'
|
||||
);
|
||||
};
|
||||
|
||||
$retry--;
|
||||
#Some buggy IP factories can return a defined server_sock that hasn't
|
||||
#actually connected, so we check peerport too
|
||||
if ($@ || !defined($server_sock) || !defined($server_sock->peerport)) {
|
||||
$server_sock->close() if defined($server_sock);
|
||||
undef $server_sock;
|
||||
if ($retry) {
|
||||
#Sleep for a short while
|
||||
select(undef, undef, undef, 0.1);
|
||||
} else {
|
||||
warn "Failed to start up server (".$servaddr.",".$self->server_port."): $!\n";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} while (!$server_sock);
|
||||
|
||||
my $sel = IO::Select->new($server_sock, $client_sock);
|
||||
my $server_sock = $self->{server_sock};
|
||||
my $indata;
|
||||
my @handles = ($server_sock, $client_sock);
|
||||
|
||||
#Wait for either the server socket or the client socket to become readable
|
||||
$fdset = IO::Select->new($server_sock, $client_sock);
|
||||
my @ready;
|
||||
my $ctr = 0;
|
||||
local $SIG{PIPE} = "IGNORE";
|
||||
while( (!(TLSProxy::Message->end)
|
||||
|| (defined $self->sessionfile()
|
||||
&& (-s $self->sessionfile()) == 0))
|
||||
&& $ctr < 10) {
|
||||
if (!(@ready = $sel->can_read(1))) {
|
||||
$self->{saw_session_ticket} = undef;
|
||||
while($fdset->count && $ctr < 10) {
|
||||
if (defined($self->{sessionfile})) {
|
||||
# s_client got -ign_eof and won't be exiting voluntarily, so we
|
||||
# look for data *and* session ticket...
|
||||
last if TLSProxy::Message->success()
|
||||
&& $self->{saw_session_ticket};
|
||||
}
|
||||
if (!(@ready = $fdset->can_read(1))) {
|
||||
$ctr++;
|
||||
next;
|
||||
}
|
||||
foreach my $hand (@ready) {
|
||||
if ($hand == $server_sock) {
|
||||
$server_sock->sysread($indata, 16384) or goto END;
|
||||
$indata = $self->process_packet(1, $indata);
|
||||
$client_sock->syswrite($indata);
|
||||
$ctr = 0;
|
||||
if ($server_sock->sysread($indata, 16384)) {
|
||||
if ($indata = $self->process_packet(1, $indata)) {
|
||||
$client_sock->syswrite($indata) or goto END;
|
||||
}
|
||||
$ctr = 0;
|
||||
} else {
|
||||
$fdset->remove($server_sock);
|
||||
$client_sock->shutdown(SHUT_WR);
|
||||
}
|
||||
} elsif ($hand == $client_sock) {
|
||||
$client_sock->sysread($indata, 16384) or goto END;
|
||||
$indata = $self->process_packet(0, $indata);
|
||||
$server_sock->syswrite($indata);
|
||||
$ctr = 0;
|
||||
if ($client_sock->sysread($indata, 16384)) {
|
||||
if ($indata = $self->process_packet(0, $indata)) {
|
||||
$server_sock->syswrite($indata) or goto END;
|
||||
}
|
||||
$ctr = 0;
|
||||
} else {
|
||||
$fdset->remove($client_sock);
|
||||
$server_sock->shutdown(SHUT_WR);
|
||||
}
|
||||
} else {
|
||||
kill(3, $self->{real_serverpid});
|
||||
die "Unexpected handle";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
die "No progress made" if $ctr >= 10;
|
||||
if ($ctr >= 10) {
|
||||
kill(3, $self->{real_serverpid});
|
||||
die "No progress made";
|
||||
}
|
||||
|
||||
END:
|
||||
print "Connection closed\n";
|
||||
if($server_sock) {
|
||||
$server_sock->close();
|
||||
$self->{server_sock} = undef;
|
||||
}
|
||||
if($client_sock) {
|
||||
#Closing this also kills the child process
|
||||
$client_sock->close();
|
||||
}
|
||||
if(!$self->debug) {
|
||||
select($oldstdout);
|
||||
}
|
||||
$self->serverconnects($self->serverconnects - 1);
|
||||
if ($self->serverconnects == 0) {
|
||||
die "serverpid is zero\n" if $self->serverpid == 0;
|
||||
print "Waiting for server process to close: "
|
||||
.$self->serverpid."\n";
|
||||
waitpid( $self->serverpid, 0);
|
||||
die "exit code $? from server process\n" if $? != 0;
|
||||
|
||||
my $pid;
|
||||
if (--$self->{serverconnects} == 0) {
|
||||
$pid = $self->{serverpid};
|
||||
print "Waiting for 'perl -ne print' process to close: $pid...\n";
|
||||
$pid = waitpid($pid, 0);
|
||||
if ($pid > 0) {
|
||||
die "exit code $? from 'perl -ne print' process\n" if $? != 0;
|
||||
} elsif ($pid == 0) {
|
||||
kill(3, $self->{real_serverpid});
|
||||
die "lost control over $self->{serverpid}?";
|
||||
}
|
||||
$pid = $self->{real_serverpid};
|
||||
print "Waiting for s_server process to close: $pid...\n";
|
||||
# it's done already, just collect the exit code [and reap]...
|
||||
waitpid($pid, 0);
|
||||
die "exit code $? from s_server process\n" if $? != 0;
|
||||
} else {
|
||||
# Give s_server sufficient time to finish what it was doing
|
||||
usleep(250000);
|
||||
# It's a bit counter-intuitive spot to make next connection to
|
||||
# the s_server. Rationale is that established connection works
|
||||
# as syncronization point, in sense that this way we know that
|
||||
# s_server is actually done with current session...
|
||||
$self->connect_to_server();
|
||||
}
|
||||
die "clientpid is zero\n" if $self->clientpid == 0;
|
||||
print "Waiting for client process to close: ".$self->clientpid."\n";
|
||||
waitpid($self->clientpid, 0);
|
||||
$pid = $self->{clientpid};
|
||||
print "Waiting for s_client process to close: $pid...\n";
|
||||
waitpid($pid, 0);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -369,34 +476,47 @@ sub process_packet
|
||||
print "Received client packet\n";
|
||||
}
|
||||
|
||||
if ($self->{direction} != $server) {
|
||||
$self->{flight} = $self->{flight} + 1;
|
||||
$self->{direction} = $server;
|
||||
}
|
||||
|
||||
print "Packet length = ".length($packet)."\n";
|
||||
print "Processing flight ".$self->flight."\n";
|
||||
|
||||
#Return contains the list of record found in the packet followed by the
|
||||
#list of messages in those records
|
||||
my @ret = TLSProxy::Record->get_records($server, $self->flight, $packet);
|
||||
push @{$self->record_list}, @{$ret[0]};
|
||||
#list of messages in those records and any partial message
|
||||
my @ret = TLSProxy::Record->get_records($server, $self->flight,
|
||||
$self->{partial}[$server].$packet);
|
||||
$self->{partial}[$server] = $ret[2];
|
||||
push @{$self->{record_list}}, @{$ret[0]};
|
||||
push @{$self->{message_list}}, @{$ret[1]};
|
||||
|
||||
print "\n";
|
||||
|
||||
if (scalar(@{$ret[0]}) == 0 or length($ret[2]) != 0) {
|
||||
return "";
|
||||
}
|
||||
|
||||
#Finished parsing. Call user provided filter here
|
||||
if(defined $self->filter) {
|
||||
if (defined $self->filter) {
|
||||
$self->filter->($self);
|
||||
}
|
||||
|
||||
#Take a note on NewSessionTicket
|
||||
foreach my $message (reverse @{$self->{message_list}}) {
|
||||
if ($message->{mt} == TLSProxy::Message::MT_NEW_SESSION_TICKET) {
|
||||
$self->{saw_session_ticket} = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
#Reconstruct the packet
|
||||
$packet = "";
|
||||
foreach my $record (@{$self->record_list}) {
|
||||
#We only replay the records for the current flight
|
||||
if ($record->flight != $self->flight) {
|
||||
next;
|
||||
}
|
||||
$packet .= $record->reconstruct_record($server);
|
||||
}
|
||||
|
||||
$self->{flight} = $self->{flight} + 1;
|
||||
|
||||
print "Forwarded packet length = ".length($packet)."\n\n";
|
||||
|
||||
return $packet;
|
||||
@@ -453,24 +573,28 @@ sub proxy_port
|
||||
my $self = shift;
|
||||
return $self->{proxy_port};
|
||||
}
|
||||
|
||||
#Read/write accessors
|
||||
sub server_addr
|
||||
{
|
||||
my $self = shift;
|
||||
if (@_) {
|
||||
$self->{server_addr} = shift;
|
||||
}
|
||||
return $self->{server_addr};
|
||||
}
|
||||
sub server_port
|
||||
{
|
||||
my $self = shift;
|
||||
if (@_) {
|
||||
$self->{server_port} = shift;
|
||||
}
|
||||
return $self->{server_port};
|
||||
}
|
||||
sub serverpid
|
||||
{
|
||||
my $self = shift;
|
||||
return $self->{serverpid};
|
||||
}
|
||||
sub clientpid
|
||||
{
|
||||
my $self = shift;
|
||||
return $self->{clientpid};
|
||||
}
|
||||
|
||||
#Read/write accessors
|
||||
sub filter
|
||||
{
|
||||
my $self = shift;
|
||||
@@ -487,6 +611,14 @@ sub cipherc
|
||||
}
|
||||
return $self->{cipherc};
|
||||
}
|
||||
sub ciphersuitesc
|
||||
{
|
||||
my $self = shift;
|
||||
if (@_) {
|
||||
$self->{ciphersuitesc} = shift;
|
||||
}
|
||||
return $self->{ciphersuitesc};
|
||||
}
|
||||
sub ciphers
|
||||
{
|
||||
my $self = shift;
|
||||
@@ -495,6 +627,14 @@ sub ciphers
|
||||
}
|
||||
return $self->{ciphers};
|
||||
}
|
||||
sub ciphersuitess
|
||||
{
|
||||
my $self = shift;
|
||||
if (@_) {
|
||||
$self->{ciphersuitess} = shift;
|
||||
}
|
||||
return $self->{ciphersuitess};
|
||||
}
|
||||
sub serverflags
|
||||
{
|
||||
my $self = shift;
|
||||
@@ -531,22 +671,6 @@ sub message_list
|
||||
}
|
||||
return $self->{message_list};
|
||||
}
|
||||
sub serverpid
|
||||
{
|
||||
my $self = shift;
|
||||
if (@_) {
|
||||
$self->{serverpid} = shift;
|
||||
}
|
||||
return $self->{serverpid};
|
||||
}
|
||||
sub clientpid
|
||||
{
|
||||
my $self = shift;
|
||||
if (@_) {
|
||||
$self->{clientpid} = shift;
|
||||
}
|
||||
return $self->{clientpid};
|
||||
}
|
||||
|
||||
sub fill_known_data
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ my %record_type = (
|
||||
|
||||
use constant {
|
||||
VERS_TLS_1_4 => 0x0305,
|
||||
VERS_TLS_1_3_DRAFT => 0x7f17,
|
||||
VERS_TLS_1_3_DRAFT => 0x7f1c,
|
||||
VERS_TLS_1_3 => 0x0304,
|
||||
VERS_TLS_1_2 => 0x0303,
|
||||
VERS_TLS_1_1 => 0x0302,
|
||||
@@ -61,83 +61,70 @@ sub get_records
|
||||
my $server = shift;
|
||||
my $flight = shift;
|
||||
my $packet = shift;
|
||||
my $partial = "";
|
||||
my @record_list = ();
|
||||
my @message_list = ();
|
||||
my $data;
|
||||
my $content_type;
|
||||
my $version;
|
||||
my $len;
|
||||
my $len_real;
|
||||
my $decrypt_len;
|
||||
|
||||
my $recnum = 1;
|
||||
while (length ($packet) > 0) {
|
||||
print " Record $recnum";
|
||||
if ($server) {
|
||||
print " (server -> client)\n";
|
||||
} else {
|
||||
print " (client -> server)\n";
|
||||
}
|
||||
#Get the record header
|
||||
if (length($packet) < TLS_RECORD_HEADER_LENGTH) {
|
||||
print " Record $recnum ", $server ? "(server -> client)\n"
|
||||
: "(client -> server)\n";
|
||||
|
||||
#Get the record header (unpack can't fail if $packet is too short)
|
||||
my ($content_type, $version, $len) = unpack('Cnn', $packet);
|
||||
|
||||
if (length($packet) < TLS_RECORD_HEADER_LENGTH + ($len // 0)) {
|
||||
print "Partial data : ".length($packet)." bytes\n";
|
||||
$packet = "";
|
||||
} else {
|
||||
($content_type, $version, $len) = unpack('CnnC*', $packet);
|
||||
$data = substr($packet, 5, $len);
|
||||
$partial = $packet;
|
||||
last;
|
||||
}
|
||||
|
||||
print " Content type: ".$record_type{$content_type}."\n";
|
||||
print " Version: $tls_version{$version}\n";
|
||||
print " Length: $len";
|
||||
if ($len == length($data)) {
|
||||
print "\n";
|
||||
$decrypt_len = $len_real = $len;
|
||||
} else {
|
||||
print " (expected), ".length($data)." (actual)\n";
|
||||
$decrypt_len = $len_real = length($data);
|
||||
}
|
||||
my $data = substr($packet, TLS_RECORD_HEADER_LENGTH, $len);
|
||||
|
||||
my $record = TLSProxy::Record->new(
|
||||
$flight,
|
||||
$content_type,
|
||||
$version,
|
||||
$len,
|
||||
0,
|
||||
$len_real,
|
||||
$decrypt_len,
|
||||
substr($packet, TLS_RECORD_HEADER_LENGTH, $len_real),
|
||||
substr($packet, TLS_RECORD_HEADER_LENGTH, $len_real)
|
||||
);
|
||||
print " Content type: ".$record_type{$content_type}."\n";
|
||||
print " Version: $tls_version{$version}\n";
|
||||
print " Length: $len\n";
|
||||
|
||||
if ($content_type != RT_CCS) {
|
||||
if (($server && $server_encrypting)
|
||||
|| (!$server && $client_encrypting)) {
|
||||
if (!TLSProxy::Proxy->is_tls13() && $etm) {
|
||||
$record->decryptETM();
|
||||
} else {
|
||||
$record->decrypt();
|
||||
}
|
||||
$record->encrypted(1);
|
||||
my $record = TLSProxy::Record->new(
|
||||
$flight,
|
||||
$content_type,
|
||||
$version,
|
||||
$len,
|
||||
0,
|
||||
$len, # len_real
|
||||
$len, # decrypt_len
|
||||
$data, # data
|
||||
$data # decrypt_data
|
||||
);
|
||||
|
||||
if (TLSProxy::Proxy->is_tls13()) {
|
||||
print " Inner content type: "
|
||||
.$record_type{$record->content_type()}."\n";
|
||||
}
|
||||
if ($content_type != RT_CCS) {
|
||||
if (($server && $server_encrypting)
|
||||
|| (!$server && $client_encrypting)) {
|
||||
if (!TLSProxy::Proxy->is_tls13() && $etm) {
|
||||
$record->decryptETM();
|
||||
} else {
|
||||
$record->decrypt();
|
||||
}
|
||||
$record->encrypted(1);
|
||||
|
||||
if (TLSProxy::Proxy->is_tls13()) {
|
||||
print " Inner content type: "
|
||||
.$record_type{$record->content_type()}."\n";
|
||||
}
|
||||
}
|
||||
|
||||
push @record_list, $record;
|
||||
|
||||
#Now figure out what messages are contained within this record
|
||||
my @messages = TLSProxy::Message->get_messages($server, $record);
|
||||
push @message_list, @messages;
|
||||
|
||||
$packet = substr($packet, TLS_RECORD_HEADER_LENGTH + $len_real);
|
||||
$recnum++;
|
||||
}
|
||||
|
||||
push @record_list, $record;
|
||||
|
||||
#Now figure out what messages are contained within this record
|
||||
my @messages = TLSProxy::Message->get_messages($server, $record);
|
||||
push @message_list, @messages;
|
||||
|
||||
$packet = substr($packet, TLS_RECORD_HEADER_LENGTH + $len);
|
||||
$recnum++;
|
||||
}
|
||||
|
||||
return (\@record_list, \@message_list);
|
||||
return (\@record_list, \@message_list, $partial);
|
||||
}
|
||||
|
||||
sub clear
|
||||
@@ -197,6 +184,7 @@ sub new
|
||||
data => $data,
|
||||
decrypt_data => $decrypt_data,
|
||||
orig_decrypt_data => $decrypt_data,
|
||||
sent => 0,
|
||||
encrypted => 0,
|
||||
outer_content_type => RT_APPLICATION_DATA
|
||||
};
|
||||
@@ -287,6 +275,12 @@ sub reconstruct_record
|
||||
my $server = shift;
|
||||
my $data;
|
||||
|
||||
#We only replay the records in the same direction
|
||||
if ($self->{sent} || ($self->flight & 1) != $server) {
|
||||
return "";
|
||||
}
|
||||
$self->{sent} = 1;
|
||||
|
||||
if ($self->sslv2) {
|
||||
$data = pack('n', $self->len | 0x8000);
|
||||
} else {
|
||||
@@ -391,4 +385,16 @@ sub outer_content_type
|
||||
}
|
||||
return $self->{outer_content_type};
|
||||
}
|
||||
sub is_fatal_alert
|
||||
{
|
||||
my $self = shift;
|
||||
my $server = shift;
|
||||
|
||||
if (($self->{flight} & 1) == $server
|
||||
&& $self->{content_type} == TLSProxy::Record::RT_ALERT) {
|
||||
my ($level, $alert) = unpack('CC', $self->decrypt_data);
|
||||
return $alert if ($level == 2);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
1;
|
||||
@@ -43,6 +43,10 @@ OSSL_STORE_open_fn datatype
|
||||
OSSL_STORE_post_process_info_fn datatype
|
||||
PROFESSION_INFO datatype
|
||||
PROFESSION_INFOS datatype
|
||||
RAND_DRBG_cleanup_entropy_fn datatype
|
||||
RAND_DRBG_cleanup_nonce_fn datatype
|
||||
RAND_DRBG_get_entropy_fn datatype
|
||||
RAND_DRBG_get_nonce_fn datatype
|
||||
RAND_poll_cb datatype
|
||||
SSL_CTX_keylog_cb_func datatype
|
||||
SSL_client_hello_cb_fn datatype
|
||||
@@ -86,6 +90,9 @@ BIO_eof define
|
||||
BIO_flush define
|
||||
BIO_get_accept_name define
|
||||
BIO_get_accept_port define
|
||||
BIO_get_accept_ip_family define
|
||||
BIO_get_peer_name define
|
||||
BIO_get_peer_port define
|
||||
BIO_get_bind_mode define
|
||||
BIO_get_buffer_num_lines define
|
||||
BIO_get_cipher_ctx define
|
||||
@@ -94,6 +101,7 @@ BIO_get_close define
|
||||
BIO_get_conn_address define
|
||||
BIO_get_conn_hostname define
|
||||
BIO_get_conn_port define
|
||||
BIO_get_conn_ip_family define
|
||||
BIO_get_fd define
|
||||
BIO_get_fp define
|
||||
BIO_get_info_callback define
|
||||
@@ -116,6 +124,7 @@ BIO_seek define
|
||||
BIO_set_accept_bios define
|
||||
BIO_set_accept_name define
|
||||
BIO_set_accept_port define
|
||||
BIO_set_accept_ip_family define
|
||||
BIO_set_bind_mode define
|
||||
BIO_set_buffer_read_data define
|
||||
BIO_set_buffer_size define
|
||||
@@ -123,6 +132,7 @@ BIO_set_close define
|
||||
BIO_set_conn_address define
|
||||
BIO_set_conn_hostname define
|
||||
BIO_set_conn_port define
|
||||
BIO_set_conn_ip_family define
|
||||
BIO_set_fd define
|
||||
BIO_set_fp define
|
||||
BIO_set_info_callback define
|
||||
@@ -173,9 +183,12 @@ EVP_MD_CTX_type define
|
||||
EVP_OpenUpdate define
|
||||
EVP_PKEY_CTX_add1_hkdf_info define
|
||||
EVP_PKEY_CTX_add1_tls1_prf_seed define
|
||||
EVP_PKEY_CTX_get_signature_md define
|
||||
EVP_PKEY_CTX_hkdf_mode define
|
||||
EVP_PKEY_CTX_set1_hkdf_key define
|
||||
EVP_PKEY_CTX_set1_hkdf_salt define
|
||||
EVP_PKEY_CTX_set1_pbe_pass define
|
||||
EVP_PKEY_CTX_set1_scrypt_salt define
|
||||
EVP_PKEY_CTX_set1_tls1_prf_secret define
|
||||
EVP_PKEY_CTX_set_dh_paramgen_generator define
|
||||
EVP_PKEY_CTX_set_dh_paramgen_prime_len define
|
||||
@@ -185,9 +198,17 @@ EVP_PKEY_CTX_set_dsa_paramgen_bits define
|
||||
EVP_PKEY_CTX_set_ec_param_enc define
|
||||
EVP_PKEY_CTX_set_ec_paramgen_curve_nid define
|
||||
EVP_PKEY_CTX_set_hkdf_md define
|
||||
EVP_PKEY_CTX_set_mac_key define
|
||||
EVP_PKEY_CTX_set_rsa_keygen_pubexp define
|
||||
EVP_PKEY_CTX_set_rsa_padding define
|
||||
EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md define
|
||||
EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen define
|
||||
EVP_PKEY_CTX_set_rsa_pss_keygen_md define
|
||||
EVP_PKEY_CTX_set_rsa_pss_saltlen define
|
||||
EVP_PKEY_CTX_set_scrypt_N define
|
||||
EVP_PKEY_CTX_set_scrypt_r define
|
||||
EVP_PKEY_CTX_set_scrypt_maxmem_bytes define
|
||||
EVP_PKEY_CTX_set_scrypt_p define
|
||||
EVP_PKEY_CTX_set_signature_md define
|
||||
EVP_PKEY_CTX_set_tls1_prf_md define
|
||||
EVP_PKEY_assign_DH define
|
||||
@@ -239,6 +260,7 @@ PEM_FLAG_EAY_COMPATIBLE define
|
||||
PEM_FLAG_ONLY_B64 define
|
||||
PEM_FLAG_SECURE define
|
||||
RAND_cleanup define deprecated 1.1.0
|
||||
RAND_DRBG_get_ex_new_index define
|
||||
EVP_PKEY_CTX_set_rsa_keygen_bits define
|
||||
SSL_COMP_free_compression_methods define deprecated 1.1.0
|
||||
SSL_CTX_add0_chain_cert define
|
||||
|
||||
+27
-1
@@ -98,7 +98,7 @@ foreach my $section (sort @{$options{section}}) {
|
||||
my $suffix = { man => ".$podinfo{section}".($options{suffix} // ""),
|
||||
html => ".html" } -> {$options{type}};
|
||||
my $generate = { man => "pod2man --name=$name --section=$podinfo{section} --center=OpenSSL --release=$config{version} \"$podpath\"",
|
||||
html => "pod2html \"--podroot=$options{sourcedir}\" --htmldir=$updir --podpath=man1:man3:man5:man7 \"--infile=$podpath\" \"--title=$podname\""
|
||||
html => "pod2html \"--podroot=$options{sourcedir}\" --htmldir=$updir --podpath=man1:man3:man5:man7 \"--infile=$podpath\" \"--title=$podname\" --quiet"
|
||||
} -> {$options{type}};
|
||||
my $output_dir = catdir($options{destdir}, "man$podinfo{section}");
|
||||
my $output_file = $podname . $suffix;
|
||||
@@ -112,6 +112,32 @@ foreach my $section (sort @{$options{section}}) {
|
||||
@output = `$generate`;
|
||||
map { s|href="http://man\.he\.net/(man\d/[^"]+)(?:\.html)?"|href="../$1.html"|g; } @output
|
||||
if $options{type} eq "html";
|
||||
if ($options{type} eq "man") {
|
||||
# Because some *roff parsers are more strict than others,
|
||||
# multiple lines in the NAME section must be merged into
|
||||
# one.
|
||||
my $in_name = 0;
|
||||
my $name_line = "";
|
||||
my @newoutput = ();
|
||||
foreach (@output) {
|
||||
if ($in_name) {
|
||||
if (/^\.SH "/) {
|
||||
$in_name = 0;
|
||||
push @newoutput, $name_line."\n";
|
||||
} else {
|
||||
chomp (my $x = $_);
|
||||
$name_line .= " " if $name_line;
|
||||
$name_line .= $x;
|
||||
next;
|
||||
}
|
||||
}
|
||||
if (/^\.SH +"NAME" *$/) {
|
||||
$in_name = 1;
|
||||
}
|
||||
push @newoutput, $_;
|
||||
}
|
||||
@output = @newoutput;
|
||||
}
|
||||
}
|
||||
print STDERR "DEBUG: Done processing\n" if $options{debug};
|
||||
|
||||
|
||||
+21
-1
@@ -1,5 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
# To test this OpenSSL version's applications against another version's
|
||||
# shared libraries, simply set
|
||||
#
|
||||
# OPENSSL_REGRESSION=/path/to/other/OpenSSL/build/tree
|
||||
if [ -n "$OPENSSL_REGRESSION" ]; then
|
||||
shlibwrap="$OPENSSL_REGRESSION/util/shlib_wrap.sh"
|
||||
if [ -x "$shlibwrap" ]; then
|
||||
# We clear OPENSSL_REGRESSION to avoid a loop, should the shlib_wrap.sh
|
||||
# we exec also support that mechanism...
|
||||
OPENSSL_REGRESSION= exec "$shlibwrap" "$@"
|
||||
else
|
||||
if [ -f "$shlibwrap" ]; then
|
||||
echo "Not permitted to run $shlibwrap" >&2
|
||||
else
|
||||
echo "No $shlibwrap, perhaps OPENSSL_REGRESSION isn't properly set?" >&2
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
[ $# -ne 0 ] || set -x # debug mode without arguments:-)
|
||||
|
||||
THERE="`echo $0 | sed -e 's|[^/]*$||' 2>/dev/null`.."
|
||||
@@ -90,7 +110,7 @@ if [ -f "$LIBCRYPTOSO" -a -z "$preload_var" ]; then
|
||||
# it into a script makes it possible to do so on multi-ABI
|
||||
# platforms.
|
||||
case "$SYSNAME" in
|
||||
*BSD|QNX) LD_PRELOAD="$LIBCRYPTOSO:$LIBSSLSO" ;; # *BSD, QNX
|
||||
*BSD) LD_PRELOAD="$LIBCRYPTOSO:$LIBSSLSO" ;; # *BSD
|
||||
*) LD_PRELOAD="$LIBCRYPTOSO $LIBSSLSO" ;; # SunOS, Linux, ELF HP-UX
|
||||
esac
|
||||
_RLD_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT" # Tru64, o32 IRIX
|
||||
|
||||
Reference in New Issue
Block a user