diff options
-rw-r--r-- | openssl-crypto.patch | 72 | ||||
-rw-r--r-- | openssl-socketproxy.patch | 14 |
2 files changed, 0 insertions, 86 deletions
diff --git a/openssl-crypto.patch b/openssl-crypto.patch deleted file mode 100644 index a307cf27d2b1..000000000000 --- a/openssl-crypto.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- a/src/cpp/core/system/Crypto.cpp.orig 2017-10-14 15:59:52.561983799 +0900 -+++ b/src/cpp/core/system/Crypto.cpp 2017-10-14 15:58:24.504542511 +0900 -@@ -261,27 +261,26 @@ Error aesEncrypt(const std::vector<unsig - int outlen = 0; - int bytesEncrypted = 0; - -- EVP_CIPHER_CTX ctx; -- EVP_CIPHER_CTX_init(&ctx); -- EVP_CipherInit_ex(&ctx, EVP_aes_128_cbc(), NULL, &key[0], &iv[0], kEncrypt); -+ EVP_CIPHER_CTX* ctx = EVP_CIPHER_CTX_new(); -+ EVP_CipherInit_ex(ctx, EVP_aes_128_cbc(), NULL, &key[0], &iv[0], kEncrypt); - - // perform the encryption -- if(!EVP_CipherUpdate(&ctx, &(pEncrypted->operator[](0)), &outlen, &data[0], data.size())) -+ if(!EVP_CipherUpdate(ctx, &(pEncrypted->operator[](0)), &outlen, &data[0], data.size())) - { -- EVP_CIPHER_CTX_cleanup(&ctx); -+ EVP_CIPHER_CTX_free(ctx); - return lastCryptoError(ERROR_LOCATION); - } - bytesEncrypted += outlen; - - // perform final flush including left-over padding -- if(!EVP_CipherFinal_ex(&ctx, &(pEncrypted->operator[](outlen)), &outlen)) -+ if(!EVP_CipherFinal_ex(ctx, &(pEncrypted->operator[](outlen)), &outlen)) - { -- EVP_CIPHER_CTX_cleanup(&ctx); -+ EVP_CIPHER_CTX_free(ctx); - return lastCryptoError(ERROR_LOCATION); - } - bytesEncrypted += outlen; - -- EVP_CIPHER_CTX_cleanup(&ctx); -+ EVP_CIPHER_CTX_free(ctx); - - // resize the container to the amount of actual bytes encrypted (including padding) - pEncrypted->resize(bytesEncrypted); -@@ -298,27 +297,26 @@ Error aesDecrypt(const std::vector<unsig - int outlen = 0; - int bytesDecrypted = 0; - -- EVP_CIPHER_CTX ctx; -- EVP_CIPHER_CTX_init(&ctx); -- EVP_CipherInit_ex(&ctx, EVP_aes_128_cbc(), NULL, &key[0], &iv[0], kDecrypt); -+ EVP_CIPHER_CTX* ctx = EVP_CIPHER_CTX_new(); -+ EVP_CipherInit_ex(ctx, EVP_aes_128_cbc(), NULL, &key[0], &iv[0], kDecrypt); - - // perform the decryption -- if(!EVP_CipherUpdate(&ctx, &(pDecrypted->operator[](0)), &outlen, &data[0], data.size())) -+ if(!EVP_CipherUpdate(ctx, &(pDecrypted->operator[](0)), &outlen, &data[0], data.size())) - { -- EVP_CIPHER_CTX_cleanup(&ctx); -+ EVP_CIPHER_CTX_free(ctx); - return lastCryptoError(ERROR_LOCATION); - } - bytesDecrypted += outlen; - - // perform final flush -- if(!EVP_CipherFinal_ex(&ctx, &(pDecrypted->operator[](outlen)), &outlen)) -+ if(!EVP_CipherFinal_ex(ctx, &(pDecrypted->operator[](outlen)), &outlen)) - { -- EVP_CIPHER_CTX_cleanup(&ctx); -+ EVP_CIPHER_CTX_free(ctx); - return lastCryptoError(ERROR_LOCATION); - } - bytesDecrypted += outlen; - -- EVP_CIPHER_CTX_cleanup(&ctx); -+ EVP_CIPHER_CTX_free(ctx); - - // resize the container to the amount of actual bytes decrypted (padding is removed) - pDecrypted->resize(bytesDecrypted);
\ No newline at end of file diff --git a/openssl-socketproxy.patch b/openssl-socketproxy.patch deleted file mode 100644 index 9d521eda2e27..000000000000 --- a/openssl-socketproxy.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/cpp/core/http/SocketProxy.cpp.orig 2017-04-28 09:07:11.342017929 +0800 -+++ b/src/cpp/core/http/SocketProxy.cpp 2017-04-28 09:12:35.662573281 +0800 -@@ -148,8 +148,9 @@ - #ifndef _WIN32 - bool isSslShutdownError(const core::Error& error) - { -- return error.code().category() == boost::asio::error::get_ssl_category() && -- error.code().value() == ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ); -+ //return error.code().category() == boost::asio::error::get_ssl_category() && -+ // error.code().value() == ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ); -+ return error.code() == boost::asio::ssl::error::stream_truncated; - } - #else - bool isSslShutdownError(const core::Error& error) |