Skip to content

Commit

Permalink
The EVP_*Init_ex() functions take one extra argument. Let's default
Browse files Browse the repository at this point in the history
it to NULL.
  • Loading branch information
levitte committed Oct 17, 2001
1 parent 51008ff commit 7beb408
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions ssl/s3_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1526,9 +1526,10 @@ static int ssl3_send_client_key_exchange(SSL *s)
*/

memset(iv, 0, EVP_MAX_IV_LENGTH); /* per RFC 1510 */
EVP_EncryptInit_ex(&ciph_ctx,enc, kssl_ctx->key,iv);
EVP_EncryptInit_ex(&ciph_ctx,enc, NULL,
kssl_ctx->key,iv);
EVP_EncryptUpdate(&ciph_ctx,epms,&outl,tmp_buf,
SSL_MAX_MASTER_KEY_LENGTH);
SSL_MAX_MASTER_KEY_LENGTH);
EVP_EncryptFinal_ex(&ciph_ctx,&(epms[outl]),&padl);
outl += padl;
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
Expand Down
2 changes: 1 addition & 1 deletion ssl/s3_srvr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,7 @@ static int ssl3_get_client_key_exchange(SSL *s)

memset(iv, 0, EVP_MAX_IV_LENGTH); /* per RFC 1510 */

if (!EVP_DecryptInit_ex(&ciph_ctx,enc,kssl_ctx->key,iv))
if (!EVP_DecryptInit_ex(&ciph_ctx,enc,kssl_ctx->key,iv,NULL))
{
SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
SSL_R_DECRYPTION_FAILED);
Expand Down

0 comments on commit 7beb408

Please sign in to comment.