Love Hörnquist Åstrand
08e19e862a
(krb5_generate_random_block): try to avoid the dead-lock in by not
...
holding the lock while running RAND_file_name. From Hai Zaar.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22193 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-12-07 02:16:01 +00:00
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
03ad70ea52
(krb5_enctype_to_string): make sure string is NULL on failure.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21947 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-10-04 07:55:54 +00:00
Love Hörnquist Åstrand
777869d68e
Check return values from alloc functions. Prompted by patch of Charles Longeau.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21737 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-31 15:49:35 +00:00
Love Hörnquist Åstrand
5bb7b3bc79
(decrypt_internal_derived): make sure length is longer then confounder
...
+ checksum.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21130 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-18 20:45:21 +00:00
Love Hörnquist Åstrand
bf02504f31
Require the raw key have the correct size and do away with the
...
minsize. Minsize was a thing that originated from RC2, but since RC2
is done in the x509/cms subsystem now there is no need to keep that
around.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20981 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-07 20:05:50 +00:00
Love Hörnquist Åstrand
5e5c20fe90
(krb5_crypto_overhead): return static overhead of encryption.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20683 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-05-16 18:28:27 +00:00
Love Hörnquist Åstrand
169143c4ff
Always use the RAND_ interface now that hcrypto provides it.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20062 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-30 18:02:21 +00:00
Love Hörnquist Åstrand
57d6ff40d8
Add Kerberos RFC 3961 PRF functions.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20041 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-23 20:37:12 +00:00
Love Hörnquist Åstrand
adca139b8a
macro kcrypto_oid_enc now longer used
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19833 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-11 08:43:13 +00:00
Love Hörnquist Åstrand
4e200bc2d5
Add krb5_enctype_keybits.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19063 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-17 21:58:47 +00:00
Love Hörnquist Åstrand
d2388f8176
Allocate the memory we later use.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18811 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-22 07:32:40 +00:00
Love Hörnquist Åstrand
ac32e3d909
(AES_string_to_key): Try to not leak memory.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18804 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-22 06:50:02 +00:00
Love Hörnquist Åstrand
a3781da599
Remove workaround from when there wasn't always aes.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18456 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-14 09:59:49 +00:00
Love Hörnquist Åstrand
8b1cb25ffc
Prefix der primitives with der_.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18455 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-14 09:53:19 +00:00
Love Hörnquist Åstrand
5a4d04ed30
remove aes-192
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17866 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-07-20 21:37:17 +00:00
Love Hörnquist Åstrand
0cc87e8758
Remove more CMS bits.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17865 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-07-20 21:37:16 +00:00
Love Hörnquist Åstrand
fdcc12bca6
Remove CMS symmetric encryption support.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17859 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-07-20 10:57:44 +00:00
Love Hörnquist Åstrand
464d720b1c
Catches both keyed checkout w/o crypto context cases and doesn't reset
...
the string, and corrects the grammar.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17514 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-08 13:47:24 +00:00
Love Hörnquist Åstrand
a6dbbc8629
Drop aes-cbc, rc2 and CMS padding support, its all containted in
...
libhcrypto and libhx509 now.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17513 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-08 13:45:28 +00:00
Love Hörnquist Åstrand
c5a313c313
(create_checksum): provide a error message that a key checksum needs a key.
...
From Andew Bartlett.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17504 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-07 12:20:30 +00:00
Love Hörnquist Åstrand
348b5d79c4
Rename u_intXX_t to uintXX_t
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17442 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-05 09:31:15 +00:00
Love Hörnquist Åstrand
2a7b485275
(krb5_string_to_key_derived): deref after NULL check.
...
Coverity NetBSD CID#2367
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17034 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-10 08:58:53 +00:00
Love Hörnquist Åstrand
203072d917
(decrypt_*): handle the case where the plaintext is 0 bytes long,
...
realloc might then return NULL.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16787 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-03-07 19:34:55 +00:00
Love Hörnquist Åstrand
d86be025ae
(AES_string_to_key): drop _krb5_PKCS5_PBKDF2 and use PKCS5_PBKDF2_HMAC_SHA1
...
instead.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16781 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-02-28 14:52:57 +00:00
Love Hörnquist Åstrand
5cebb7986f
(krb5_generate_random_block): check return value from RAND_bytes
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16748 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-02-16 10:10:59 +00:00
Love Hörnquist Åstrand
eb0369c938
(krb5_derive_key): Free more of the allocated memory, this function is
...
only used by the test program.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16343 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-12-02 14:47:44 +00:00
Love Hörnquist Åstrand
ce7c2af147
(krb5_DES_string_to_key): If the opaque length it set to 1, and
...
content is 0x01, use the afs3 string-to-key.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16078 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-09-19 22:13:54 +00:00
Love Hörnquist Åstrand
a15603afa7
(_krb5_pk_octetstring2key): make sha1 output unsigned char to match openssl
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15681 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-20 07:22:43 +00:00
Love Hörnquist Åstrand
cba53a17f2
(_krb5_pk_octetstring2key): fix arguments
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15628 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-12 22:29:52 +00:00
Love Hörnquist Åstrand
a70cf1c3a6
(_krb5_pk_octetstring2key): string2key function used in pk-init-25
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15622 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-12 13:34:47 +00:00
Love Hörnquist Åstrand
3283e2cb08
make input data to krb5_encrypt{,_ivec} const
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15604 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-09 12:33:36 +00:00
Love Hörnquist Åstrand
1f25cc530f
(wrapped_length): the underived encrypted types checksum are all
...
unkeyed (matches the code in encrypt_internal() and
encrypt_internal_special())
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15598 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-09 01:35:31 +00:00
Love Hörnquist Åstrand
1dcdb9c1a0
optionally compile in support for string2key
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15527 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-29 22:20:33 +00:00
Love Hörnquist Åstrand
85588d6046
(krb5_string_to_key): unconst password
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15479 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-17 05:03:45 +00:00
Love Hörnquist Åstrand
d83bcde1e8
rename `encrypt' to avoid shadow warning
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15462 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-16 22:54:33 +00:00
Love Hörnquist Åstrand
9b38bf74d1
Don't declare des_salt &c as static with incomplete type (invalid in
...
c89, at least).
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15053 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-02 14:11:59 +00:00
Love Hörnquist Åstrand
f8c1fbfbe4
unexport the oid_to_enctype function, not for external consumers
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14921 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-24 14:14:17 +00:00
Love Hörnquist Åstrand
e502ee6379
AES is enabled by default, remove ifdefs
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14654 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-03-17 00:42:05 +00:00
Love Hörnquist Åstrand
00c5d0af9f
more static and unsigned issues
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14639 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-03-15 19:11:25 +00:00
Love Hörnquist Åstrand
256ec57f94
fix signedness issues, prompted by report of Magnus Ahltorp
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14638 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-03-15 14:49:04 +00:00
Love Hörnquist Åstrand
6084387c52
(DES_string_to_key_int): must check for weak keys after doing the
...
DES_cbc_cksum
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14592 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-02-23 18:41:40 +00:00
Love Hörnquist Åstrand
4651d05136
(krb5_random_to_key): cast size_t to int to make %d work
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14571 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-02-09 09:55:44 +00:00
Love Hörnquist Åstrand
5dc0e19c59
drop krb5_{checksum,enctype}_isdisabled
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14489 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-01-08 21:06:04 +00:00
Love Hörnquist Åstrand
bc190e1f9c
make lots of crypto related variables static
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14417 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-12-29 01:49:45 +00:00
Love Hörnquist Åstrand
6c3270b0eb
add enctype_des3_cbc_none_cms
...
add cms padding for rc2
don't to padding for blocksize 1
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14301 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-10-12 21:23:48 +00:00
Love Hörnquist Åstrand
d6cb6af31e
support padding as its done in CMS
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14283 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-10-03 17:19:53 +00:00
Love Hörnquist Åstrand
6af75bb33b
(seed_something): avoid poking at memory that is uninitialized, make
...
valgrind unhappy. Pointd out by abartlet@samba.org . While where, plug
the fd leak.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14193 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-09-06 06:45:12 +00:00
Love Hörnquist Åstrand
91351971f7
add KRB5_LIB_FUNCTION to all exported functions
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13863 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-05-25 21:46:46 +00:00
Love Hörnquist Åstrand
15ac7dcf54
add set_param for RC2
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13818 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-26 22:03:02 +00:00