Makefile.am 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. EXTRA_DIST = \
  2. cmptest.h \
  3. wintest.bat \
  4. pre.js.inc \
  5. aead_aes256gcm.exp \
  6. aead_chacha20poly1305.exp \
  7. aead_xchacha20poly1305.exp \
  8. auth.exp \
  9. auth2.exp \
  10. auth3.exp \
  11. auth5.exp \
  12. auth6.exp \
  13. auth7.exp \
  14. box.exp \
  15. box2.exp \
  16. box7.exp \
  17. box8.exp \
  18. box_easy.exp \
  19. box_easy2.exp \
  20. box_seal.exp \
  21. box_seed.exp \
  22. chacha20.exp \
  23. codecs.exp \
  24. core1.exp \
  25. core2.exp \
  26. core3.exp \
  27. core4.exp \
  28. core5.exp \
  29. core6.exp \
  30. ed25519_convert.exp \
  31. generichash.exp \
  32. generichash2.exp \
  33. generichash3.exp \
  34. hash.exp \
  35. hash2.exp \
  36. hash3.exp \
  37. kdf.exp \
  38. keygen.exp \
  39. kx.exp \
  40. metamorphic.exp \
  41. misuse.exp \
  42. onetimeauth.exp \
  43. onetimeauth2.exp \
  44. onetimeauth7.exp \
  45. pwhash_argon2i.exp \
  46. pwhash_argon2id.exp \
  47. pwhash_scrypt.exp \
  48. pwhash_scrypt_ll.exp \
  49. randombytes.exp \
  50. scalarmult.exp \
  51. scalarmult2.exp \
  52. scalarmult5.exp \
  53. scalarmult6.exp \
  54. scalarmult7.exp \
  55. secretbox.exp \
  56. secretbox2.exp \
  57. secretbox7.exp \
  58. secretbox8.exp \
  59. secretbox_easy.exp \
  60. secretbox_easy2.exp \
  61. secretstream.exp \
  62. shorthash.exp \
  63. sign.exp \
  64. siphashx24.exp \
  65. sodium_core.exp \
  66. sodium_utils.exp \
  67. sodium_utils2.exp \
  68. sodium_utils3.exp \
  69. sodium_version.exp \
  70. stream.exp \
  71. stream2.exp \
  72. stream3.exp \
  73. stream4.exp \
  74. verify1.exp \
  75. xchacha20.exp
  76. DISTCLEANFILES = \
  77. aead_aes256gcm.res \
  78. aead_chacha20poly1305.res \
  79. aead_xchacha20poly1305.res \
  80. auth.res \
  81. auth2.res \
  82. auth3.res \
  83. auth5.res \
  84. auth6.res \
  85. auth7.res \
  86. box.res \
  87. box2.res \
  88. box7.res \
  89. box8.res \
  90. box_easy.res \
  91. box_easy2.res \
  92. box_seal.res \
  93. box_seed.res \
  94. chacha20.res \
  95. codecs.res \
  96. core1.res \
  97. core2.res \
  98. core3.res \
  99. core4.res \
  100. core5.res \
  101. core6.res \
  102. ed25519_convert.res \
  103. generichash.res \
  104. generichash2.res \
  105. generichash3.res \
  106. hash.res \
  107. hash2.res \
  108. hash3.res \
  109. kdf.res \
  110. keygen.res \
  111. kx.res \
  112. metamorphic.res \
  113. misuse.res \
  114. onetimeauth.res \
  115. onetimeauth2.res \
  116. onetimeauth7.res \
  117. pwhash_argon2i.res \
  118. pwhash_argon2id.res \
  119. pwhash_scrypt.res \
  120. pwhash_scrypt_ll.res \
  121. randombytes.res \
  122. scalarmult.res \
  123. scalarmult2.res \
  124. scalarmult5.res \
  125. scalarmult6.res \
  126. scalarmult7.res \
  127. secretbox.res \
  128. secretbox2.res \
  129. secretbox7.res \
  130. secretbox8.res \
  131. secretbox_easy.res \
  132. secretbox_easy2.res \
  133. secretstream.res \
  134. shorthash.res \
  135. sign.res \
  136. siphashx24.res \
  137. sodium_core.res \
  138. sodium_utils.res \
  139. sodium_utils2.res \
  140. sodium_utils3.res \
  141. sodium_version.res \
  142. stream.res \
  143. stream2.res \
  144. stream3.res \
  145. stream4.res \
  146. verify1.res \
  147. xchacha20.res
  148. if NATIVECLIENT
  149. CLEANFILES = \
  150. aead_aes256gcm.final \
  151. aead_chacha20poly1305.final \
  152. aead_xchacha20poly1305.final \
  153. auth.final \
  154. auth2.final \
  155. auth3.final \
  156. auth5.final \
  157. auth6.final \
  158. auth7.final \
  159. box.final \
  160. box2.final \
  161. box7.final \
  162. box8.final \
  163. box_easy.final \
  164. box_easy2.final \
  165. box_seal.final \
  166. box_seed.final \
  167. chacha20.final \
  168. codecs.final \
  169. core1.final \
  170. core2.final \
  171. core3.final \
  172. core4.final \
  173. core5.final \
  174. core6.final \
  175. ed25519_convert.final \
  176. generichash.final \
  177. generichash2.final \
  178. generichash3.final \
  179. hash.final \
  180. hash2.final \
  181. hash3.final \
  182. kdf.final \
  183. keygen.final \
  184. kx.final \
  185. metamorphic.final \
  186. misuse.final \
  187. onetimeauth.final \
  188. onetimeauth2.final \
  189. onetimeauth7.final \
  190. pwhash_argon2i.final \
  191. pwhash_argon2id.final \
  192. pwhash_scrypt.final \
  193. pwhash_scrypt_ll.final \
  194. randombytes.final \
  195. scalarmult.final \
  196. scalarmult2.final \
  197. scalarmult5.final \
  198. scalarmult6.final \
  199. scalarmult7.final \
  200. secretbox.final \
  201. secretbox2.final \
  202. secretbox7.final \
  203. secretbox8.final \
  204. secretbox_easy.final \
  205. secretbox_easy2.final \
  206. secretstream.final \
  207. shorthash.final \
  208. sign.final \
  209. siphashx24.final \
  210. sodium_core.final \
  211. sodium_utils.final \
  212. sodium_version.final \
  213. stream.final \
  214. stream2.final \
  215. stream3.final \
  216. stream4.final \
  217. verify1.final \
  218. xchacha20.final \
  219. aead_aes256gcm.nexe \
  220. aead_chacha20poly1305.nexe \
  221. aead_xchacha20poly1305.nexe \
  222. auth.nexe \
  223. auth2.nexe \
  224. auth3.nexe \
  225. auth5.nexe \
  226. auth6.nexe \
  227. auth7.nexe \
  228. box.nexe \
  229. box2.nexe \
  230. box7.nexe \
  231. box8.nexe \
  232. box_easy.nexe \
  233. box_easy2.nexe \
  234. box_seal.nexe \
  235. box_seed.nexe \
  236. chacha20.nexe \
  237. codecs.nexe \
  238. core1.nexe \
  239. core2.nexe \
  240. core3.nexe \
  241. core4.nexe \
  242. core5.nexe \
  243. core6.nexe \
  244. ed25519_convert.nexe \
  245. generichash.nexe \
  246. generichash2.nexe \
  247. generichash3.nexe \
  248. hash.nexe \
  249. hash2.nexe \
  250. hash3.nexe \
  251. kdf.nexe \
  252. keygen.nexe \
  253. kx.nexe \
  254. metamorphic.nexe \
  255. misuse.nexe \
  256. onetimeauth.nexe \
  257. onetimeauth2.nexe \
  258. onetimeauth7.nexe \
  259. pwhash_argon2i.nexe \
  260. pwhash_argon2id.nexe \
  261. pwhash_scrypt.nexe \
  262. pwhash_scrypt_ll.nexe \
  263. randombytes.nexe \
  264. scalarmult.nexe \
  265. scalarmult2.nexe \
  266. scalarmult5.nexe \
  267. scalarmult6.nexe \
  268. scalarmult7.nexe \
  269. secretbox.nexe \
  270. secretbox2.nexe \
  271. secretbox7.nexe \
  272. secretbox8.nexe \
  273. secretbox_easy.nexe \
  274. secretbox_easy2.nexe \
  275. secretstream.nexe \
  276. shorthash.nexe \
  277. sign.nexe \
  278. siphashx24.nexe \
  279. sodium_core.nexe \
  280. sodium_utils.nexe \
  281. sodium_version.nexe \
  282. stream.nexe \
  283. stream2.nexe \
  284. stream3.nexe \
  285. stream4.nexe \
  286. verify1.nexe \
  287. xchacha20.nexe
  288. endif
  289. AM_CPPFLAGS = \
  290. -DTEST_SRCDIR=\"@srcdir@\" \
  291. -I$(top_srcdir)/src/libsodium/include \
  292. -I$(top_srcdir)/src/libsodium/include/sodium \
  293. -I$(top_builddir)/src/libsodium/include \
  294. -I$(top_builddir)/src/libsodium/include/sodium \
  295. -I$(top_srcdir)/test/quirks
  296. AM_LDFLAGS = @TEST_LDFLAGS@
  297. TESTS_TARGETS = \
  298. aead_aes256gcm \
  299. aead_chacha20poly1305 \
  300. aead_xchacha20poly1305 \
  301. auth \
  302. auth2 \
  303. auth3 \
  304. auth5 \
  305. auth6 \
  306. auth7 \
  307. box \
  308. box2 \
  309. box7 \
  310. box8 \
  311. box_easy \
  312. box_easy2 \
  313. box_seal \
  314. box_seed \
  315. chacha20 \
  316. codecs \
  317. core1 \
  318. core2 \
  319. core3 \
  320. core4 \
  321. core5 \
  322. core6 \
  323. ed25519_convert \
  324. generichash \
  325. generichash2 \
  326. generichash3 \
  327. hash \
  328. hash3 \
  329. kdf \
  330. keygen \
  331. kx \
  332. metamorphic \
  333. misuse \
  334. onetimeauth \
  335. onetimeauth2 \
  336. onetimeauth7 \
  337. pwhash_argon2i \
  338. pwhash_argon2id \
  339. randombytes \
  340. scalarmult \
  341. scalarmult2 \
  342. scalarmult5 \
  343. scalarmult6 \
  344. scalarmult7 \
  345. secretbox \
  346. secretbox2 \
  347. secretbox7 \
  348. secretbox8 \
  349. secretbox_easy \
  350. secretbox_easy2 \
  351. secretstream \
  352. shorthash \
  353. sign \
  354. sodium_core \
  355. sodium_utils \
  356. sodium_version \
  357. stream \
  358. stream2 \
  359. stream3 \
  360. stream4 \
  361. verify1
  362. if !EMSCRIPTEN
  363. if !NATIVECLIENT
  364. TESTS_TARGETS += \
  365. sodium_utils2 \
  366. sodium_utils3
  367. endif
  368. endif
  369. check_PROGRAMS = $(TESTS_TARGETS)
  370. TESTS = $(TESTS_TARGETS)
  371. TESTS_LDADD = \
  372. ${top_builddir}/src/libsodium/libsodium.la
  373. aead_aes256gcm_SOURCE = cmptest.h aead_aes256gcm.c
  374. aead_aes256gcm_LDADD = $(TESTS_LDADD)
  375. aead_chacha20poly1305_SOURCE = cmptest.h aead_chacha20poly1305.c
  376. aead_chacha20poly1305_LDADD = $(TESTS_LDADD)
  377. aead_xchacha20poly1305_SOURCE = cmptest.h aead_xchacha20poly1305.c
  378. aead_xchacha20poly1305_LDADD = $(TESTS_LDADD)
  379. auth_SOURCE = cmptest.h auth.c
  380. auth_LDADD = $(TESTS_LDADD)
  381. auth2_SOURCE = cmptest.h auth2.c
  382. auth2_LDADD = $(TESTS_LDADD)
  383. auth3_SOURCE = cmptest.h auth3.c
  384. auth3_LDADD = $(TESTS_LDADD)
  385. auth5_SOURCE = cmptest.h auth5.c quirks.h
  386. auth5_LDADD = $(TESTS_LDADD)
  387. auth6_SOURCE = cmptest.h auth6.c quirks.h
  388. auth6_LDADD = $(TESTS_LDADD)
  389. auth7_SOURCE = cmptest.h auth7.c quirks.h
  390. auth7_LDADD = $(TESTS_LDADD)
  391. box_SOURCE = cmptest.h box.c
  392. box_LDADD = $(TESTS_LDADD)
  393. box2_SOURCE = cmptest.h box2.c
  394. box2_LDADD = $(TESTS_LDADD)
  395. box7_SOURCE = cmptest.h box7.c
  396. box7_LDADD = $(TESTS_LDADD)
  397. box8_SOURCE = cmptest.h box8.c
  398. box8_LDADD = $(TESTS_LDADD)
  399. box_easy_SOURCE = cmptest.h box_easy.c
  400. box_easy_LDADD = $(TESTS_LDADD)
  401. box_easy2_SOURCE = cmptest.h box_easy2.c
  402. box_easy2_LDADD = $(TESTS_LDADD)
  403. box_seal_SOURCE = cmptest.h box_seal.c
  404. box_seal_LDADD = $(TESTS_LDADD)
  405. box_seed_SOURCE = cmptest.h box_seed.c
  406. box_seed_LDADD = $(TESTS_LDADD)
  407. chacha20_SOURCE = cmptest.h chacha20.c
  408. chacha20_LDADD = $(TESTS_LDADD)
  409. codecs_SOURCE = cmptest.h codecs.c
  410. codecs_LDADD = $(TESTS_LDADD)
  411. core1_SOURCE = cmptest.h core1.c
  412. core1_LDADD = $(TESTS_LDADD)
  413. core2_SOURCE = cmptest.h core2.c
  414. core2_LDADD = $(TESTS_LDADD)
  415. core3_SOURCE = cmptest.h core3.c
  416. core3_LDADD = $(TESTS_LDADD)
  417. core4_SOURCE = cmptest.h core4.c
  418. core4_LDADD = $(TESTS_LDADD)
  419. core5_SOURCE = cmptest.h core5.c
  420. core5_LDADD = $(TESTS_LDADD)
  421. core6_SOURCE = cmptest.h core6.c
  422. core6_LDADD = $(TESTS_LDADD)
  423. ed25519_convert_SOURCE = cmptest.h ed25519_convert.c
  424. ed25519_convert_LDADD = $(TESTS_LDADD)
  425. generichash_SOURCE = cmptest.h generichash.c
  426. generichash_LDADD = $(TESTS_LDADD)
  427. generichash2_SOURCE = cmptest.h generichash2.c
  428. generichash2_LDADD = $(TESTS_LDADD)
  429. generichash3_SOURCE = cmptest.h generichash3.c
  430. generichash3_LDADD = $(TESTS_LDADD)
  431. hash_SOURCE = cmptest.h hash.c
  432. hash_LDADD = $(TESTS_LDADD)
  433. hash3_SOURCE = cmptest.h hash3.c
  434. hash3_LDADD = $(TESTS_LDADD)
  435. kdf_SOURCE = cmptest.h kdf.c
  436. kdf_LDADD = $(TESTS_LDADD)
  437. keygen_SOURCE = cmptest.h keygen.c
  438. keygen_LDADD = $(TESTS_LDADD)
  439. kx_SOURCE = cmptest.h kx.c
  440. kx_LDADD = $(TESTS_LDADD)
  441. metamorphic_SOURCE = cmptest.h metamorphic.c
  442. metamorphic_LDADD = $(TESTS_LDADD)
  443. misuse_SOURCE = cmptest.h misuse.c
  444. misuse_LDADD = $(TESTS_LDADD)
  445. onetimeauth_SOURCE = cmptest.h onetimeauth.c
  446. onetimeauth_LDADD = $(TESTS_LDADD)
  447. onetimeauth2_SOURCE = cmptest.h onetimeauth2.c
  448. onetimeauth2_LDADD = $(TESTS_LDADD)
  449. onetimeauth7_SOURCE = cmptest.h onetimeauth7.c
  450. onetimeauth7_LDADD = $(TESTS_LDADD)
  451. pwhash_argon2i_SOURCE = cmptest.h pwhash_argon2i.c
  452. pwhash_argon2i_LDADD = $(TESTS_LDADD)
  453. pwhash_argon2id_SOURCE = cmptest.h pwhash_argon2id.c
  454. pwhash_argon2id_LDADD = $(TESTS_LDADD)
  455. pwhash_scrypt_SOURCE = cmptest.h pwhash_scrypt.c
  456. pwhash_scrypt_LDADD = $(TESTS_LDADD)
  457. pwhash_scrypt_ll_SOURCE = cmptest.h pwhash_scrypt_ll.c
  458. pwhash_scrypt_ll_LDADD = $(TESTS_LDADD)
  459. randombytes_SOURCE = cmptest.h randombytes.c
  460. randombytes_LDADD = $(TESTS_LDADD)
  461. scalarmult_SOURCE = cmptest.h scalarmult.c
  462. scalarmult_LDADD = $(TESTS_LDADD)
  463. scalarmult2_SOURCE = cmptest.h scalarmult2.c
  464. scalarmult2_LDADD = $(TESTS_LDADD)
  465. scalarmult5_SOURCE = cmptest.h scalarmult5.c
  466. scalarmult5_LDADD = $(TESTS_LDADD)
  467. scalarmult6_SOURCE = cmptest.h scalarmult6.c
  468. scalarmult6_LDADD = $(TESTS_LDADD)
  469. scalarmult7_SOURCE = cmptest.h scalarmult7.c
  470. scalarmult7_LDADD = $(TESTS_LDADD)
  471. secretbox_SOURCE = cmptest.h secretbox.c
  472. secretbox_LDADD = $(TESTS_LDADD)
  473. secretbox2_SOURCE = cmptest.h secretbox2.c
  474. secretbox2_LDADD = $(TESTS_LDADD)
  475. secretbox7_SOURCE = cmptest.h secretbox7.c
  476. secretbox7_LDADD = $(TESTS_LDADD)
  477. secretbox8_SOURCE = cmptest.h secretbox8.c
  478. secretbox8_LDADD = $(TESTS_LDADD)
  479. secretbox_easy_SOURCE = cmptest.h secretbox_easy.c
  480. secretbox_easy_LDADD = $(TESTS_LDADD)
  481. secretbox_easy2_SOURCE = cmptest.h secretbox_easy2.c
  482. secretbox_easy2_LDADD = $(TESTS_LDADD)
  483. secretstream_SOURCE = cmptest.h secretstream.c
  484. secretstream_LDADD = $(TESTS_LDADD)
  485. shorthash_SOURCE = cmptest.h shorthash.c
  486. shorthash_LDADD = $(TESTS_LDADD)
  487. sign_SOURCE = cmptest.h sign.c
  488. sign_LDADD = $(TESTS_LDADD)
  489. siphashx24_SOURCE = cmptest.h siphashx24.c
  490. siphashx24_LDADD = $(TESTS_LDADD)
  491. sodium_core_SOURCE = cmptest.h sodium_core.c
  492. sodium_core_LDADD = $(TESTS_LDADD)
  493. sodium_utils_SOURCE = cmptest.h sodium_utils.c
  494. sodium_utils_LDADD = $(TESTS_LDADD)
  495. sodium_utils2_SOURCE = cmptest.h sodium_utils2.c
  496. sodium_utils2_LDADD = $(TESTS_LDADD)
  497. sodium_utils3_SOURCE = cmptest.h sodium_utils3.c
  498. sodium_utils3_LDADD = $(TESTS_LDADD)
  499. sodium_version_SOURCE = cmptest.h sodium_version.c
  500. sodium_version_LDADD = $(TESTS_LDADD)
  501. stream_SOURCE = cmptest.h stream.c
  502. stream_LDADD = $(TESTS_LDADD)
  503. stream2_SOURCE = cmptest.h stream2.c
  504. stream2_LDADD = $(TESTS_LDADD)
  505. stream3_SOURCE = cmptest.h stream3.c
  506. stream3_LDADD = $(TESTS_LDADD)
  507. stream4_SOURCE = cmptest.h stream4.c
  508. stream4_LDADD = $(TESTS_LDADD)
  509. verify1_SOURCE = cmptest.h verify1.c
  510. verify1_LDADD = $(TESTS_LDADD)
  511. xchacha20_SOURCE = cmptest.h xchacha20.c
  512. xchacha20_LDADD = $(TESTS_LDADD)
  513. if !MINIMAL
  514. TESTS_TARGETS += \
  515. pwhash_scrypt \
  516. pwhash_scrypt_ll \
  517. siphashx24 \
  518. xchacha20
  519. endif
  520. if NATIVECLIENT
  521. LOG_COMPILER = ./nacl-test-wrapper.sh
  522. endif
  523. verify: check
  524. @VALGRIND_CHECK_RULES@