summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rand/randtest.c
diff options
context:
space:
mode:
authorbeck <>1999-09-29 04:37:45 +0000
committerbeck <>1999-09-29 04:37:45 +0000
commitde8f24ea083384bb66b32ec105dc4743c5663cdf (patch)
tree1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/rand/randtest.c
parentcb929d29896bcb87c2a97417fbd03e50078fc178 (diff)
downloadopenbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/rand/randtest.c')
-rw-r--r--src/lib/libcrypto/rand/randtest.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libcrypto/rand/randtest.c b/src/lib/libcrypto/rand/randtest.c
index e0ba61e123..f0706d779a 100644
--- a/src/lib/libcrypto/rand/randtest.c
+++ b/src/lib/libcrypto/rand/randtest.c
@@ -58,7 +58,7 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <stdlib.h> 60#include <stdlib.h>
61#include "rand.h" 61#include <openssl/rand.h>
62 62
63/* some FIPS 140-1 random number test */ 63/* some FIPS 140-1 random number test */
64/* some simple tests */ 64/* some simple tests */
@@ -117,7 +117,7 @@ int main()
117 /* test 1 */ 117 /* test 1 */
118 if (!((9654 < n1) && (n1 < 10346))) 118 if (!((9654 < n1) && (n1 < 10346)))
119 { 119 {
120 printf("test 1 failed, X=%ld\n",n1); 120 printf("test 1 failed, X=%lu\n",n1);
121 err++; 121 err++;
122 } 122 }
123 printf("test 1 done\n"); 123 printf("test 1 done\n");
@@ -150,37 +150,37 @@ int main()
150 { 150 {
151 if (!((2267 < runs[i][0]) && (runs[i][0] < 2733))) 151 if (!((2267 < runs[i][0]) && (runs[i][0] < 2733)))
152 { 152 {
153 printf("test 3 failed, bit=%d run=%d num=%ld\n", 153 printf("test 3 failed, bit=%d run=%d num=%lu\n",
154 i,1,runs[i][0]); 154 i,1,runs[i][0]);
155 err++; 155 err++;
156 } 156 }
157 if (!((1079 < runs[i][1]) && (runs[i][1] < 1421))) 157 if (!((1079 < runs[i][1]) && (runs[i][1] < 1421)))
158 { 158 {
159 printf("test 3 failed, bit=%d run=%d num=%ld\n", 159 printf("test 3 failed, bit=%d run=%d num=%lu\n",
160 i,2,runs[i][1]); 160 i,2,runs[i][1]);
161 err++; 161 err++;
162 } 162 }
163 if (!(( 502 < runs[i][2]) && (runs[i][2] < 748))) 163 if (!(( 502 < runs[i][2]) && (runs[i][2] < 748)))
164 { 164 {
165 printf("test 3 failed, bit=%d run=%d num=%ld\n", 165 printf("test 3 failed, bit=%d run=%d num=%lu\n",
166 i,3,runs[i][2]); 166 i,3,runs[i][2]);
167 err++; 167 err++;
168 } 168 }
169 if (!(( 223 < runs[i][3]) && (runs[i][3] < 402))) 169 if (!(( 223 < runs[i][3]) && (runs[i][3] < 402)))
170 { 170 {
171 printf("test 3 failed, bit=%d run=%d num=%ld\n", 171 printf("test 3 failed, bit=%d run=%d num=%lu\n",
172 i,4,runs[i][3]); 172 i,4,runs[i][3]);
173 err++; 173 err++;
174 } 174 }
175 if (!(( 90 < runs[i][4]) && (runs[i][4] < 223))) 175 if (!(( 90 < runs[i][4]) && (runs[i][4] < 223)))
176 { 176 {
177 printf("test 3 failed, bit=%d run=%d num=%ld\n", 177 printf("test 3 failed, bit=%d run=%d num=%lu\n",
178 i,5,runs[i][4]); 178 i,5,runs[i][4]);
179 err++; 179 err++;
180 } 180 }
181 if (!(( 90 < runs[i][5]) && (runs[i][5] < 223))) 181 if (!(( 90 < runs[i][5]) && (runs[i][5] < 223)))
182 { 182 {
183 printf("test 3 failed, bit=%d run=%d num=%ld\n", 183 printf("test 3 failed, bit=%d run=%d num=%lu\n",
184 i,6,runs[i][5]); 184 i,6,runs[i][5]);
185 err++; 185 err++;
186 } 186 }
@@ -190,13 +190,13 @@ int main()
190 /* test 4 */ 190 /* test 4 */
191 if (runs[0][33] != 0) 191 if (runs[0][33] != 0)
192 { 192 {
193 printf("test 4 failed, bit=%d run=%d num=%ld\n", 193 printf("test 4 failed, bit=%d run=%d num=%lu\n",
194 0,34,runs[0][33]); 194 0,34,runs[0][33]);
195 err++; 195 err++;
196 } 196 }
197 if (runs[1][33] != 0) 197 if (runs[1][33] != 0)
198 { 198 {
199 printf("test 4 failed, bit=%d run=%d num=%ld\n", 199 printf("test 4 failed, bit=%d run=%d num=%lu\n",
200 1,34,runs[1][33]); 200 1,34,runs[1][33]);
201 err++; 201 err++;
202 } 202 }