added tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
tests: Add a few more cases for --sdtid and --v3 tokens

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
autoconf: Add configure option --enable-valgrind

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
autoconf: Fix up --enable-debug handling

Respect $enableval, add [default=no] to help text, and add -fno-inline.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
travis: Run "make check" under valgrind on each new commit

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Start moving crypto wrappers into a separate module

Since we want to be able to use nettle/tomcrypt/... interchangeably,
we will want to call generic wrapper functions instead of directly
invoking the crypto library.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
stc: Move AES wrappers into stc-tomcrypt.c

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
securid: Make securid_rand() crypto-library-agnostic

rng_get_bytes() typically just reads /dev/urandom anyway.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
stc: Move sha1 and sha256 wrappers into stc-tomcrypt.c

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
stc: Add base64 wrappers to stc-tomcrypt.c

securid.c is now <tomcrypt.h>-free.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
stc: Move RSA signature wrapper into stc-tomcrypt.c

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
autoconf: Probe libtomcrypt for RSA support

As seen in Bug #13, not all tomcrypt packages link against libtommath.
Catch this at ./configure time so that we can substitute another crypto
library if available.  Or maybe link with TomsFastMath if that is
available instead.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
autoconf: Use generic CRYPTO_* names in Makefile.am

This will make it easier to substitute a different crypto library.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Initial commit of nettle support

Add stc-nettle.c wrappers and autoconf magic.  This passes "make check".
Tested on nettle/hogweed 2.4 (Ubuntu 12.04) and 2.7 (Ubuntu 14.04).

Fixes #12.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
travis: Add test build using nettle

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
README: mention nettle as dependency