diff options
author | tb <> | 2023-03-26 08:04:57 +0000 |
---|---|---|
committer | tb <> | 2023-03-26 08:04:57 +0000 |
commit | 651978435ef0d762b74b9d6a3de0424651ef4181 (patch) | |
tree | 1e37a185254fc537dc58bbf1e267ec4f72d47688 /src | |
parent | 2c17102e27aad444a2866b781d07598b1ea21617 (diff) | |
download | openbsd-651978435ef0d762b74b9d6a3de0424651ef4181.tar.gz openbsd-651978435ef0d762b74b9d6a3de0424651ef4181.tar.bz2 openbsd-651978435ef0d762b74b9d6a3de0424651ef4181.zip |
bn_prime.pl: fix shebang and a couple more whitespace tweaks
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/bn/bn_prime.pl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_prime.pl b/src/lib/libcrypto/bn/bn_prime.pl index 0e982fc0af..f638e4a9a4 100644 --- a/src/lib/libcrypto/bn/bn_prime.pl +++ b/src/lib/libcrypto/bn/bn_prime.pl | |||
@@ -1,5 +1,5 @@ | |||
1 | #!/bin/perl | 1 | #!/usr/bin/perl |
2 | # $OpenBSD: bn_prime.pl,v 1.11 2023/03/25 11:35:02 tb Exp $ | 2 | # $OpenBSD: bn_prime.pl,v 1.12 2023/03/26 08:04:57 tb Exp $ |
3 | # | 3 | # |
4 | # Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | 4 | # Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) |
5 | # All rights reserved. | 5 | # All rights reserved. |
@@ -72,13 +72,14 @@ push(@primes, 2); | |||
72 | $p = 1; | 72 | $p = 1; |
73 | 73 | ||
74 | loop: | 74 | loop: |
75 | while ($#primes < $num-1) { | 75 | while ($#primes < $num - 1) { |
76 | $p += 2; | 76 | $p += 2; |
77 | $s = int(sqrt($p)); | 77 | $s = int(sqrt($p)); |
78 | 78 | ||
79 | for ($i = 0; defined($primes[$i]) && $primes[$i] <= $s; $i++) { | 79 | for ($i = 0; defined($primes[$i]) && $primes[$i] <= $s; $i++) { |
80 | next loop if $p % $primes[$i] == 0; | 80 | next loop if $p % $primes[$i] == 0; |
81 | } | 81 | } |
82 | |||
82 | die "\$primes[$i] is too large: $primes[$i]" if $primes[$i] > 65535; | 83 | die "\$primes[$i] is too large: $primes[$i]" if $primes[$i] > 65535; |
83 | push(@primes, $p); | 84 | push(@primes, $p); |
84 | } | 85 | } |