"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lib-dcrypt/ostream-encrypt.c" between
dovecot-2.3.7.2.tar.gz and dovecot-2.3.8.tar.gz

About: Dovecot is an IMAP and POP3 server, written with security primarily in mind.

ostream-encrypt.c  (dovecot-2.3.7.2):ostream-encrypt.c  (dovecot-2.3.8)
skipping to change at line 280 skipping to change at line 280
buffer_t *encrypted_key, *ephemeral_key, *temp_key; buffer_t *encrypted_key, *ephemeral_key, *temp_key;
ephemeral_key = t_buffer_create(256); ephemeral_key = t_buffer_create(256);
encrypted_key = t_buffer_create(256); encrypted_key = t_buffer_create(256);
temp_key = t_buffer_create(48); temp_key = t_buffer_create(48);
ktype = dcrypt_key_type_public(pubkey); ktype = dcrypt_key_type_public(pubkey);
if (ktype == DCRYPT_KEY_RSA) { if (ktype == DCRYPT_KEY_RSA) {
/* encrypt key as R (as we don't need DH with RSA)*/ /* encrypt key as R (as we don't need DH with RSA)*/
if (!dcrypt_rsa_encrypt(pubkey, key, key_len, if (!dcrypt_rsa_encrypt(pubkey, key, key_len, encrypted_key,
encrypted_key, &error)) { DCRYPT_PADDING_RSA_PKCS1_OAEP,
&error)) {
io_stream_set_error(&stream->ostream.iostream, io_stream_set_error(&stream->ostream.iostream,
"Cannot encrypt key data: %s", "Cannot encrypt key data: %s",
error); error);
return -1; return -1;
} }
} else if (ktype == DCRYPT_KEY_EC) { } else if (ktype == DCRYPT_KEY_EC) {
/* R = our ephemeral public key */ /* R = our ephemeral public key */
buffer_t *secret = t_buffer_create(256); buffer_t *secret = t_buffer_create(256);
/* derive ephemeral key and shared secret */ /* derive ephemeral key and shared secret */
 End of changes. 1 change blocks. 
2 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)