diff options
Diffstat (limited to 'src/lib/libcrypto/objects/objects.pl')
-rw-r--r-- | src/lib/libcrypto/objects/objects.pl | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/lib/libcrypto/objects/objects.pl b/src/lib/libcrypto/objects/objects.pl index c956bbb841..76c06cc8f9 100644 --- a/src/lib/libcrypto/objects/objects.pl +++ b/src/lib/libcrypto/objects/objects.pl | |||
@@ -9,7 +9,9 @@ while(<NUMIN>) | |||
9 | $o++; | 9 | $o++; |
10 | s/#.*$//; | 10 | s/#.*$//; |
11 | next if /^\s*$/; | 11 | next if /^\s*$/; |
12 | $_ = 'X'.$_; | ||
12 | ($Cname,$mynum) = split; | 13 | ($Cname,$mynum) = split; |
14 | $Cname =~ s/^X//; | ||
13 | if (defined($nidn{$mynum})) | 15 | if (defined($nidn{$mynum})) |
14 | { die "$ARGV[1]:$o:There's already an object with NID ",$mynum," on line ",$order{$mynum},"\n"; } | 16 | { die "$ARGV[1]:$o:There's already an object with NID ",$mynum," on line ",$order{$mynum},"\n"; } |
15 | $nid{$Cname} = $mynum; | 17 | $nid{$Cname} = $mynum; |
@@ -114,7 +116,13 @@ close NUMOUT; | |||
114 | 116 | ||
115 | open (OUT,">$ARGV[2]") || die "Can't open output file $ARGV[2]"; | 117 | open (OUT,">$ARGV[2]") || die "Can't open output file $ARGV[2]"; |
116 | print OUT <<'EOF'; | 118 | print OUT <<'EOF'; |
117 | /* lib/obj/obj_mac.h */ | 119 | /* crypto/objects/obj_mac.h */ |
120 | |||
121 | /* THIS FILE IS GENERATED FROM objects.txt by objects.pl via the | ||
122 | * following command: | ||
123 | * perl objects.pl objects.txt obj_mac.num obj_mac.h | ||
124 | */ | ||
125 | |||
118 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | 126 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) |
119 | * All rights reserved. | 127 | * All rights reserved. |
120 | * | 128 | * |
@@ -172,11 +180,6 @@ print OUT <<'EOF'; | |||
172 | * [including the GNU Public Licence.] | 180 | * [including the GNU Public Licence.] |
173 | */ | 181 | */ |
174 | 182 | ||
175 | /* THIS FILE IS GENERATED FROM objects.txt by objects.pl via the | ||
176 | * following command: | ||
177 | * perl objects.pl objects.txt obj_mac.num obj_mac.h | ||
178 | */ | ||
179 | |||
180 | #define SN_undef "UNDEF" | 183 | #define SN_undef "UNDEF" |
181 | #define LN_undef "undefined" | 184 | #define LN_undef "undefined" |
182 | #define NID_undef 0 | 185 | #define NID_undef 0 |
@@ -207,6 +210,8 @@ sub process_oid | |||
207 | if (!($a[0] =~ /^[0-9]+$/)) | 210 | if (!($a[0] =~ /^[0-9]+$/)) |
208 | { | 211 | { |
209 | $a[0] =~ s/-/_/g; | 212 | $a[0] =~ s/-/_/g; |
213 | if (!defined($obj{$a[0]})) | ||
214 | { die "$ARGV[0]:$o:Undefined identifier ",$a[0],"\n"; } | ||
210 | $pref_oid = "OBJ_" . $a[0]; | 215 | $pref_oid = "OBJ_" . $a[0]; |
211 | $pref_sep = ","; | 216 | $pref_sep = ","; |
212 | shift @a; | 217 | shift @a; |