File tree Expand file tree Collapse file tree
cmd/tools/modules/testing Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,9 +54,6 @@ pub const is_python_present = os.execute('python --version').exit_code == 0
5454pub const is_sqlite3_present = os.execute ('sqlite3 --version' ).exit_code == 0
5555 && os.execute ('pkg-config sqlite3 --libs' ).exit_code == 0
5656
57- pub const is_openssl_present = os.execute ('openssl --version' ).exit_code == 0
58- && os.execute ('pkg-config openssl --libs' ).exit_code == 0
59-
6057pub const all_processes = get_all_processes ()
6158
6259pub const header_bytes_to_search_for_module_main = 500
@@ -881,6 +878,18 @@ fn get_max_header_len() int {
881878 return cols
882879}
883880
881+ fn check_openssl_present () bool {
882+ $if openbsd {
883+ return os.execute ('eopenssl34 --version' ).exit_code == 0
884+ && os.execute ('pkg-config eopenssl34 --libs' ).exit_code == 0
885+ } $else {
886+ return os.execute ('openssl --version' ).exit_code == 0
887+ && os.execute ('pkg-config openssl --libs' ).exit_code == 0
888+ }
889+ }
890+
891+ pub const is_openssl_present = check_openssl_present ()
892+
884893// is_started_mysqld is true, when the test runner determines that there is a running mysql server
885894pub const is_started_mysqld = find_started_process ('mysqld' ) or { '' }
886895
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ module ecdsa
1515#flag linux -I/usr/local/include/openssl
1616#flag linux -L/usr/local/lib64/
1717
18+ #flag openbsd -I/usr/local/include/eopenssl34
19+ #flag openbsd -L/usr/local/lib/eopenssl34 -Wl,-rpath,/usr/local/lib/eopenssl34
20+
1821// Installed through choco:
1922#flag windows -IC:/Program Files/OpenSSL-Win64/include
2023#flag windows -LC:/Program Files/OpenSSL-Win64/lib/VC/x64/MD
Original file line number Diff line number Diff line change 1- // vtest build: present_openssl? && !(sanitize-memory-clang || docker-ubuntu-musl)
1+ // vtest build: present_openssl? && !(openbsd && gcc) && !( sanitize-memory-clang || docker-ubuntu-musl)
22module ecdsa
33
44fn test_ecdsa () {
Original file line number Diff line number Diff line change 1- // vtest build: present_openssl? && !(sanitize-memory-clang || docker-ubuntu-musl)
1+ // vtest build: present_openssl? && !(openbsd && gcc) && !( sanitize-memory-clang || docker-ubuntu-musl)
22import rand
33import crypto.ecdsa
44import encoding.hex
Original file line number Diff line number Diff line change 1- // vtest build: present_openssl? && !(sanitize-memory-clang || docker-ubuntu-musl)
1+ // vtest build: present_openssl? && !(openbsd && gcc) && !( sanitize-memory-clang || docker-ubuntu-musl)
22import net.openssl
33import crypto.ecdsa
44
Original file line number Diff line number Diff line change 1- // vtest build: present_openssl? && !(sanitize-memory-clang || docker-ubuntu-musl)
1+ // vtest build: present_openssl? && !(openbsd && gcc) && !( sanitize-memory-clang || docker-ubuntu-musl)
22module ecdsa
33
44import encoding.hex
@@ -90,7 +90,7 @@ fn test_load_privkey_from_string_sign_and_verify() ! {
9090 expected_pvkey_bytes := '30ce3da288965ac6093f0ba9a9a15b2476bea3eda925e1b3c1f094674f52795cd6cb3cafe235dfc15bec542448ffa715'
9191 assert pvkey.bytes ()! .hex () == expected_pvkey_bytes
9292
93- // public key part
93+ // public key part
9494 pbkey := pvkey.public_key ()!
9595 pbkey_bytes := pbkey.bytes ()!
9696 expected_pubkey_bytes := '04f8fdeb845913d5f5c761b6370a9701761eb14c2ef831017171fb4d543df310f573a3ffce6a52156ad635eb692c83cb9158176f145b8767d38c55791b8f05b085c5cfeea988f6b3922d1dc019495dcbe6c1a55da74f7d3aa8223081400c78e24f'
@@ -133,7 +133,7 @@ UHhnmmVRraSwrVkPdYIeXhH/Ob4+8OLcwrQBMv4RXsD1GVFsgkvEYDTEb/vnMA==
133133fn test_key_signing_verifying_with_custom_hash () ! {
134134 // privatekey_sample was P-384 key
135135 pvkey := privkey_from_string (privatekey_sample)!
136- // public key part
136+ // public key part
137137 pbkey := pvkey.public_key ()!
138138 pbk := pubkey_from_string (public_key_sample)!
139139
You can’t perform that action at this time.
0 commit comments