Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Unified Diff: net/third_party/nss/patches/aesgcmchromium.patch

Issue 962593002: Use dlsym(RTLD_DEFAULT) instead of dlsym(dlopen(NULL)) in aesgcmchromium.patch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge the patch change into aesgcmchromium.patch Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/third_party/nss/ssl/ssl3con.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/third_party/nss/patches/aesgcmchromium.patch
diff --git a/net/third_party/nss/patches/aesgcmchromium.patch b/net/third_party/nss/patches/aesgcmchromium.patch
index 8549c35286ef10302131cd1706627665f7cbf616..fd4a1d892542e4d619ad5706b34a1355d638fc3f 100644
--- a/net/third_party/nss/patches/aesgcmchromium.patch
+++ b/net/third_party/nss/patches/aesgcmchromium.patch
@@ -1,6 +1,14 @@
diff -pu a/nss/lib/ssl/ssl3con.c b/nss/lib/ssl/ssl3con.c
--- a/nss/lib/ssl/ssl3con.c 2014-01-17 18:04:43.127747463 -0800
+++ b/nss/lib/ssl/ssl3con.c 2014-01-17 18:06:21.919386088 -0800
+@@ -8,6 +8,7 @@
+
+ /* TODO(ekr): Implement HelloVerifyRequest on server side. OK for now. */
+
++#define _GNU_SOURCE 1
+ #include "cert.h"
+ #include "ssl.h"
+ #include "cryptohi.h" /* for DSAU_ stuff */
@@ -44,6 +44,9 @@
Ryan Sleevi 2015/03/02 21:15:14 +44,9 -> +45,9
ppi 2015/03/03 10:17:02 Done.
#ifdef NSS_ENABLE_ZLIB
#include "zlib.h"
@@ -31,14 +39,8 @@ diff -pu a/nss/lib/ssl/ssl3con.c b/nss/lib/ssl/ssl3con.c
+#ifdef LINUX
+ /* On Linux we use the system NSS libraries. Look up the PK11_Encrypt and
+ * PK11_Decrypt functions at run time. */
-+ void *handle = dlopen(NULL, RTLD_LAZY);
-+ if (!handle) {
-+ PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
-+ return PR_FAILURE;
-+ }
-+ pk11_encrypt = (PK11CryptFcn)dlsym(handle, "PK11_Encrypt");
-+ pk11_decrypt = (PK11CryptFcn)dlsym(handle, "PK11_Decrypt");
-+ dlclose(handle);
++ pk11_encrypt = (PK11CryptFcn)dlsym(RTLD_DEFAULT, "PK11_Encrypt");
++ pk11_decrypt = (PK11CryptFcn)dlsym(RTLD_DEFAULT, "PK11_Decrypt");
+ return PR_SUCCESS;
+#else
+ /* On other platforms we use our own copy of NSS. PK11_Encrypt and
« no previous file with comments | « no previous file | net/third_party/nss/ssl/ssl3con.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698