Enter the following block, and then press Enter on your device:
cat <<-EOF | patch -d $HOME/build/ -p 0
diff -ur orig/openssl-1.1.1w/apps/enc.c openssl-1.1.1w/apps/enc.c
--- orig/openssl-1.1.1w/apps/enc.c
+++ openssl-1.1.1w/apps/enc.c
@@ -534,6 +534,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
Note: If you use a version of OpenSSL other than OpenSSL-1.1.1w, then change the directory and update the commands. The patch works only with OpenSSL-1.1.1w.
Example output that confirms a successful patch:
[root@ip-172-31-20-119 build]# cat <<-EOF | patch -d $HOME/build/ -p 0
diff -ur orig/openssl-1.1.1w/apps/enc.c openssl-1.1.1w/apps/enc.c
--- orig/openssl-1.1.1w/apps/enc.c
+++ openssl-1.1.1w/apps/enc.c
@@ -534,6 +534,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.1w/apps/enc.c