exaexa / codecrypt

Post-quantum cryptography tool (THIS REPOSITORY IS ONLY A MIRROR OF THE MAIN ONE, PLEASE DO NOT FILE BUGS HERE)
https://gitea.blesmrt.net/exa/codecrypt
GNU Lesser General Public License v3.0
308 stars 40 forks source link

add CMake support. #30

Closed tearsofphoenix closed 6 years ago

exaexa commented 6 years ago

Hi,

Thanks for the contribution. There are 2 problems:

First, the produced executable should be named ccr not codecrypt.

Second, would it also be possible to check for readpassphrase function from libBSD (and setting flags accordingly) so that the compile warning about defaulting to getpass() is not produced?

This:

[ 42%] Building CXX object CMakeFiles/codecrypt.dir/src/pwrng.cpp.o
/home/exa/work/codecrypt/src/pwrng.cpp:31:2: warning: #warning "Falling back to getpass(3), which is marked obsolete!" [-Wcpp]
 #warning "Falling back to getpass(3), which is marked obsolete!"
  ^~~~~~~

You may find the relevant logic here: https://github.com/exaexa/codecrypt/blob/master/configure.ac#L58-L73

Anyway, please continue working rebased to 'cmake' master of codecrypt repo.

exaexa commented 6 years ago

Looks better (though it would be much nicer to actually check for readpassphrase presence, and not rely on the (false) presumption that "all unixes have bsd/readpassphrase.h".

Anyway, I just noticed that the resulting ccr is compiled without crypto++ support (thus, no SHA-family hashes etc.). Probably not a problem but it would be nice to also include the check.

tearsofphoenix commented 6 years ago

@exaexa now, add real check for both libraries. No need to check on mac because it has readpassphrase.h. Tested on macOS High Sierra 10.13.2 & Ubuntu 16.04.

exaexa commented 6 years ago

OK, now it works just right! Accepted&thanks!