Commit Graph

143 Commits

Author SHA1 Message Date
Michael Scherer 24534bcfcf Replace magic number for status word by constants
Most come from NIST special publication 800-73-4, section 5.6,
except one which I assume to be a custom one for yubikey.
2016-05-09 09:38:37 +02:00
Klas Lindfors bbde9f91f9 Merge branch 'fix_typo' of ssh://github.com/mscherer/yubico-piv-tool into mscherer-fix_typo 2016-05-09 09:01:28 +02:00
Michael Scherer 6a4608ff05 Use more constant for filling apdu struct. 2016-05-05 01:11:42 +02:00
Michael Scherer 099c55e90a Fix various errors messages 2016-05-05 01:11:37 +02:00
Klas Lindfors ebf31d73f8 Merge branch 'attestation2' 2016-05-03 09:24:14 +02:00
Klas Lindfors 60dbac235d unblock pin should unblock pin, not change puk 2016-04-18 21:43:34 +02:00
Klas Lindfors f5fab7e962 add ykpiv touchpolicy to ykpiv 2016-03-17 12:29:25 +01:00
Klas Lindfors 189fe723f1 add YKPIV_KEY_ATTESTATION to ykpiv_import_key() 2016-03-17 12:29:13 +01:00
Alessio Di Mauro 39f5dbd119 Typo. 2016-01-11 12:49:58 +01:00
Mikhail Denisenko 6042a2140e Implemented C_SetPIN 2015-12-11 13:23:38 -05:00
Alessio Di Mauro 4849e494be Add retired key definitions to libykpiv.
Include retired keys in import_key's check.
2015-11-20 15:44:19 +01:00
Klas Lindfors ed38b96fe4 raise buffer sizes and remove a miss-leading error 2015-11-20 13:14:55 +01:00
Alessio Di Mauro e39b203d66 Remove leftover print. 2015-11-20 11:45:35 +01:00
Alessio Di Mauro 6269280578 Add import private key to libykpiv. 2015-11-19 18:30:58 +01:00
Alessio Di Mauro b6d4238856 Initial work on doing padding internally 2015-11-19 18:30:58 +01:00
Klas Lindfors 41b3b50613 always reset the context to SCARD_INVALID_CONTEXT after release 2015-11-11 15:02:55 +01:00
Alessio Di Mauro f2a3a3acc1 YKPIV: Make sure that context is established only if it is invalid. 2015-11-10 15:36:35 +01:00
Alessio Di Mauro d38df01c6c Change applet to application. 2015-11-06 13:14:52 +01:00
Alessio Di Mauro 651280ca8b Initialize context to -1 and always call establish context. 2015-11-03 09:56:27 +01:00
Klas Lindfors e4059a5995 Merge branch 'master' into development
Conflicts:
	NEWS
	configure.ac
2015-10-20 20:48:57 +02:00
Klas Lindfors 7640d34245 use 261 byte buffer for receive 2015-09-28 11:15:30 +02:00
Alessio Di Mauro d793f200bb Merge branch 'development' of gitlab.yubico.com:/Yubico/yubico-piv-tool into development
Conflicts:
	ykcs11/ykcs11.c
2015-09-08 18:04:45 +02:00
Alessio Di Mauro 99ebfdf37c Added support for CKU_CONTEXT_SPECIFIC. 2015-09-08 18:00:48 +02:00
Klas Lindfors 49eab7dbfa drop ykpiv_sign_data2() and change ykpiv_sign_data() to not pad 2015-09-08 15:29:10 +02:00
Klas Lindfors 4bbd888f97 let ykpiv_connect() call ykpiv_list_readers() 2015-09-08 12:29:07 +02:00
Klas Lindfors 8eb7595d42 add list-readers action to tool
also refactor ykpiv_list_readers() a bit
2015-09-08 12:26:42 +02:00
Klas Lindfors 1a9e62cec8 drop ykpiv_connect2() and add ykpiv_list_readers() 2015-09-07 15:54:57 +02:00
Klas Lindfors 984a124508 Merge branch 'master' into ykcs11
Conflicts:
	NEWS
	configure.ac
2015-09-07 14:34:34 +02:00
Klas Lindfors b770155cbb Merge branch 'devel/p384' into ykcs11
Conflicts:
	NEWS
	configure.ac
	lib/ykpiv.c
	lib/ykpiv.h
	tool/util.c
	tool/util.h
2015-09-07 14:32:37 +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 aabe4fb20e Merge branch 'master' into ykcs11
Conflicts:
	lib/ykpiv.c
	lib/ykpiv.h
2015-08-20 09:30: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
Alessio Di Mauro df2ff3cd51 Fixed pkcs1.5 padding 2015-08-12 15:41:58 +02:00
Alessio Di Mauro 7ce5ea4dc2 Added sign_data2 to libykpiv to disable padding. 2015-08-03 16:22:58 +02:00
Alessio Di Mauro dae7297050 Major refactor and vendor abstraction. 2015-07-14 14:13:02 +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 2e91cd0f5b Merge branch 'master' into devel/p384 2015-07-08 15:09:11 +02:00
Alessio Di Mauro f95c6f2f2d Added basic multivendor support for token information. 2015-07-03 17:23:16 +02:00
Klas Lindfors 3b080dca45 relicense to 2-clause BSD license 2015-07-01 16:34:20 +02:00
Alessio Di Mauro 2b2fe1f9fa Added basic version of slot info functions. 2015-06-30 11:14:36 +02:00
Klas Lindfors 80e6fe525a change IS_XXKEY macros to be YKPIV_IS_XX 2015-06-30 07:33:39 +02:00
Klas Lindfors 642891e2b3 move padding for signing to ykpiv_sign_data()
and only pad if in_len != key_len
2015-06-26 12:56:46 +02:00
Klas Lindfors 600b302c1d add touch for set-mgm-key 2015-06-25 12:32:01 +02:00
Klas Lindfors 1541362866 add macros for IS_ECKEY and IS_RSAKEY, also fix tag on ECCP384 2015-06-24 13:06:00 +02:00
Klas Lindfors f17d09f19c start adding secp384r1 2015-06-24 13:06:00 +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