bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
c5e46dba179864f6f1adf196d46e7a0371b11914 |
|
12-Dec-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: drop unnecessary parens in &(foo)
This makes the code more consistent since most of the repo uses the
no-parens style. These inconsistencies were found using
`git grep '(&([^*]'` and any use of the parens in macros was ignored for
safety reasons. |
c147bff818798a979d93537f72f5c1f68f5d5ba8 |
|
24-Nov-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
global: Use t_buffer_create
sed -i -e 's/buffer_create_dynamic(pool_datastack_create(), */t_buffer_create(/g' |
3dffcebc7d1758a2d3db0ae1a8563b7e84c6e5bc |
|
15-Mar-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-dcrypt: Add asserts
Fixes several static analysis reports |
061801f2b390700a18cbefa468a7bab003f4cc8d |
|
25-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks |
e47cfc3022ce0cf6e158bb39b83e3a57e7d3130e |
|
25-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-dcrypt: Move most of the OpenSSL #if handling to macros
This avoids #if calls being littered all over the file.
This change can cause HMAC_CTX_free(NULL) to be called, but that seems to
work fine without crashing. |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
efe78d3ba24fc866af1c79b9223dc0809ba26cad |
|
24-Dec-2016 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
global: Replaced all instances of memset(p, 0, sizeof(*p)) with the new i_zero() macro.
Used the following script:
C_FILES=`git ls-files *.c`
H_FILES=`git ls-files *.h`
for F in "$C_FILES $H_FILES"; do
echo "$F"
perl -p -i -e 's/safe_memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero_safe(&$1)/g' $F
perl -p -i -e 's/safe_memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero_safe($1)/g' $F
perl -p -i -e 's/memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero(&$1)/g' $F
perl -p -i -e 's/memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero($1)/g' $F
done |
707460082809119f71d1ecffc29af83f2e12eac0 |
|
24-Dec-2016 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
global: Made all struct initialization using memset() use the same style. |
a81d5c3f5a4ad5d100b258d10d4c75f4a02ab1f6 |
|
28-Nov-2016 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
global: Added missing copyright notices. |
58ba06268d710a19118963d4de2665ea1100653a |
|
14-Oct-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-dcrypt: Fix uninitialized memory |
c42c9ff351eadcc0bcfb73cb272b112198bbf756 |
|
14-Oct-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-dcrypt: enc_key and pw must be NULL on storing unencrypted private key
Add tests for password and key encryption, and get_info on them. Also
give examples of valid cipher values for password and key encryption in
dcrypt.h comment. |
3177b410680f3915549719f84a4acbffd4f9c561 |
|
13-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
Removed dead code to make static analyzer happier. |
36c6e4995b3cdc39d263ae7e4bd6b787ab1fa7f5 |
|
14-Aug-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
dcrypt: Retrieve key length correctly |
c281d6630970d51a0e017366be9d86a061303d4b |
|
10-Aug-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
openssl: Fix v1.1 compability |
23386f0e8cd902b1c53cdb68412de35f8c3a6639 |
|
04-Aug-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-dcrypt: error message on missing decrypt key or password
Return a sensible error message when loading an encrypted private key is
attempted but the decrypt key or password is missing. |
fadd4c92940c10a01556e1ebcb2f17890b35d7bc |
|
04-Aug-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-dcrypt: drop format from key_load_public |
401160c5ca4c3c8f122f437d00f5e4498243d7bf |
|
04-Aug-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-dcrypt: drop format from key_load_private |
e18373bc5805ba2b8a551b723ad148cd84185b4f |
|
04-Aug-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-dcrypt: get_info in openssl_load_private_key
Use dcrypt_openssl_key_string_get_info to determine the key format
instead of taking it as a parameter. |
2931ea8e17ec883df28789215c7139746e55413d |
|
04-Aug-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-dcrypt: get_info in openssl_load_public_key
Use dcrypt_openssl_key_string_get_info to determine the key format
instead of taking it as a parameter. |
0be99975517967a2a074bf55de39aae65fe893c6 |
|
04-Aug-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-dcrypt: change v2 key field separator to ':' |
b617e6cf3611237966a8dca960f15cee50bf1aa3 |
|
04-Aug-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-dcrypt: Do not unref key twice |
a53b81d08bf21d802705f6ff2df70cdf0e39e61d |
|
04-Aug-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
dcrypt: Use refcounting on keys |
58562739e57d14eeced3bc5923d7f907b6df4ab2 |
|
04-Jul-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-dcrypt: tell in error_r that RSA key has to be converted to pkey |
fba8aa9864290ef74486cb2333220180f6bd1de9 |
|
29-Jun-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-dcrypt: correctly set version 2 on key info
Dovecot format version 2 keys were incorrectly reported as version 1
before. |
f92d3b2e68e1f6eb2dc2a505cf7603a9d2ebebda |
|
27-Jun-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
dcrypt-openssl: Various fixes
Fix v1 and v2 key handling and some allocation issues. |
b9240a9115fc91f95e49565600e6b4d6fc55c2ea |
|
21-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-dcrypt: Added missing error handling.
Most of these are probably unnecessary now that malloc() no longer fails.
Also some of the NULL checks may not be needed since OpenSSL functions
(usually?) return failure on NULL parameters, but sometimes they perform
a different operation. So overall, probably safer to include these checks. |
0eaf77d8c22c542d5bd474bf1460d811876629d7 |
|
21-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-dcrypt: Don't ignore BIO errors.
Might happen due to out of memory? |
394391e78f26cba1d7fca19d4b8617453a7041b8 |
|
21-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-dcrypt: dcrypt_key_type_public/private() can no longer fail.
Removed unnecessary failure handling. |
955c276b9de538cfbfe4cff19f2a610f57e8d5c7 |
|
21-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-dcrypt: dcrypt_key_convert_private_to_public() can no longer fail.
Removed unnecessary failure handling. |
f85f12e3f9a4da8ce5e282530ce377410eabfb46 |
|
21-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-dcrypt: Assert-crash if key parameter is NULL.
If it happens, it's a bug. |
4b14487036d9dfd953192f0d13a054c92c587eed |
|
21-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-dcrypt: Assert-crash if impossible private/public keys are seen. |
a62dad9ec88bb112079dd95be456d258c6c86369 |
|
20-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-dcrypt: Allow specifying crypto_device (OpenSSL engine). |
285bfe946c2d54928b272270dd5eef9041b24271 |
|
20-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-dcrypt, lib-ssl-iostream: Share OpenSSL init/deinit code. |
5029a194650741d31f3f4e4c862e742b55012807 |
|
13-Jun-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
dcrypt-openssl: Pass pointer safely |
7e1a69e513739a7c12e3c5ec53dff1eb01b90524 |
|
12-Jun-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-dcrypt: Fix various problems |
23bdbb7b1831785c6ba6df190f6369da882d2b9d |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Require comparisons to be strict boolean expressions
* No implicit integer -> boolean or pointer -> boolean conversions
* !expr can be used only if expr is boolean type
These were checked with a patched clang. It found various actual bugs,
which were fixed by the previous commits. |
d9a7e950a9cd21f2b4a90ec7759fca9e8fcc7995 |
|
05-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Fixed mismatched bool vs. int/pointer handling
I don't think these fix any actual bugs. |
759edc211f67e3bb1a6c0600014e3ac6b58561ca |
|
05-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-dcrypt: Fixed error handling in dcrypt_key_id_public() |
a21d4eb322ea0c8d6acacbe7f015c5bb74b4c217 |
|
05-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-dcrypt: Fixed function return type. |
4372103cb640db9f1584b0db487339101863f5d9 |
|
31-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-dcrypt: Fixed dcrypt_openssl_generate_keypair() |
99e5f462c768115777775655f7c7f420d1371901 |
|
30-May-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-dcrypt: Fix strict type-punning warning |
47d4ae26cdacbdea94434ef46e09617013869f68 |
|
30-May-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-dcrypt: Fix various OpenSSL API usage issues |
1ada45cd38aa503efa088a90ee240356f1ea7d3b |
|
30-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-dcrypt: Always allow error_r to be NULL.
Especially dcrypt_openssl_private_to_public_key() was called with
error_r=NULL by the dcrypt.c itself. |
8d5a200b82ee4f7fe7643c704f37fdf23f813923 |
|
30-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-dcrypt: Compiler warning fixes |
316cbe323513a0f20d1cf519fe9405e231d633e2 |
|
30-May-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-dcrypt: Initial implementation |