summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-27 16:47:12 +0000
committerdkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-27 16:47:12 +0000
commitbf3c4210d99692c401cfaa298a4cfebdd0962191 (patch)
tree91135405fe6efaf49870d00a54f7efbcfc5786df
parent39e5624b02994bf4bb5d3799136c2f39902695dd (diff)
downloadchromium_src-bf3c4210d99692c401cfaa298a4cfebdd0962191.zip
chromium_src-bf3c4210d99692c401cfaa298a4cfebdd0962191.tar.gz
chromium_src-bf3c4210d99692c401cfaa298a4cfebdd0962191.tar.bz2
Avoid runtime linker warning
"Symbol `SSL_ImplementedCiphers' has different size in shared object, consider re-linking" if SSL_ImplementedCiphers is different size on target system than it was on build system. BUG=12826 TEST=run on Jaunty, look for "Symbol `SSL_ImplementedCiphers' has different size in shared object" in console output Review URL: http://codereview.chromium.org/118367 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21649 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/nss_init.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/base/nss_init.cc b/base/nss_init.cc
index e39a3a5..15fad89 100644
--- a/base/nss_init.cc
+++ b/base/nss_init.cc
@@ -4,6 +4,7 @@
#include "base/nss_init.h"
+#include <dlfcn.h>
#include <nss.h>
#include <plarena.h>
#include <prerror.h>
@@ -93,12 +94,22 @@ class NSSInitSingleton {
NSS_SetDomesticPolicy();
+ // Use late binding to avoid scary but benign warning
+ // "Symbol `SSL_ImplementedCiphers' has different size in shared object,
+ // consider re-linking"
+ const PRUint16* pSSL_ImplementedCiphers = static_cast<const PRUint16*>(
+ dlsym(RTLD_DEFAULT, "SSL_ImplementedCiphers"));
+ if (pSSL_ImplementedCiphers == NULL) {
+ NOTREACHED() << "Can't get list of supported ciphers";
+ return;
+ }
+
// Explicitly enable exactly those ciphers with keys of at least 80 bits
for (int i = 0; i < SSL_NumImplementedCiphers; i++) {
SSLCipherSuiteInfo info;
- if (SSL_GetCipherSuiteInfo(SSL_ImplementedCiphers[i], &info,
+ if (SSL_GetCipherSuiteInfo(pSSL_ImplementedCiphers[i], &info,
sizeof(info)) == SECSuccess) {
- SSL_CipherPrefSetDefault(SSL_ImplementedCiphers[i],
+ SSL_CipherPrefSetDefault(pSSL_ImplementedCiphers[i],
(info.effectiveKeyBits >= 80));
}
}