aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-06-27Apparently sw/pkcs11 somehow missed the great ${foo_LIB} => ${foo_SRC}, ↵Rob Austein
${foo_BLD} Makefile cleanup.
2016-06-26libtfm assembly code has portability issues under pbuilder, and we don't ↵Rob Austein
really need it for libpkcs11.
2016-06-26More GNUmakefile cleanup.Rob Austein
2016-06-25Rename GNUmakefile to Makefile for consistency.Paul Selkirk
2016-06-24VPATH build for libpkcs11.so, and first cut at libpkcs11.dylib for Mac OS X.Rob Austein
The Mac OS X build compiles, but is otherwise completely untested, and won't even be testable until cryptech_rpcd support configuring high-speed UARTs on Mac OS X (OS-specific voodoo).
2016-06-23Reorder ld arguments to get search order right.Rob Austein
2016-06-23Support use of system sqlite3 library instead of our own; various other ↵Rob Austein
tweaks Lintian wanted.
2016-06-16Convert timing report to integrate with unittest.TextTestRunner, to avoid ↵Rob Austein
garbled reports if a test fails.
2016-06-16Generalize and extend tests of externally-supplied RSA keys.Rob Austein
Disable 3416-bit RSA key generation tests while we sort out whether simply padding the modulus out to the next 32-bit boundary is sufficient to support these with ModExpS6/ModExpA7.
2016-06-16Completely farbled most of the super() incantations, sigh.Rob Austein
2016-06-16Add timing of individual tests, test descriptions.Rob Austein
2016-06-16Tweak unit tests to be a bit less annoying on Alpha.Rob Austein
* Don't modify the wheel PIN unless specifically requested * Don't try to run the Novena RPC test server (or any server) by default. Still need to rewrite some of the RSA key tests, particularly the external key load test, to conform to known implementation constraint that key length must be a multiple of 32 bits; deferred until we switch back to hardware modexp, as this won't matter until then.
2016-06-14Clean up debugging output left in one of the unit tests.Rob Austein
2016-06-13Add test for loading an externally generated keypair via C_CreateObject().Rob Austein
2016-06-13Set return value properly in C_CreateObject().Rob Austein
2016-06-13Support for adding private keys via C_CreateObject().Rob Austein
2016-06-12A few RSA unit tests inspired by hsmbully.Rob Austein
2016-06-10Support split keypairs, where private key is a token object and publicRob Austein
key is a session object. Doesn't actually save us anything, but Jakob tells us that this makes a difference on some HSMs so we people use this kind of setup and we need to support it. Explicitly disallow private keys as session objects, since we have no way to protect them. Update unit-tests now that we return the correct error code for this case.
2016-06-10Add support for running only a specified subset of the unit tests.Rob Austein
2016-06-10Update unit tests to match new behavior: we no longer allow privateRob Austein
keys to be stored as session objects, so test that doing so fails as expected, and update other tests to specify CKA_TOKEN = True.
2016-05-25Track PIN changes on libhal master branch.Rob Austein
2016-05-19Add test case using public key via C_CreateObject() to verify signature ↵Rob Austein
created by earlier keypair.
2016-05-18Add explicit generate/sign/verify unit tests both on and off theRob Austein
token, since we just demonstrated (the hard way) that testing only one is not sufficient.
2016-05-18Refactor object creation code.Rob Austein
2016-05-17Bugfixes to new error handling code, refactor some unreadable nested logic ↵Rob Austein
in handle lookup code. The mapping between PKCS #11 objects and libhal handles isn't quite right yet. This is a snapshot of bugfixes accumulated along the way, before refactoring mapping code to deal with the underlying problem.
2016-05-17Start error handling cleanup and rewrite.Rob Austein
Error handling and hte underlying functions and macros that support it will probably change a bit more as it goes along. Trying to strike the right balance between having the main code be readable and having the underlying support code be at least comprehensible and straightforward to review. Also need to address current over-use of CKR_FUNCTION_FAILED.
2016-05-16Fix leading zero handling in Py11's BigInteger encoder.Rob Austein
2016-05-16Identical CKA_ID values no longer constitute a conflict, adjust test.Rob Austein
2016-05-15Use key hashes instead of CKA_ID to name objects in libhal keystore.Rob Austein
2016-05-15Update hsmbully recipe for libhsm RPC.Rob Austein
2016-05-15Fix broken unit test.Rob Austein
Turns out that the one remaining old PKCS #11 unit test we weren't passing was a broken test: code was correctly rejecting CKA_ID conflicts. Rewrote test, and added test setup code to use separate client and server keystores when using the ks_mmap keystore driver.
2016-05-14Key flag handling, more trailing whitespace cleanup.Rob Austein
At this point we are passing most of the unit tests in RPC loopback mode. Remaining failure is TestKeys.test_keygen_token_vs_session(), which gets HAL_ERROR_KEY_NAME_IN_USE when attempting to generate a session key and a token key with the same CKA_ID value, so clearly something is not quite right yet in the keystore selection logic.
2016-05-14Add (back) ability to construct public keys from stored attributes.Rob Austein
2016-05-14Track (trivial) libhal API change.Rob Austein
2016-05-13Sort out some disagreements between our command line parsing and unit_test's ↵Rob Austein
defaults.
2016-05-13Rework unit_test framework to use argparse and to run RPC server ↵Rob Austein
automatically if present.
2016-05-13The libhal RPC channel works better when one remembers to initialize it.Rob Austein
2016-05-12Fix RSA key length and CKA_ID lookup.Rob Austein
libhal RPC API takes RSA key lengths in bits, not bytes. Insisting on receiving matching CKA_ID in both public and private templates on key generation is probably unwise, so back down using CKA_ID from private template if provided, otherwise from the public template, and only raise incompete template error if both are missing.
2016-05-12Remove vestigial KEK code, that's all handled by libhal now.Rob Austein
2016-05-12p11util now uses libhal and doesn't need to touch SQL.Rob Austein
"p11util" is now something of a misnomer, since there's no longer anything about it that's specific to PKCS #11. Probably should become a libhal utility program, eventually.
2016-05-12First pass on converting from direct libhal calls to libhal RPC calls.Rob Austein
This version isn't really expected to work properly, but it's far enough along to be worth archiving before starting runtime testing.
2016-05-06Track API changes on sw/libhal rpc branch.Rob Austein
So far this is just dumb little things like changed names for old data types and functions. Changes to use new API features will come later.
2015-12-13whack copyrightsPaul Selkirk
2015-10-04Minimal conversion to config_core_selector libhal API. Not doingRob Austein
anything particularly clever with the new capabilities (yet).
2015-09-22Update README.md.Rob Austein
2015-09-22Makefile cleanup.Rob Austein
2015-09-22Clean up Python APIs to C_FindObject*() and C_GetSlotList().Rob Austein
2015-09-21Better test for keypair object class.Rob Austein
2015-09-21More key unit tests.Rob Austein
2015-09-21More test cases.Rob Austein