summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/util
diff options
context:
space:
mode:
authordjm <>2010-10-01 22:54:18 +0000
committerdjm <>2010-10-01 22:54:18 +0000
commitf6ca1ae73bb9eabfb510df2cffc2599db98d35a9 (patch)
treedef8296400903465cb96345535c0a56935eb05a4 /src/lib/libcrypto/util
parent0229f29a33371533962d8b0b8264882afac53d70 (diff)
downloadopenbsd-f6ca1ae73bb9eabfb510df2cffc2599db98d35a9.tar.gz
openbsd-f6ca1ae73bb9eabfb510df2cffc2599db98d35a9.tar.bz2
openbsd-f6ca1ae73bb9eabfb510df2cffc2599db98d35a9.zip
import OpenSSL-1.0.0a
Diffstat (limited to 'src/lib/libcrypto/util')
-rw-r--r--src/lib/libcrypto/util/copy.pl11
-rwxr-xr-xsrc/lib/libcrypto/util/mkrc.pl71
-rw-r--r--src/lib/libcrypto/util/pl/netware.pl16
3 files changed, 82 insertions, 16 deletions
diff --git a/src/lib/libcrypto/util/copy.pl b/src/lib/libcrypto/util/copy.pl
index eba6d5815e..e20b45530a 100644
--- a/src/lib/libcrypto/util/copy.pl
+++ b/src/lib/libcrypto/util/copy.pl
@@ -8,16 +8,9 @@ use Fcntl;
8# Perl script 'copy' comment. On Windows the built in "copy" command also 8# Perl script 'copy' comment. On Windows the built in "copy" command also
9# copies timestamps: this messes up Makefile dependencies. 9# copies timestamps: this messes up Makefile dependencies.
10 10
11my $stripcr = 0;
12
13my $arg; 11my $arg;
14 12
15foreach $arg (@ARGV) { 13foreach $arg (@ARGV) {
16 if ($arg eq "-stripcr")
17 {
18 $stripcr = 1;
19 next;
20 }
21 $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob... 14 $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob...
22 foreach (glob $arg) 15 foreach (glob $arg)
23 { 16 {
@@ -56,10 +49,6 @@ foreach (@filelist)
56 || die "Can't Open $dfile"; 49 || die "Can't Open $dfile";
57 while (sysread IN, $buf, 10240) 50 while (sysread IN, $buf, 10240)
58 { 51 {
59 if ($stripcr)
60 {
61 $buf =~ tr/\015//d;
62 }
63 syswrite(OUT, $buf, length($buf)); 52 syswrite(OUT, $buf, length($buf));
64 } 53 }
65 close(IN); 54 close(IN);
diff --git a/src/lib/libcrypto/util/mkrc.pl b/src/lib/libcrypto/util/mkrc.pl
new file mode 100755
index 0000000000..0ceadcf8d1
--- /dev/null
+++ b/src/lib/libcrypto/util/mkrc.pl
@@ -0,0 +1,71 @@
1#!/bin/env perl
2#
3open FD,"crypto/opensslv.h";
4while(<FD>) {
5 if (/OPENSSL_VERSION_NUMBER\s+(0x[0-9a-f]+)/i) {
6 $ver = hex($1);
7 $v1 = ($ver>>28);
8 $v2 = ($ver>>20)&0xff;
9 $v3 = ($ver>>12)&0xff;
10 $v4 = ($ver>> 4)&0xff;
11 $beta = $ver&0xf;
12 $version = "$v1.$v2.$v3";
13 if ($beta==0xf) { $version .= chr(ord('a')+$v4-1) if ($v4); }
14 elsif ($beta==0){ $version .= "-dev"; }
15 else { $version .= "-beta$beta"; }
16 last;
17 }
18}
19close(FD);
20
21$filename = $ARGV[0]; $filename =~ /(.*)\.([^.]+)$/;
22$basename = $1;
23$extname = $2;
24
25if ($extname =~ /dll/i) { $description = "OpenSSL shared library"; }
26else { $description = "OpenSSL application"; }
27
28print <<___;
29#include <winver.h>
30
31LANGUAGE 0x09,0x01
32
331 VERSIONINFO
34 FILEVERSION $v1,$v2,$v3,$v4
35 PRODUCTVERSION $v1,$v2,$v3,$v4
36 FILEFLAGSMASK 0x3fL
37#ifdef _DEBUG
38 FILEFLAGS 0x01L
39#else
40 FILEFLAGS 0x00L
41#endif
42 FILEOS VOS__WINDOWS32
43 FILETYPE VFT_DLL
44 FILESUBTYPE 0x0L
45BEGIN
46 BLOCK "StringFileInfo"
47 BEGIN
48 BLOCK "040904b0"
49 BEGIN
50 // Required:
51 VALUE "CompanyName", "The OpenSSL Project, http://www.openssl.org/\\0"
52 VALUE "FileDescription", "$description\\0"
53 VALUE "FileVersion", "$version\\0"
54 VALUE "InternalName", "$basename\\0"
55 VALUE "OriginalFilename", "$filename\\0"
56 VALUE "ProductName", "The OpenSSL Toolkit\\0"
57 VALUE "ProductVersion", "$version\\0"
58 // Optional:
59 //VALUE "Comments", "\\0"
60 VALUE "LegalCopyright", "Copyright © 1998-2006 The OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All rights reserved.\\0"
61 //VALUE "LegalTrademarks", "\\0"
62 //VALUE "PrivateBuild", "\\0"
63 //VALUE "SpecialBuild", "\\0"
64 END
65 END
66 BLOCK "VarFileInfo"
67 BEGIN
68 VALUE "Translation", 0x409, 0x4b0
69 END
70END
71___
diff --git a/src/lib/libcrypto/util/pl/netware.pl b/src/lib/libcrypto/util/pl/netware.pl
index 173c9919f2..c78bcfc874 100644
--- a/src/lib/libcrypto/util/pl/netware.pl
+++ b/src/lib/libcrypto/util/pl/netware.pl
@@ -131,13 +131,14 @@ else
131# assembler 131# assembler
132if ($nw_nasm) 132if ($nw_nasm)
133{ 133{
134 $asm=(`nasm -v 2>NUL` gt `nasmw -v 2>NUL`?"nasm":"nasmw");
134 if ($gnuc) 135 if ($gnuc)
135 { 136 {
136 $asm="nasmw -s -f elf"; 137 $asm.=" -s -f elf";
137 } 138 }
138 else 139 else
139 { 140 {
140 $asm="nasmw -s -f coff"; 141 $asm.=" -s -f coff -d __coff__";
141 } 142 }
142 $afile="-o "; 143 $afile="-o ";
143 $asm.=" -g" if $debug; 144 $asm.=" -g" if $debug;
@@ -323,13 +324,16 @@ if (!$no_asm)
323 $rc5_enc_src="crypto${o}rc5${o}asm${o}r5-nw.asm"; 324 $rc5_enc_src="crypto${o}rc5${o}asm${o}r5-nw.asm";
324 $md5_asm_obj="\$(OBJ_D)${o}m5-nw${obj}"; 325 $md5_asm_obj="\$(OBJ_D)${o}m5-nw${obj}";
325 $md5_asm_src="crypto${o}md5${o}asm${o}m5-nw.asm"; 326 $md5_asm_src="crypto${o}md5${o}asm${o}m5-nw.asm";
326 $sha1_asm_obj="\$(OBJ_D)${o}s1-nw${obj}"; 327 $sha1_asm_obj="\$(OBJ_D)${o}s1-nw${obj} \$(OBJ_D)${o}sha256-nw${obj} \$(OBJ_D)${o}sha512-nw${obj}";
327 $sha1_asm_src="crypto${o}sha${o}asm${o}s1-nw.asm"; 328 $sha1_asm_src="crypto${o}sha${o}asm${o}s1-nw.asm crypto${o}sha${o}asm${o}sha256-nw.asm crypto${o}sha${o}asm${o}sha512-nw.asm";
328 $rmd160_asm_obj="\$(OBJ_D)${o}rm-nw${obj}"; 329 $rmd160_asm_obj="\$(OBJ_D)${o}rm-nw${obj}";
329 $rmd160_asm_src="crypto${o}ripemd${o}asm${o}rm-nw.asm"; 330 $rmd160_asm_src="crypto${o}ripemd${o}asm${o}rm-nw.asm";
331 $whirlpool_asm_obj="\$(OBJ_D)${o}wp-nw${obj}";
332 $whirlpool_asm_src="crypto${o}whrlpool${o}asm${o}wp-nw.asm";
330 $cpuid_asm_obj="\$(OBJ_D)${o}x86cpuid-nw${obj}"; 333 $cpuid_asm_obj="\$(OBJ_D)${o}x86cpuid-nw${obj}";
331 $cpuid_asm_src="crypto${o}x86cpuid-nw.asm"; 334 $cpuid_asm_src="crypto${o}x86cpuid-nw.asm";
332 $cflags.=" -DOPENSSL_CPUID_OBJ -DBN_ASM -DOPENSSL_BN_ASM_PART_WORDS -DMD5_ASM -DSHA1_ASM"; 335 $cflags.=" -DOPENSSL_CPUID_OBJ -DBN_ASM -DOPENSSL_BN_ASM_PART_WORDS -DMD5_ASM -DWHIRLPOOL_ASM";
336 $cflags.=" -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM";
333 $cflags.=" -DAES_ASM -DRMD160_ASM"; 337 $cflags.=" -DAES_ASM -DRMD160_ASM";
334} 338}
335else 339else
@@ -356,6 +360,8 @@ else
356 $sha1_asm_src=''; 360 $sha1_asm_src='';
357 $rmd160_asm_obj=''; 361 $rmd160_asm_obj='';
358 $rmd160_asm_src=''; 362 $rmd160_asm_src='';
363 $whirlpool_asm_obj='';
364 $whirlpool_asm_src='';
359 $cpuid_asm_obj=''; 365 $cpuid_asm_obj='';
360 $cpuid_asm_src=''; 366 $cpuid_asm_src='';
361} 367}