diff options
| author | djm <> | 2008-09-06 12:17:54 +0000 |
|---|---|---|
| committer | djm <> | 2008-09-06 12:17:54 +0000 |
| commit | 6b62d1fdd8a4fd35acfcc0c4bb1bf8b757fa8cda (patch) | |
| tree | 7ccc28afe1789ea3dbedf72365f955d5b8e105b5 /src/lib/libcrypto/bn/bn_prime.pl | |
| parent | 89181603212b41e95cde36b1be5a146ce8fb2935 (diff) | |
| download | openbsd-6b62d1fdd8a4fd35acfcc0c4bb1bf8b757fa8cda.tar.gz openbsd-6b62d1fdd8a4fd35acfcc0c4bb1bf8b757fa8cda.tar.bz2 openbsd-6b62d1fdd8a4fd35acfcc0c4bb1bf8b757fa8cda.zip | |
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/bn/bn_prime.pl')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_prime.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/bn/bn_prime.pl b/src/lib/libcrypto/bn/bn_prime.pl index 9fc3765486..3fafb6f3e9 100644 --- a/src/lib/libcrypto/bn/bn_prime.pl +++ b/src/lib/libcrypto/bn/bn_prime.pl | |||
| @@ -11,7 +11,7 @@ loop: while ($#primes < $num-1) | |||
| 11 | $p+=2; | 11 | $p+=2; |
| 12 | $s=int(sqrt($p)); | 12 | $s=int(sqrt($p)); |
| 13 | 13 | ||
| 14 | for ($i=0; $primes[$i]<=$s; $i++) | 14 | for ($i=0; defined($primes[$i]) && $primes[$i]<=$s; $i++) |
| 15 | { | 15 | { |
| 16 | next loop if (($p%$primes[$i]) == 0); | 16 | next loop if (($p%$primes[$i]) == 0); |
| 17 | } | 17 | } |
| @@ -101,10 +101,12 @@ for ($i=0; $i <= $#primes; $i++) | |||
| 101 | 101 | ||
| 102 | printf "#ifndef EIGHT_BIT\n"; | 102 | printf "#ifndef EIGHT_BIT\n"; |
| 103 | printf "#define NUMPRIMES %d\n",$num; | 103 | printf "#define NUMPRIMES %d\n",$num; |
| 104 | printf "typedef unsigned short prime_t;\n"; | ||
| 104 | printf "#else\n"; | 105 | printf "#else\n"; |
| 105 | printf "#define NUMPRIMES %d\n",$eight; | 106 | printf "#define NUMPRIMES %d\n",$eight; |
| 107 | printf "typedef unsigned char prime_t;\n"; | ||
| 106 | printf "#endif\n"; | 108 | printf "#endif\n"; |
| 107 | print "static const unsigned int primes[NUMPRIMES]=\n\t{\n\t"; | 109 | print "static const prime_t primes[NUMPRIMES]=\n\t{\n\t"; |
| 108 | $init=0; | 110 | $init=0; |
| 109 | for ($i=0; $i <= $#primes; $i++) | 111 | for ($i=0; $i <= $#primes; $i++) |
| 110 | { | 112 | { |
