arekinath / pivy

Tools for using PIV tokens (like Yubikeys) as an SSH agent, for encrypting data at rest, and more
193 stars 26 forks source link

Build Issue on Debian 'Buster' (10) #29

Closed iandstanley closed 3 years ago

iandstanley commented 3 years ago

After installing the libraries:

$ sudo apt install libbsd-dev libbsd0 freebsd-glue libpcsclite-dev libpcsclite1

And the following for good luck .. $ sudo apt install libeditline-dev libedit2 libedit-dev libeditline0

I ran a make

cc -pthread -I/usr/include/PCSC -I/home/ian/Projects/pivy/libressl/include  -I/usr/include/editline -isystem /usr/include/bsd -DLIBBSD_OVERLAY -fstack-protector-all -fwrapv -fPIC -D_FORTIFY_SOURCE=2 -Wall -O2 -g -m64 -D_GNU_SOURCE -std=gnu99 -o 

sss/randombytes.o -c sss/randombytes.c
sss/randombytes.c: In function ‘randombytes’:
sss/randombytes.c:177:11: note: #pragma message: Using getrandom system call
#  pragma message("Using getrandom system call")
           ^~~~~~~
cc -m64 -o pivy-box pivy-box.o ebox.o ebox-cmd.o piv.o tlv.o debug.o bunyan.o errf.o utils.o libssh/sshbuf.o libssh/sshkey.o libssh/ssh-ed25519.o libssh/ssh-ecdsa.o libssh/ssh-rsa.o libssh/cipher.o libssh/digest-openssl.o libssh/bcrypt-pbkdf.o libssh/blowfish.o libssh/rsa.o libssh/base64.o libssh/atomicio.o libssh/hmac.o libssh/authfd.o ed25519/ed25519.o ed25519/fe25519.o ed25519/ge25519.o ed25519/sc25519.o ed25519/hash.o ed25519/blocks.o chapoly/chacha.o chapoly/poly1305.o sss/hazmat.o sss/randombytes.o -lpcsclite /home/ian/Projects/pivy/libressl/crypto/.libs/libcrypto.a -pthread -lz -ledit -lbsd

Make builds pivy-agent, pivy-box and pivy-tool but I was wondering about the #pragma warning in sss/randombytes.c and was it an issue? (after all the security of any crypto system relies on entropy)

arekinath commented 3 years ago

It's not a warning, just a "note". That code always produces a #pragma note to let you know which implementation it's using (it's not warning that the one it's using is especially bad). The getrandom() syscall is perfectly fine.

iandstanley commented 3 years ago

That's a relief. It's one thing using a package with warnings another when it is critical to security

thanks