Commit Graph

53 Commits

Author SHA1 Message Date
Love Hörnquist Åstrand
5fed824f37 its vs it\'s etc. From Bjorn Sandell
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22071 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-11-14 20:04:50 +00:00
Love Hörnquist Åstrand
1b2bb27066 Add sha2 types.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21387 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-28 08:53:45 +00:00
Love Hörnquist Åstrand
f622a16e97 Add hx509_cert_init_data and use everywhere
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21085 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-13 06:39:53 +00:00
Love Hörnquist Åstrand
0800216d7b Prefix rsa method with p11_
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20920 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-05 05:47:06 +00:00
Love Hörnquist Åstrand
afbe259df2 Update _hx509_collector_alloc prototype.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20774 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-01 22:00:08 +00:00
Love Hörnquist Åstrand
7971b73f40 add more mechtypes
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20672 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-05-13 06:57:21 +00:00
Love Hörnquist Åstrand
401751b73d Add some more hashes.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20641 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-05-10 17:59:25 +00:00
Love Hörnquist Åstrand
82a45c7036 constify
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19839 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-11 09:55:09 +00:00
Love Hörnquist Åstrand
a905f0338c (collect_private_key): Missing CKA_MODULUS is ok too (XXX why should
these be fetched given they are not used).


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19790 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-09 19:43:35 +00:00
Love Hörnquist Åstrand
80977a02f6 Factor out private key operation out of the signing, operations, support import, export, and generation of private keys. Add support for writing PEM and PKCS12 files with private keys in them.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19778 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-09 10:52:13 +00:00
Love Hörnquist Åstrand
3928ceb728 Headerfile <pkcs11.h> is now freestanding, remove pkcs11u.h.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19721 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-05 15:32:05 +00:00
Love Hörnquist Åstrand
59238c7f99 Remember to p11_put_session in the failure cases too.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19305 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-11 18:42:42 +00:00
Love Hörnquist Åstrand
fa270376d8 Pass in hx509_signature_rsa to key collector
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19300 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-09 12:18:09 +00:00
Love Hörnquist Åstrand
77e4ca555d Return less EINVAL.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18876 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-24 19:57:16 +00:00
Love Hörnquist Åstrand
7f316a5b1e Sprinkle more hx509_context so we can return propper errors.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18860 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-24 13:21:17 +00:00
Love Hörnquist Åstrand
f8bf18b7cc (p11_list_keys): make element of search_data[0] constants and set them later
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18591 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-19 11:02:01 +00:00
Love Hörnquist Åstrand
ead04d2e0e Remember to release certs.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18472 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-16 09:50:49 +00:00
Love Hörnquist Åstrand
42ed1a9b6e (p11_release_module): j needs to be used as inter loop index. From
Douglas Engert.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18406 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-11 21:14:14 +00:00
Love Hörnquist Åstrand
e22334b717 Return HX509_PKCS11_NO_SLOT when there are no slots and
HX509_PKCS11_NO_TOKEN when there are no token. For use in PAM modules
that want to detect when to use smartcard login and when not
to. Patched based on code from Douglas Engert.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18348 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-08 13:40:46 +00:00
Love Hörnquist Åstrand
dce4b55512 Fix double free's, NULL ptr de-reference, and conform better to pkcs11.
From Douglas Engert.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18187 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-01 18:05:05 +00:00
Love Hörnquist Åstrand
dd04abbea7 cast void * to char * when using it for %s formating in printf.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18059 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-08 09:54:01 +00:00
Love Hörnquist Åstrand
2fc4f25c93 Don't build most of the pkcs11 module if there are no dlopen().
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18046 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-07 09:07:15 +00:00
Love Hörnquist Åstrand
36d0c4e85a (p11_list_keys): fetch CKA_LABEL and use it to set the friendlyname
for the certificate.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18033 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-06 09:26:43 +00:00
Love Hörnquist Åstrand
cf9a110826 keep one session around for the whole life of the keyset
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18024 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-05 20:51:30 +00:00
Love Hörnquist Åstrand
470639dcbb (p11_get_session): return better error messages
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18016 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-05 17:35:38 +00:00
Love Hörnquist Åstrand
776d5a6b2a Even more pretty printing.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17983 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-04 09:29:24 +00:00
Love Hörnquist Åstrand
c2661ea901 add more mechflags
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17981 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-04 09:25:49 +00:00
Love Hörnquist Åstrand
dd02f9c6a5 (p11_printinfo): print proper plural s
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17975 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-04 08:30:08 +00:00
Love Hörnquist Åstrand
efd8f3e585 (p11_printinfo): print mechs in diffrent order
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17974 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-04 08:26:37 +00:00
Love Hörnquist Åstrand
a16e48e582 save the mechs supported when initing the token, print them in printinfo.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17972 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-04 08:23:40 +00:00
Love Hörnquist Åstrand
a99e6303d5 Iterate over all slots, not just the first/selected one.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17591 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-29 09:24:47 +00:00
Love Hörnquist Åstrand
4abe3b3bce Add reference counting on certifiates, push out CK_SESSION_HANDLE from slot.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17588 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-27 10:58:07 +00:00
Love Hörnquist Åstrand
ef9ea4272e Sprinkle some hx509_set_error_strings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17584 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-22 16:14:07 +00:00
Love Hörnquist Åstrand
f86b0321a6 Hidden field of prompter is removed.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17553 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-12 10:14:50 +00:00
Love Hörnquist Åstrand
0da37e5388 Make compile.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17528 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-11 07:11:51 +00:00
Love Hörnquist Åstrand
c0f2bd14d6 Catch more errors.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17527 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-11 07:05:39 +00:00
Love Hörnquist Åstrand
aaeb02de1b Use the prompter from the lock function.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17417 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-03 16:40:09 +00:00
Love Hörnquist Åstrand
8f6bef250c _hx509_set_cert_attribute changed signature
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17403 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-01 15:27:18 +00:00
Love Hörnquist Åstrand
19256d0fbd Add support for parsing slot-number.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17150 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-21 21:58:09 +00:00
Love Hörnquist Åstrand
163c6cb7b5 delete crypto_headers.h, use global file instead
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16560 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-13 14:02:49 +00:00
Love Hörnquist Åstrand
e3f2a6b60a (p11_rsa_public_decrypt): since is wrong, don't provide it. PKCS11
can't do public_decrypt, it support verify though. All this doesn't
matter, since the code never go though this path.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16516 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-11 01:56:51 +00:00
Love Hörnquist Åstrand
434d46a8fa Add code for public key decryption (not supported yet) and use
"crypto-headers.h".


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16482 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-08 21:57:09 +00:00
Love Hörnquist Åstrand
7dcf3289bb add a hx509_context where we can store configuration
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16476 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-04 20:33:31 +00:00
Love Hörnquist Åstrand
0ef14a76b5 fix syntax error.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16474 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-04 14:57:06 +00:00
Love Hörnquist Åstrand
5952012ed9 more paranoid on refcount, set refcounter ealier, reset pointers after free
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16472 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-04 14:55:50 +00:00
Love Hörnquist Åstrand
71a46fa08f (rsa_pkcs1_method): constify
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16467 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-04 08:23:11 +00:00
Love Hörnquist Åstrand
03838a117c drop extra wrapping of p11_init
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16466 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-04 06:41:58 +00:00
Love Hörnquist Åstrand
f2ebc403b0 Implement rsa_private_decrypt and add stubs for public ditto.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16461 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-04 06:31:28 +00:00
Love Hörnquist Åstrand
c5f932ca38 Less printf, less memory leaks.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16459 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-04 06:23:14 +00:00
Love Hörnquist Åstrand
24329dc0fc Implement signing using pkcs11.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16458 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-04 06:16:37 +00:00