Klas Lindfors
7640d34245
use 261 byte buffer for receive
2015-09-28 11:15:30 +02:00
Klas Lindfors
da29e6947c
authentication failed is supposed to be 0x63cX not 0x630X
...
so mask everything but the low 4 bits for remaining tries
2015-08-24 08:28:49 +02:00
Klas Lindfors
81f3b608fd
continue looping over the readers if one fails during setup
...
also continues if a reader fails when selecting (no applet)
2015-08-20 09:25:18 +02:00
Klas Lindfors
fb0c437533
check result from get_length()
...
found with clang scan-build
2015-07-09 11:01:49 +02:00
Klas Lindfors
3fd716791b
avoid copying data to NULL pointer
...
found by clang scan-build
2015-07-09 10:34:39 +02:00
Klas Lindfors
43ffb65462
don't do memcpy with NULL argument
...
found with clang scan-build
2015-07-09 10:28:21 +02:00
Klas Lindfors
103930daf9
add Requires.private on libcrypto
2015-07-08 14:50:43 +02:00
Klas Lindfors
3b080dca45
relicense to 2-clause BSD license
2015-07-01 16:34:20 +02:00
Klas Lindfors
3d0ff7b969
add a test-decipher command
...
test-decipher will for rsa do public encrypt on a random string and let
the key decrypt
for ec it will generate a new ec key and do ecdh and confirm it gets the
same answer back
2015-05-19 14:22:26 +02:00
Klas Lindfors
63345d1b3e
drop verbose prints from library
...
for ykpiv_verify() they're in tool as well.
2015-05-18 13:36:14 +02:00
Klas Lindfors
bf3fcc77fe
use a transation while sending and receiving data
2015-05-08 09:57:51 +02:00
Klas Lindfors
16bc868d90
verify with NULL pin now reports tries without decrementing
2015-03-17 13:49:58 +01:00
Klas Lindfors
35d75051b0
don't try to parse returned data if it was an error
2015-03-17 12:41:42 +01:00
Klas Lindfors
fa1d3ca9f9
set parity bits for weak check instead of enforcing them
...
rework of dca651070d
2015-02-04 10:00:03 +01:00
Klas Lindfors
220f0f0226
add a negative test for the hex decode
2015-02-03 10:56:13 +01:00
Klas Lindfors
8b36d6706d
add a test with uppercase hex
2015-02-02 10:40:41 +01:00
Klas Lindfors
6d749a38f7
make sure we try to decode uppercase hex
2015-02-02 10:29:34 +01:00
Klas Lindfors
dca651070d
use DES_set_key_checked() instead of DES_is_weak_key()
...
since DES_set_key_checked() checks the parity as well
2015-02-02 10:26:25 +01:00
Klas Lindfors
07c73200e4
calculate offsets properly
2015-02-02 10:19:15 +01:00
Klas Lindfors
22d04fc1c8
return error properly on hex decode
2015-02-02 10:17:45 +01:00
Klas Lindfors
f8c35043cc
reduce scope of variables
2015-01-29 10:48:05 +01:00
Klas Lindfors
fe2f470d3c
move parantheses to make check clearer
2015-01-29 10:48:05 +01:00
Klas Lindfors
d2e0a3bc79
add --enable-coverage for lcov
2015-01-20 13:06:07 +01:00
Klas Lindfors
caf64fc464
add valgrind for tests
2014-12-09 15:11:22 +01:00
Klas Lindfors
a4235e9575
don't use AC_LIB_HAVE_LINKFLAGS
...
it seems to be from gnulib or such, not always available
fixes #7
2014-10-30 14:10:27 +01:00
Klas Lindfors
a90dbba4bf
add the length of the padding when checking RSA length
2014-09-29 15:49:58 +02:00
Klas Lindfors
b66f81b324
replace ykpiv_parse_key() with ykpiv_hex_decode()
2014-06-27 15:06:44 +02:00
Klas Lindfors
2de68134ad
temp fix for ykpiv_parse_key()
...
it should be removed and replaced by a real
hex encoder.
2014-06-27 12:19:44 +02:00
Klas Lindfors
b34db10086
let set_object set tag as well, not only lv
2014-06-26 08:28:38 +02:00
Klas Lindfors
ac79b0809d
refactor delete action to use ykpiv_save_object()
2014-06-26 08:24:34 +02:00
Klas Lindfors
a1c2e4e8d1
refactor writing object to it's own library function
...
ykpiv_save_object(), use that for writing certs
2014-06-26 08:02:44 +02:00
Klas Lindfors
b0eec2a6ea
refactor to let send_data take an APDU* for data
2014-06-26 07:34:25 +02:00
Klas Lindfors
0d754893f4
let set_length take a size_t
2014-06-25 15:52:01 +02:00
Klas Lindfors
ea88f94fd4
add openssl/rsa.h for ykpiv.c
2014-06-25 15:49:07 +02:00
Klas Lindfors
82e054d244
rename ykpiv_send_data() to send_data() since it's local
2014-06-25 15:47:56 +02:00
Klas Lindfors
b8ecc6cda2
refactor so ykpiv_sign_data() takes size_t input
2014-06-25 15:41:20 +02:00
Klas Lindfors
ba9ee75b3f
stop exporting ykpiv_send_data()
2014-06-25 15:38:53 +02:00
Klas Lindfors
00343b9b6c
refactor transfer data so it can send 0 bytes
2014-06-25 15:17:27 +02:00
Klas Lindfors
c4d8492682
make get_length() take a const buffer
2014-06-25 15:10:56 +02:00
Klas Lindfors
58e078af2f
add error messages
2014-06-25 10:47:32 +02:00
Klas Lindfors
9b5ede8530
change around and let ykpiv_sign_data() pad
2014-06-25 10:47:32 +02:00
Klas Lindfors
d17c0650a9
3f ff for object
2014-06-24 16:18:01 +02:00
Klas Lindfors
2e8170aa31
only return the actual data in ykpiv_fetch_data()
2014-06-24 15:02:36 +02:00
Klas Lindfors
c5696d4b45
rework some stuff to size_t
2014-06-24 15:02:26 +02:00
Klas Lindfors
05a30e1da5
add ykpiv_fetch_object() to library
2014-06-24 14:35:59 +02:00
Klas Lindfors
d5222c10b7
add macros for piv objects
2014-06-24 14:07:15 +02:00
Klas Lindfors
b048ea85e5
move lib tests under lib
2014-06-24 09:52:10 +02:00
Klas Lindfors
31d9d0d680
add ykpiv_verify to the library
2014-06-23 09:57:10 +02:00
Klas Lindfors
052b80830a
make constants for more instructions
2014-06-18 13:28:28 +02:00
Klas Lindfors
a97010d5e3
add ykpiv_get_version() function
2014-06-17 15:26:48 +02:00