Skip to content

Commit

Permalink
disable iv check for rc4
Browse files Browse the repository at this point in the history
  • Loading branch information
madeye committed Sep 4, 2015
1 parent f45f7f2 commit 4daab0e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/encrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1276,11 +1276,13 @@ char * ss_decrypt(int buf_size, char *ciphertext, ssize_t *len,
ctx->counter = 0;
ctx->init = 1;

if (cache_key_exist(iv_cache, (char *)iv, iv_len)) {
free(ciphertext);
return NULL;
} else {
cache_insert(iv_cache, (char *)iv, iv_len, NULL);
if (enc_method >= RC4_MD5) {
if (cache_key_exist(iv_cache, (char *)iv, iv_len)) {
free(ciphertext);
return NULL;
} else {
cache_insert(iv_cache, (char *)iv, iv_len, NULL);
}
}
}

Expand Down

0 comments on commit 4daab0e

Please sign in to comment.