Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add a compatibility EVP_CIPH_OCB_MODE value (#16214). #17873

Merged
merged 3 commits into from Apr 23, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions patches/common/boringssl/.patches
@@ -1,3 +1,4 @@
compatibility_evp_ciph_ocb_mode.patch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this patch added manually? I'm not sure how this could have been added to the top of the file if the export-patches script was used

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this patch added manually? I'm not sure how this could have been added to the top of the file if the export-patches script was used

This patch was added manually. Shall I re-add it with the export-patches command?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TaikiAkita Yep, the flow for making these patches is like this

  • Run gclient sync --your --flags --here
  • Add your commit on top of the checked out boringssl
  • Run git-export-patches -o electron/patches/common/boringssl

👍

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarshallOfSound

I regenerated the patches with git-export-patches, please have a look.

implement_ssl_get_tlsext_status_type.patch
expose_ripemd160.patch
expose_aes-cfb.patch
Expand Down
22 changes: 22 additions & 0 deletions patches/common/boringssl/compatibility_evp_ciph_ocb_mode.patch
@@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: David Benjamin <davidben@google.com>
Date: Sun Oct 14 11:01:40 2018 -0500
Subject: Add a compatibility EVP_CIPH_OCB_MODE value.


diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h
index 5963413..e9545c8 100644
--- a/include/openssl/cipher.h
+++ b/include/openssl/cipher.h
@@ -424,8 +424,9 @@

// The following flags do nothing and are included only to make it easier to
// compile code with BoringSSL.
-#define EVP_CIPH_CCM_MODE 0
-#define EVP_CIPH_WRAP_MODE 0
+#define EVP_CIPH_CCM_MODE (-1)
+#define EVP_CIPH_OCB_MODE (-2)
+#define EVP_CIPH_WRAP_MODE (-3)
#define EVP_CIPHER_CTX_FLAG_WRAP_ALLOW 0

// EVP_CIPHER_CTX_set_flags does nothing.