Skip to content

Commit

Permalink
refresh patch
Browse files Browse the repository at this point in the history
  • Loading branch information
zxlhhyccc committed Nov 15, 2024
1 parent f11eea9 commit 18bf50d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions shadowsocks-libev/patches/101-fix-mbedtls3.6-build.patch
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Signed-off-by: Zxl hhyccc <[email protected]>
#ifndef MBEDTLS_CAMELLIA_C
--- a/src/aead.c
+++ b/src/aead.c
@@ -178,9 +178,14 @@ aead_cipher_encrypt(cipher_ctx_t *cipher_ctx,
@@ -178,9 +178,14 @@ aead_cipher_encrypt(cipher_ctx_t *cipher
case AES192GCM:
case AES128GCM:

Expand All @@ -91,7 +91,7 @@ Signed-off-by: Zxl hhyccc <[email protected]>
break;
case CHACHA20POLY1305IETF:
err = crypto_aead_chacha20poly1305_ietf_encrypt(c, &long_clen, m, mlen,
@@ -226,8 +231,13 @@ aead_cipher_decrypt(cipher_ctx_t *cipher_ctx,
@@ -226,8 +231,13 @@ aead_cipher_decrypt(cipher_ctx_t *cipher
// Otherwise, just use the mbedTLS one with crappy AES-NI.
case AES192GCM:
case AES128GCM:
Expand All @@ -105,7 +105,7 @@ Signed-off-by: Zxl hhyccc <[email protected]>
break;
case CHACHA20POLY1305IETF:
err = crypto_aead_chacha20poly1305_ietf_decrypt(p, &long_plen, NULL, m, mlen,
@@ -724,9 +734,26 @@ aead_key_init(int method, const char *pass, const char *key)
@@ -724,9 +734,26 @@ aead_key_init(int method, const char *pa
if (method >= CHACHA20POLY1305IETF) {
cipher_kt_t *cipher_info = (cipher_kt_t *)ss_malloc(sizeof(cipher_kt_t));
cipher->info = cipher_info;
Expand Down Expand Up @@ -134,7 +134,7 @@ Signed-off-by: Zxl hhyccc <[email protected]>
}
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -103,7 +103,7 @@ crypto_md5(const unsigned char *d, size_t n, unsigned char *md)
@@ -103,7 +103,7 @@ crypto_md5(const unsigned char *d, size_
if (md == NULL) {
md = m;
}
Expand All @@ -145,7 +145,7 @@ Signed-off-by: Zxl hhyccc <[email protected]>
#else
--- a/src/stream.c
+++ b/src/stream.c
@@ -174,7 +174,11 @@ cipher_nonce_size(const cipher_t *cipher)
@@ -174,7 +174,11 @@ cipher_nonce_size(const cipher_t *cipher
if (cipher == NULL) {
return 0;
}
Expand All @@ -169,7 +169,7 @@ Signed-off-by: Zxl hhyccc <[email protected]>
}

const cipher_kt_t *
@@ -645,9 +653,26 @@ stream_key_init(int method, const char *pass, const char *key)
@@ -645,9 +653,26 @@ stream_key_init(int method, const char *
if (method == SALSA20 || method == CHACHA20 || method == CHACHA20IETF) {
cipher_kt_t *cipher_info = (cipher_kt_t *)ss_malloc(sizeof(cipher_kt_t));
cipher->info = cipher_info;
Expand All @@ -196,5 +196,3 @@ Signed-off-by: Zxl hhyccc <[email protected]>
} else {
cipher->info = (cipher_kt_t *)stream_get_cipher_type(method);
}
--
2.17.1

0 comments on commit 18bf50d

Please sign in to comment.