Skip to content
Snippets Groups Projects
Commit bfd2d079 authored by Stephen Hurd's avatar Stephen Hurd
Browse files

Import v3.4.8

parent e39c2d09
No related branches found
No related tags found
No related merge requests found
Showing
with 23155 additions and 0 deletions
COPYING 0 → 100644
This file contains the usage terms for cryptlib. The full details of cryptlib
usage are provided on the cryptlib home page; although this file and the
information on the web page should be identical, in case of any dispute the
web page takes precedence. This file is included because some distributions
require the presence of a COPYING file.
cryptlib is distributed under a dual license that allows free, open-source use
under a GPL-compatible license and closed-source use under a standard
commercial license. The GPL-compatible license (a.k.a. the Sleepycat license)
is given below. Further details on this license are available from the
cryptlib home page.
Copyright 1992-2024 Peter Gutmann. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Redistributions in any form must be accompanied by information on how to
obtain complete source code for the cryptlib software and any accompanying
software that uses the cryptlib software. The source code must either be
included in the distribution or be available for no more than the cost of
distribution, and must be freely redistributable under reasonable
conditions. For an executable file, complete source code means the source
code for all modules it contains or uses. It does not include source code
for modules or files that typically accompany the major components of the
operating system on which the executable file runs.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
Note that decoupling the software from the user, for example by running in a
SaaS configuration, does not exempt you from these requirements.
If you're unable to comply with the above license then the following,
alternate usage conditions apply:
Any large-scale commercial use of cryptlib requires a license. "Large-scale
commercial use" means any revenue-generating purpose such as use for
company-internal purposes, or use of cryptlib in an application or product,
with a total gross revenue of over US$5,000. This allows cryptlib to be
used in freeware and shareware applications, for evaluation and research
purposes, and for non-revenue-generating or personal use without charge. In
addition the author reserves the right to grant free licenses for commercial
use in special cases (for example where there is a general benefit to the
public), contact the author for details if you think you qualify.
README 0 → 100644
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{eef00743-11c7-44d1-bb2a-eb715884fe57}</UniqueIdentifier>
<Extensions>cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{1fb840ba-c626-408b-a264-9679e2c28e07}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;fi;fd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{72d71195-a477-40b0-8247-e336d504931b}</UniqueIdentifier>
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="test\certimp.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\certproc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\certs.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\devices.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\envelope.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\highlvl.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\keydbx.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\keyfile.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\loadkey.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\lowlvl.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\s_cmp.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\s_scep.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\sreqresp.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\ssh.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\stress.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\testfunc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\testlib.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\utils.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\util_cert.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\util_file.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\util_os.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\keytest.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\tls.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\eap_crypt.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\eap_peap.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\eap_test.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="test\eap_ttls.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="cryptlib.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\filename.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="test\test.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="misc\config.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Library Include="binaries64_vs\cl64.lib" />
<Library Include="binaries32_vs\cl32.lib" />
<Library Include="binaries64_fuzz\cl64_fuzz.lib" />
<Library Include="binaries32_fuzz\cl32_fuzz.lib" />
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Fuzz|Win32'">
<LocalDebuggerDebuggerType>Auto</LocalDebuggerDebuggerType>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>
\ No newline at end of file
use 5.008;
use ExtUtils::MakeMaker;
use Data::Dumper;
use File::Find;
my @search_in = ( '/usr/local/include', '/usr/lib/gcc-lib', '/usr/include' );
push @search_in, $ENV{HOME} if defined( $ENV{HOME} );
my $CRYPT_LIB_HEADER = 'cryptlib.h';
my $PERL_CRYPT_LIB_HEADER = $ENV{PERL_CRYPT_LIB_HEADER};
unless ( defined $PERL_CRYPT_LIB_HEADER ) {
print "Looking for '$CRYPT_LIB_HEADER', in:\n";
print "\t- $_\n" foreach @search_in;
print "Please wait... ";
my @found =
qx{find @search_in -type f -iname '$CRYPT_LIB_HEADER' 2>/dev/null};
if ( scalar(@found) == 0 ) {
print "NOT FOUND", "\n";
print "$0 ABORTED!", "\n";
print "\n";
print
"You need CryptLib source code distribution in order to build PerlCryptLib.",
"\n";
exit 1;
}
print "DONE", "\n";
print "Found(ed):", "\n";
my %found = ();
my $recent = 0;
foreach my $h (@found) {
chomp $h;
print "\t", $h;
my $v = qx{grep 'CRYPTLIB_VERSION' $h 2>/dev/null};
$v =~ m/(\d+)/;
$found{$1} = $h;
$recent = int($1) if int($1) gt $recent;
print "\t", "(Ver. ", $1, ")";
print "\n";
}
# if ( scalar(@found) > 1 ) {
# print "$0 ABORTED!", "\n";
# print "\n";
# print "You have to set environment variable PERL_CRYPT_LIB_HEADER to specify which one of the headers founded is to be used.", "\n";
# print "\n";
# print "ie:", "\n";
# print "\n";
# print "export PERL_CRYPT_LIB_HEADER='$found[0]'", "\n";
# print "\n";
# exit 1;
# }
# $PERL_CRYPT_LIB_HEADER = $found[0];
$PERL_CRYPT_LIB_HEADER = $found{$recent};
print "Using version '$recent' from '$found{$recent}'\n";
}
print "Writing 'PerlCryptLib.ph', please wait... ";
print
qx{perl ./GenPerl.pl $PERL_CRYPT_LIB_HEADER ./PerlCryptLib.ph 1>/dev/null};
if ( $? != 0 ) {
print "ERROR $?", "\n";
exit 1;
}
print "OK", "\n";
WriteMakefile(
'NAME' => 'PerlCryptLib',
'DISTNAME' => 'PerlCryptLib',
'VERSION_FROM' => 'PerlCryptLib.pm',
'PREREQ_PM' => {},
'PM' => {
'PerlCryptLib.pm' => '$(INST_LIBDIR)/PerlCryptLib.pm',
'PerlCryptLib.ph' => '$(INST_LIBDIR)/PerlCryptLib.ph'
},
(
$] >= 5.005
? (
ABSTRACT =>
'PerlCryptLib - Perl interface to Peter Guttman\'s cryptlib API',
AUTHOR => 'Alvaro Livraghi <perlcryptlib@gmail.com>'
)
: ()
),
,
'LIBS' => [
join( " ", map { "-L$_" } split ":", $ENV{LD_LIBRARY_PATH} )
. ' -lresolv -lpthread -lcl'
],
'DEFINE' => "-DCRYPTLIB_H=\\\"$PERL_CRYPT_LIB_HEADER\\\"",
'INC' => '-I.',
'clean' => { FILE => '*.ph .*_h __debug*' },
'realclean' => { FILES => '*.ph .*_h __debug* *.inc' }
);
if ( eval { require ExtUtils::Constant; 1 } ) {
my @names = ();
ExtUtils::Constant::WriteConstants(
NAME => 'PerlCryptLib',
NAMES => \@names,
DEFAULT_TYPE => 'IV',
C_FILE => 'const-c.inc',
XS_FILE => 'const-xs.inc'
);
print join( "\n", @names ), "\n";
}
else {
use File::Copy;
use File::Spec;
foreach my $file ( 'const-c.inc', 'const-xs.inc' ) {
my $fallback = File::Spec->catfile( 'fallback', $file );
copy( $fallback, $file ) or die "Can't copy $fallback to $file: $!";
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File added
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/env python
from setuptools import setup, Extension
import sys
if sys.platform == "win32":
ext = Extension("cryptlib_py",
sources=["python.c"],
library_dirs=['../binaries'],
libraries=['cl32'])
else:
ext = Extension("cryptlib_py",
sources=["python.c"],
library_dirs=['..'],
libraries=['cl'])
setup(name="cryptlib_py", ext_modules=[ext])
//TESTLIB JOB CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID
//*
//S1 EXEC PGM=TESTLIB,
// PARM='ENVAR(_EDC_ADD_ERRNO2=1)/'
//STEPLIB DD DISP=SHR,DSN=#HLQ.CRYPTLIB.LOAD
//*
//CLBCMP DD DISP=SHR,DSN=#HLQ.CRYPTLIB.CLBCMP
//CLBDER DD DISP=SHR,DSN=#HLQ.CRYPTLIB.CLBDER
//CLBGPG DD DISP=SHR,DSN=#HLQ.CRYPTLIB.CLBGPG
//CLBPGP DD DISP=SHR,DSN=#HLQ.CRYPTLIB.CLBPGP
//CLBPKR DD DISP=SHR,DSN=#HLQ.CRYPTLIB.CLBPKR
//CLBP12 DD DISP=SHR,DSN=#HLQ.CRYPTLIB.CLBP12
//CLBP15 DD DISP=SHR,DSN=#HLQ.CRYPTLIB.CLBP15
//CLBP7S DD DISP=SHR,DSN=#HLQ.CRYPTLIB.CLBP7S
//CLBSKR DD DISP=SHR,DSN=#HLQ.CRYPTLIB.CLBSKR
//CLBTEST DD DISP=SHR,DSN=#HLQ.CRYPTLIB.CLBTEST
//CLBTESTA DD DISP=SHR,DSN=#HLQ.CRYPTLIB.CLBTESTA
//*
//CEEDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment