mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-24 17:33:46 +00:00
fix #15
This commit is contained in:
+1
-1
@@ -262,6 +262,7 @@ char* ss_encrypt(int buf_size, char *plaintext, ssize_t *len, struct enc_ctx *ct
|
||||
RAND_bytes(iv, iv_len);
|
||||
EVP_CipherInit_ex(&ctx->evp, NULL, NULL, enc_key, iv, 1);
|
||||
memcpy(ciphertext, iv, iv_len);
|
||||
ctx->init = 1;
|
||||
#ifdef DEBUG
|
||||
dump("IV", iv);
|
||||
#endif
|
||||
@@ -301,7 +302,6 @@ char* ss_decrypt_all(int buf_size, char *ciphertext, ssize_t *len, int method)
|
||||
{
|
||||
if (method > TABLE)
|
||||
{
|
||||
|
||||
const EVP_CIPHER *cipher = EVP_get_cipherbyname(supported_ciphers[method]);
|
||||
if (cipher == NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user