~andersk/ubuntu/oneiric/openssl/spurious-reboot

« back to all changes in this revision

Viewing changes to crypto/objects/objxref.pl

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-05-01 23:51:53 UTC
  • mfrom: (11.1.20 sid)
  • Revision ID: james.westby@ubuntu.com-20110501235153-bjcxitndquaezb68
Tags: 1.0.0d-2ubuntu1
* Resynchronise with Debian (LP: #675566).  Remaining changes:
  - debian/libssl1.0.0.postinst:
    + Display a system restart required notification bubble on libssl1.0.0
      upgrade.
    + Use a different priority for libssl1.0.0/restart-services depending
      on whether a desktop, or server dist-upgrade is being performed.
  - debian/{libssl1.0.0-udeb.dirs, control, rules}: Create
    libssl1.0.0-udeb, for the benefit of wget-udeb (no wget-udeb package
    in Debian).
  - debian/{libcrypto1.0.0-udeb.dirs, libssl1.0.0.dirs, libssl1.0.0.files,
    rules}: Move runtime libraries to /lib, for the benefit of
    wpasupplicant.
  - debian/patches/aesni.patch: Backport Intel AES-NI support, now from
    http://rt.openssl.org/Ticket/Display.html?id=2065 rather than the
    0.9.8 variant.
  - debian/patches/Bsymbolic-functions.patch: Link using
    -Bsymbolic-functions.
  - debian/patches/perlpath-quilt.patch: Don't change perl #! paths under
    .pc.
  - debian/rules:
    + Don't run 'make test' when cross-building.
    + Use host compiler when cross-building.  Patch from Neil Williams.
    + Don't build for processors no longer supported: i486, i586 (on
      i386), v8 (on sparc).
    + Fix Makefile to properly clean up libs/ dirs in clean target.
    + Replace duplicate files in the doc directory with symlinks.
* Update architectures affected by Bsymbolic-functions.patch.
* Drop debian/patches/no-sslv2.patch; Debian now adds the 'no-ssl2'
  configure option, which compiles out SSLv2 support entirely, so this is
  no longer needed.
* Drop openssl-doc in favour of the libssl-doc package introduced by
  Debian.  Add Conflicts/Replaces until the next LTS release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/local/bin/perl
 
2
 
 
3
use strict;
 
4
 
 
5
my %xref_tbl;
 
6
my %oid_tbl;
 
7
 
 
8
my ($mac_file, $xref_file) = @ARGV;
 
9
 
 
10
open(IN, $mac_file) || die "Can't open $mac_file";
 
11
 
 
12
# Read in OID nid values for a lookup table.
 
13
 
 
14
while (<IN>)
 
15
        {
 
16
        chomp;
 
17
        my ($name, $num) = /^(\S+)\s+(\S+)$/;
 
18
        $oid_tbl{$name} = $num;
 
19
        }
 
20
close IN;
 
21
 
 
22
open(IN, $xref_file) || die "Can't open $xref_file";
 
23
 
 
24
my $ln = 1;
 
25
 
 
26
while (<IN>)
 
27
        {
 
28
        chomp;
 
29
        s/#.*$//;
 
30
        next if (/^\S*$/);
 
31
        my ($xr, $p1, $p2) = /^(\S+)\s+(\S+)\s+(\S+)/;
 
32
        check_oid($xr);
 
33
        check_oid($p1);
 
34
        check_oid($p2);
 
35
        $xref_tbl{$xr} = [$p1, $p2, $ln];
 
36
        }
 
37
 
 
38
my @xrkeys = keys %xref_tbl;
 
39
 
 
40
my @srt1 = sort { $oid_tbl{$a} <=> $oid_tbl{$b}} @xrkeys;
 
41
 
 
42
for(my $i = 0; $i <= $#srt1; $i++)
 
43
        {
 
44
        $xref_tbl{$srt1[$i]}[2] = $i;
 
45
        }
 
46
 
 
47
my @srt2 = sort
 
48
        {
 
49
        my$ap1 = $oid_tbl{$xref_tbl{$a}[0]};
 
50
        my$bp1 = $oid_tbl{$xref_tbl{$b}[0]};
 
51
        return $ap1 - $bp1 if ($ap1 != $bp1);
 
52
        my$ap2 = $oid_tbl{$xref_tbl{$a}[1]};
 
53
        my$bp2 = $oid_tbl{$xref_tbl{$b}[1]};
 
54
 
 
55
        return $ap2 - $bp2;
 
56
        } @xrkeys;
 
57
 
 
58
my $pname = $0;
 
59
 
 
60
$pname =~ s|^.[^/]/||;
 
61
 
 
62
print <<EOF;
 
63
/* AUTOGENERATED BY $pname, DO NOT EDIT */
 
64
 
 
65
typedef struct
 
66
        {
 
67
        int sign_id;
 
68
        int hash_id;
 
69
        int pkey_id;
 
70
        } nid_triple;
 
71
 
 
72
static const nid_triple sigoid_srt[] =
 
73
        {
 
74
EOF
 
75
 
 
76
foreach (@srt1)
 
77
        {
 
78
        my $xr = $_;
 
79
        my ($p1, $p2) = @{$xref_tbl{$_}};
 
80
        print "\t{NID_$xr, NID_$p1, NID_$p2},\n";
 
81
        }
 
82
 
 
83
print "\t};";
 
84
print <<EOF;
 
85
 
 
86
 
 
87
static const nid_triple * const sigoid_srt_xref[] =
 
88
        {
 
89
EOF
 
90
 
 
91
foreach (@srt2)
 
92
        {
 
93
        my $x = $xref_tbl{$_}[2];
 
94
        print "\t\&sigoid_srt\[$x\],\n";
 
95
        }
 
96
 
 
97
print "\t};\n\n";
 
98
 
 
99
sub check_oid
 
100
        {
 
101
        my ($chk) = @_;
 
102
        if (!exists $oid_tbl{$chk})
 
103
                {
 
104
                die "Not Found \"$chk\"\n";
 
105
                }
 
106
        }
 
107