summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormiod <>2014-12-15 06:03:15 +0000
committermiod <>2014-12-15 06:03:15 +0000
commit3b17dd2b93326115c99733ff57ea69db5eee0f94 (patch)
tree436c7115e185a788502625bd472cc823597c74fa
parent5ff3741c44f372895206f59414df34e2dcd5eaa0 (diff)
downloadopenbsd-3b17dd2b93326115c99733ff57ea69db5eee0f94.tar.gz
openbsd-3b17dd2b93326115c99733ff57ea69db5eee0f94.tar.bz2
openbsd-3b17dd2b93326115c99733ff57ea69db5eee0f94.zip
Move 40MB of .rodata and 40MB of stack to .bss; allows this test to run on
platforms with small MAXTSIZ or MAXSSIZ.
-rw-r--r--src/regress/lib/libcrypto/gost/gost2814789t.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/regress/lib/libcrypto/gost/gost2814789t.c b/src/regress/lib/libcrypto/gost/gost2814789t.c
index dd92903b42..30aaead34e 100644
--- a/src/regress/lib/libcrypto/gost/gost2814789t.c
+++ b/src/regress/lib/libcrypto/gost/gost2814789t.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gost2814789t.c,v 1.1 2014/11/09 19:45:26 miod Exp $ */ 1/* $OpenBSD: gost2814789t.c,v 1.2 2014/12/15 06:03:15 miod Exp $ */
2/* vim: set fileencoding=ascii : Charset: ASCII */ 2/* vim: set fileencoding=ascii : Charset: ASCII */
3/* test/gostr2814789t.c */ 3/* test/gostr2814789t.c */
4/* ==================================================================== 4/* ====================================================================
@@ -1243,6 +1243,9 @@ const g89_tc tcs[] = {
1243 } 1243 }
1244}; 1244};
1245 1245
1246/* const */ unsigned char bZB[40*1024*1024];
1247unsigned char bTS[40*1024*1024];
1248
1246int main(int argc, char *argv[]) 1249int main(int argc, char *argv[])
1247{ 1250{
1248 unsigned int t; 1251 unsigned int t;
@@ -1255,8 +1258,6 @@ int main(int argc, char *argv[])
1255 unsigned char bTest[G89_MAX_TC_LEN]; 1258 unsigned char bTest[G89_MAX_TC_LEN];
1256 unsigned char bTest1[G89_MAX_TC_LEN]; 1259 unsigned char bTest1[G89_MAX_TC_LEN];
1257 uint64_t ullLeft; 1260 uint64_t ullLeft;
1258 static const unsigned char bZB[40*1024*1024] = { 0 };
1259 static unsigned char bTS[40*1024*1024] = { 0 };
1260 unsigned int mdl = 0; 1261 unsigned int mdl = 0;
1261 int enlu = 0; 1262 int enlu = 0;
1262 int enlf = 0; 1263 int enlf = 0;
@@ -1288,6 +1289,9 @@ int main(int argc, char *argv[])
1288 OPENSSL_load_builtin_modules(); 1289 OPENSSL_load_builtin_modules();
1289 OpenSSL_add_all_algorithms(); 1290 OpenSSL_add_all_algorithms();
1290 1291
1292 memset(bZB, 0, sizeof bZB);
1293 memset(bTS, 0, sizeof bTS);
1294
1291 /* Test load engine */ 1295 /* Test load engine */
1292 if(NULL == (md_gost94 = EVP_get_digestbyname(SN_id_GostR3411_94))) { 1296 if(NULL == (md_gost94 = EVP_get_digestbyname(SN_id_GostR3411_94))) {
1293 fflush(NULL); 1297 fflush(NULL);