diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_prime.pl')
-rw-r--r-- | src/lib/libcrypto/bn/bn_prime.pl | 71 |
1 files changed, 66 insertions, 5 deletions
diff --git a/src/lib/libcrypto/bn/bn_prime.pl b/src/lib/libcrypto/bn/bn_prime.pl index 1b00c21a77..9fc3765486 100644 --- a/src/lib/libcrypto/bn/bn_prime.pl +++ b/src/lib/libcrypto/bn/bn_prime.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | # bn_prime.pl | 2 | # bn_prime.pl |
3 | 3 | ||
4 | $num=2048; | 4 | $num=2048; |
@@ -18,13 +18,74 @@ loop: while ($#primes < $num-1) | |||
18 | push(@primes,$p); | 18 | push(@primes,$p); |
19 | } | 19 | } |
20 | 20 | ||
21 | print <<"EOF"; | 21 | # print <<"EOF"; |
22 | # /* Auto generated by bn_prime.pl */ | ||
23 | # /* Copyright (C) 1995-1997 Eric Young (eay\@mincom.oz.au). | ||
24 | # * All rights reserved. | ||
25 | # * Copyright remains Eric Young's, and as such any Copyright notices in | ||
26 | # * the code are not to be removed. | ||
27 | # * See the COPYRIGHT file in the SSLeay distribution for more details. | ||
28 | # */ | ||
29 | # | ||
30 | # EOF | ||
31 | |||
32 | print <<\EOF; | ||
22 | /* Auto generated by bn_prime.pl */ | 33 | /* Auto generated by bn_prime.pl */ |
23 | /* Copyright (C) 1995-1997 Eric Young (eay\@mincom.oz.au). | 34 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
24 | * All rights reserved. | 35 | * All rights reserved. |
36 | * | ||
37 | * This package is an SSL implementation written | ||
38 | * by Eric Young (eay@cryptsoft.com). | ||
39 | * The implementation was written so as to conform with Netscapes SSL. | ||
40 | * | ||
41 | * This library is free for commercial and non-commercial use as long as | ||
42 | * the following conditions are aheared to. The following conditions | ||
43 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
44 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
45 | * included with this distribution is covered by the same copyright terms | ||
46 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
47 | * | ||
25 | * Copyright remains Eric Young's, and as such any Copyright notices in | 48 | * Copyright remains Eric Young's, and as such any Copyright notices in |
26 | * the code are not to be removed. | 49 | * the code are not to be removed. |
27 | * See the COPYRIGHT file in the SSLeay distribution for more details. | 50 | * If this package is used in a product, Eric Young should be given attribution |
51 | * as the author of the parts of the library used. | ||
52 | * This can be in the form of a textual message at program startup or | ||
53 | * in documentation (online or textual) provided with the package. | ||
54 | * | ||
55 | * Redistribution and use in source and binary forms, with or without | ||
56 | * modification, are permitted provided that the following conditions | ||
57 | * are met: | ||
58 | * 1. Redistributions of source code must retain the copyright | ||
59 | * notice, this list of conditions and the following disclaimer. | ||
60 | * 2. Redistributions in binary form must reproduce the above copyright | ||
61 | * notice, this list of conditions and the following disclaimer in the | ||
62 | * documentation and/or other materials provided with the distribution. | ||
63 | * 3. All advertising materials mentioning features or use of this software | ||
64 | * must display the following acknowledgement: | ||
65 | * "This product includes cryptographic software written by | ||
66 | * Eric Young (eay@cryptsoft.com)" | ||
67 | * The word 'cryptographic' can be left out if the rouines from the library | ||
68 | * being used are not cryptographic related :-). | ||
69 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
70 | * the apps directory (application code) you must include an acknowledgement: | ||
71 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
72 | * | ||
73 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
74 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
75 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
76 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
77 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
78 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
79 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
80 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
81 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
82 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
83 | * SUCH DAMAGE. | ||
84 | * | ||
85 | * The licence and distribution terms for any publically available version or | ||
86 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
87 | * copied and put under another distribution licence | ||
88 | * [including the GNU Public Licence.] | ||
28 | */ | 89 | */ |
29 | 90 | ||
30 | EOF | 91 | EOF |
@@ -43,7 +104,7 @@ printf "#define NUMPRIMES %d\n",$num; | |||
43 | printf "#else\n"; | 104 | printf "#else\n"; |
44 | printf "#define NUMPRIMES %d\n",$eight; | 105 | printf "#define NUMPRIMES %d\n",$eight; |
45 | printf "#endif\n"; | 106 | printf "#endif\n"; |
46 | print "static unsigned int primes[NUMPRIMES]=\n\t{\n\t"; | 107 | print "static const unsigned int primes[NUMPRIMES]=\n\t{\n\t"; |
47 | $init=0; | 108 | $init=0; |
48 | for ($i=0; $i <= $#primes; $i++) | 109 | for ($i=0; $i <= $#primes; $i++) |
49 | { | 110 | { |