Commit Graph

39 Commits

Author SHA1 Message Date
Love Hörnquist Åstrand
18be53daa7 Support HX509_CERTS_UNPROTECT_ALL.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22465 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-01-16 14:25:24 +00:00
Love Hörnquist Åstrand
6af92427cb Add writing DER certificates.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21314 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-25 18:45:07 +00:00
Love Hörnquist Åstrand
fc504fb042 Use PEM encoding/decoding functions.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21308 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-25 18:23:51 +00:00
Love Hörnquist Åstrand
b442dada5d Use hx509_pem_write.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21306 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-25 17:24:43 +00:00
Love Hörnquist Åstrand
8e9ebe14de Fail if not finding iv.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21141 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-18 21:30:11 +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
659e1cb47e Update _hx509_collector_alloc prototype.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20776 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-01 22:02:01 +00:00
Love Hörnquist Åstrand
e993ff978b (store_func): use hx509_cert_binary
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19911 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-14 23:25:28 +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
2c45be2461 Try all formats on the binary file before giving up, this way we can
handle binary rsa keys too.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19665 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-04 02:01:41 +00:00
Love Hörnquist Åstrand
1f4452b34e (try_decrypt): pass down AlgorithmIdentifier that key uses to do sigatures
so there is no need to hardcode RSA into this function.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19299 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-09 12:13:21 +00:00
Love Hörnquist Åstrand
c2633ac58b Pass filename to the parse functions and use it in the error messages
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19296 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-08 02:35:19 +00:00
Love Hörnquist Åstrand
3d552d8a43 Return less EINVAL.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18866 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-24 14:08:32 +00:00
Love Hörnquist Åstrand
ff31485ed0 Sprinkle more hx509_context so we can return propper errors.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18863 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-24 13:48:18 +00:00
Love Hörnquist Åstrand
ec923266e2 set ret, remember to free ivdata
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18499 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-17 04:00:14 +00:00
Love Hörnquist Åstrand
1a196d0776 (parse_rsa_private_key): try all password and prompter.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18404 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-11 20:28:49 +00:00
Love Hörnquist Åstrand
00b40cc9a8 (parse_rsa_private_key): free type earlier.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18263 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-06 13:16:07 +00:00
Love Hörnquist Åstrand
556a53109c (parse_rsa_private_key): free type after use
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18261 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-06 12:08:20 +00:00
Love Hörnquist Åstrand
39ca3ae4a5 Sprinkle error messages.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18052 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-07 10:58:17 +00:00
Love Hörnquist Åstrand
b00495b53b Avoid shadowing.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17575 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-13 20:37:47 +00:00
Love Hörnquist Åstrand
2f50d37991 (file_init): Avoid shadowing ret (and thus avoiding crashing).
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17532 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-11 11:22:50 +00:00
Love Hörnquist Åstrand
74a41b918b Sprinkel setting error strings.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17391 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-01 14:02:50 +00:00
Love Hörnquist Åstrand
67e0d93a8a (file_init): reset length when done with a part
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17146 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-21 21:13:49 +00:00
Love Hörnquist Åstrand
01c7345f08 Remove (commented out) debug printf
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17138 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-21 15:03:07 +00:00
Love Hörnquist Åstrand
f4e2e10360 (parse_rsa_private_key): use EVP_get_cipherbyname
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17135 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-21 15:00:10 +00:00
Love Hörnquist Åstrand
1cb767da13 (parse_rsa_private_key): make working for one password.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17134 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-21 14:35:08 +00:00
Love Hörnquist Åstrand
95b95b5581 (parse_rsa_private_key): Implement enought for testing.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17133 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-21 13:26:11 +00:00
Love Hörnquist Åstrand
5b6f397c2d Add glue code for PEM encrypted password files.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17128 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-21 12:45:53 +00:00
Love Hörnquist Åstrand
aa1e57cd27 Add support for parsing unencrypted RSA PRIVATE KEY
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17119 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-21 11:24:02 +00:00
Love Hörnquist Åstrand
54c42411cb _hx509_map_file changed prototype.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16869 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-03-31 01:49:37 +00:00
Love Hörnquist Åstrand
28ef233497 (file_init): leak less memory
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16827 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-03-27 04:26:37 +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
cfbf5acaf7 Rewrite to use collector and mapping support function.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16468 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-04 08:50:00 +00:00
Love Hörnquist Åstrand
55b6937629 (parse_certificate): avoid stomping before array
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16430 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-02 15:49:08 +00:00
Love Hörnquist Åstrand
13b7a732d1 Factor out certificate parsing code.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16424 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-02 13:01:29 +00:00
Love Hörnquist Åstrand
440f98d5f7 (parse_certificate): return errno's not 1 in case of error
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15745 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-25 21:32:34 +00:00
Love Hörnquist Åstrand
5ef7f5c4d9 (file_iter): make sure endpointer is NULL
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15741 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-25 20:27:58 +00:00
Love Hörnquist Åstrand
9a65106a30 fix id tags
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15718 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-24 20:05:40 +00:00
Love Hörnquist Åstrand
0a70228c08 Initial revision
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15716 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-24 16:59:14 +00:00