复制并粘贴此块,然后在您的设备上选择 Enter。
**注意:**如果您的版本与 OpenSSL-1.1.1d 不同,则可能需要更改目录。您可能需要针对更新版本的 OpenSSL 修改这些命令,否则此补丁可能无法运行。
cat <<-EOF | patch -d $HOME/build/ -p0diff -ur orig/openssl-1.1.1d/apps/enc.c openssl-1.1.1d/apps/enc.c
--- orig/openssl-1.1.1d/apps/enc.c
+++ openssl-1.1.1d/apps/enc.c
@@ -533,6 +533,7 @@
*/
BIO_get_cipher_ctx(benc, &ctx);
+ EVP_CIPHER_CTX_set_flags(ctx, EVP_CIPHER_CTX_FLAG_WRAP_ALLOW);
if (!EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, enc)) {
BIO_printf(bio_err, "Error setting cipher %s\n",
EOF
您会收到类似以下内容的输出,确认补丁成功:
[root@ip-172-31-20-119 ~]# cat <<-EOF | patch -d $HOME/build/ -p0 diff -ur orig/openssl-1.1.1d/apps/enc.c openssl-1.1.1d/apps/enc.c
--- orig/openssl-1.1.1d/apps/enc.c
+++ openssl-l.1.1d/apps/enc.c
@@ -533,6 +533,7 @@
*/
BIO_get_cipher_ctx (benc, &ctx) ;
+ EVP_CIPHER_CTX_set_flags(ctx, EVP_CIPHER_CTX_FLAG_WRAP_ALLOW) ;
if (!EVP_CipherInit_ex (ctx, cipher, NULL, NULL, NULL, enc) ) {
BIO_printf (bio_err, "Error setting cipher %s\n" ,
EOF
patching file openssl-1.1.1d/apps/enc.c