mirror of
https://github.com/open-quantum-safe/liboqs.git
synced 2025-10-05 00:05:12 -04:00
* Add minimal kex and sig example file showing the api usage * Fix regular expression * update * Update global namespace regex * Further updates to gloabalnamespace script * added minimal_sig/kex_oqs as test cases * commit * commit * commit updated tabs to spaces * commit make prettyprint * commit replaced macros with functions * commit changed print_hex_string to disp_hex_string to comply to the coding standards * updated regex * Remove spurious regex updates * commit * Added back _ntt_double and _rec in regex Otherwise gcc fails on travis * commit
18 lines
713 B
Bash
Executable File
18 lines
713 B
Bash
Executable File
#!/bin/bash
|
|
|
|
REGEX=' T [_]?(OQS|ntru|picnic|Keccak|.*SIKEp503|.*SIDHp503|.*SIKEp751|.*SIDHp751|.*shake128|.*shake256|rand_bytes|cpu_supports|uint64_from_char_array|uint64_to_char_array|print_hex|ntt_double|rec|aligned_alloc|aligned_free)'
|
|
|
|
if [[ $(nm -g liboqs.a | grep ' T ' | grep -E -v -i "$REGEX") ]];
|
|
then
|
|
tput setaf 1;
|
|
echo "Code contains the following non-namespaced global symbols; see https://github.com/open-quantum-safe/liboqs/wiki/Coding-conventions for function naming conventions.";
|
|
tput sgr 0
|
|
nm -g liboqs.a | grep ' T ' | grep -E -v -i "$REGEX"
|
|
exit 1;
|
|
else
|
|
tput setaf 2;
|
|
echo "Code adheres to the project standards (global namespace).";
|
|
tput sgr 0
|
|
exit 0;
|
|
fi;
|