Nicolas Williams
e515745996
hx509: private key exclusion options
...
Add two ways to exclude private keys when dealing with an hx509
certificate store. One as a load option (load no private keys, never
add private keys), one as a store option (store no private keys).
This is useful for CA code so it can have a single store with the
issuer's credentials _and_ the chain for it, and copy those to a store
with the issued certificate and _not_ accidentally include the issuer's
private key.
It would be much safer still to flip the default for this flag, but that
could break out-of-tree libhx509 dependents.
2019-12-09 18:10:10 -06:00
Nicolas Williams
41fcafd20c
hx509: add hx509_certs_destroy()
2019-10-03 13:09:18 -05:00
Nicolas Williams
63116100a8
hx509: do not crash on missing FILE: name
2019-10-03 13:09:18 -05:00
Jeffrey Altman
387684aa93
WIN32: fix calling conventions for 32-bit builds
...
On 32-bit Windows Intel builds the __cdecl and __stdcall calling
conventions are different so labeling the functions that are
exported or assigned to function pointers matters.
Change-Id: I03b6f34baeb9ffb2e683fd979f12f27a5078a4da
2019-01-14 06:12:36 -05:00
Jeffrey Altman
1dd38cc3de
lib/hx509: declare and apply HX509_LIB_xxx macros
...
libhx509 is not built according to the same export and calling conventions
on Windows as the other libraries. This change declares and applies
HX509_LIB_FUNCTION, HX509_LIB_NORETURN_FUNCTION, HX509_LIB_CALL and
HX509_LIB_VARIABLE to lib/hx509.
As a result of this change the calling convention for exported functions
will be __stdcall instead of __cdecl.
Change-Id: Ibc3f05e8088030ef7d13798f1d9c9b190bc57797
2019-01-02 10:23:39 -06:00
Love Hornquist Astrand
029de6cfa4
pass back an heim_error from hx509_cert_init
2012-10-07 06:33:13 -07:00
Roland C. Dowdeswell
cc47c8fa7b
Turn on -Wextra -Wno-sign-compare -Wno-unused-paramter and fix issues.
...
We turn on a few extra warnings and fix the fallout that occurs
when building with --enable-developer. Note that we get different
warnings on different machines and so this will be a work in
progress. So far, we have built on NetBSD/amd64 5.99.64 (which
uses gcc 4.5.3) and Ubuntu 10.04.3 LTS (which uses gcc 4.4.3).
Notably, we fixed
1. a lot of missing structure initialisers,
2. unchecked return values for functions that glibc
marks as __attribute__((warn-unused-result)),
3. made minor modifications to slc and asn1_compile
which can generate code which generates warnings,
and
4. a few stragglers here and there.
We turned off the extended warnings for many programs in appl/ as
they are nearing the end of their useful lifetime, e.g. rsh, rcp,
popper, ftp and telnet.
Interestingly, glibc's strncmp() macro needed to be worked around
whereas the function calls did not.
We have not yet tried this on 32 bit platforms, so there will be
a few more warnings when we do.
2012-02-20 19:45:41 +00:00
Love Hornquist Astrand
0879b9831a
remove trailing whitespace
2011-05-21 11:57:31 -07:00
Love Hornquist Astrand
f5f9014c90
Warning fixes from Christos Zoulas
...
- shadowed variables
- signed/unsigned confusion
- const lossage
- incomplete structure initializations
- unused code
2011-04-29 20:25:05 -07:00
Love Hornquist Astrand
48ad3e1e65
add import/export type for private keys
2010-10-03 16:32:01 -07:00
Love Hornquist Astrand
f2178f07d5
use hx509_certs_iter_f
2009-11-22 13:53:03 -08:00
Love Hörnquist Åstrand
001e058f91
Use OID variable instead of function.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25245 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-28 01:19:34 +00:00
Love Hörnquist Åstrand
f290cd306e
Use OID variable instead of function.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25237 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-28 01:18:13 +00:00
Love Hörnquist Åstrand
ff5dab4f4a
remove rcsid
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24795 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-22 23:28:18 +00:00
Love Hörnquist Åstrand
6937d41a02
remove trailing whitespace
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:21:03 +00:00
Love Hörnquist Åstrand
e172367898
switch to utf8 encoding of all files
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:53:55 +00:00
Love Hörnquist Åstrand
b1f885befe
use rk_undumpdata, spelling
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23413 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-07-26 18:34:53 +00:00
Love Hörnquist Åstrand
7eb3ad157f
pass in time_now to unevelope
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23269 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-06-23 03:23:57 +00:00
Love Hörnquist Åstrand
552ac7f547
free memory on failure, don't operate on NULL.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21146 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-18 21:37:25 +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
340dff70cb
(store_func): free whole CertBag, not just the data part.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20909 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-05 03:09:13 +00:00
Love Hörnquist Åstrand
3782c5cc9e
Update _hx509_collector_alloc prototype.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20775 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-01 22:01:33 +00:00
Love Hörnquist Åstrand
c9b307394a
plug memory leak
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20771 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-01 11:39:18 +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
1186389444
set more error strings
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18877 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-24 19:58:16 +00:00
Love Hörnquist Åstrand
e04a318438
add context variable to _hx509_collector_private_key_add
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18859 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-24 13:13:34 +00:00
Love Hörnquist Åstrand
5a4e14b9da
remove stray ;
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18594 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-19 11:26:39 +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
96204e40a8
prefix der primitives with der_
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18453 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-14 09:42:43 +00:00
Love Hörnquist Åstrand
b226d0acf5
Adapt to new signature of hx509_cms_unenvelope.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18065 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-11 06:38:36 +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
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
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
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
1348930496
Use the new hx509_collector support functions.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16445 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-03 16:28:43 +00:00
Love Hörnquist Åstrand
b34cfe9fe8
less printf and memory leaks
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16442 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-03 09:52:56 +00:00
Love Hörnquist Åstrand
02d27ea231
Use _hx509_abort.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16436 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-03 08:26:26 +00:00
Love Hörnquist Åstrand
50f29f80b1
_hx509_pbe_decrypt now takes a hx509_lock.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16028 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-09-04 15:16:46 +00:00
Love Hörnquist Åstrand
e40eecfbf1
Cast size_t to unsigned long when print.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16014 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-09-03 19:54:26 +00:00
Love Hörnquist Åstrand
cbf73d7f8f
slightly less verboese
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15793 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-27 19:20:47 +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