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

Side by Side Diff: net/third_party/nss/ssl/ssl3con.c

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: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « net/third_party/nss/ssl/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* 2 /*
3 * SSL3 Protocol 3 * SSL3 Protocol
4 * 4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public 5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this 6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 8
9 /* TODO(ekr): Implement HelloVerifyRequest on server side. OK for now. */ 9 /* TODO(ekr): Implement HelloVerifyRequest on server side. OK for now. */
10 10
Ryan Sleevi 2015/02/27 00:36:51 In NSPR, the idiom is to #define _GNU_SOURCE 1 her
11 #include "cert.h" 11 #include "cert.h"
12 #include "ssl.h" 12 #include "ssl.h"
13 #include "cryptohi.h" /* for DSAU_ stuff */ 13 #include "cryptohi.h" /* for DSAU_ stuff */
14 #include "keyhi.h" 14 #include "keyhi.h"
15 #include "secder.h" 15 #include "secder.h"
16 #include "secitem.h" 16 #include "secitem.h"
17 #include "sechash.h" 17 #include "sechash.h"
18 18
19 #include "sslimpl.h" 19 #include "sslimpl.h"
20 #include "sslproto.h" 20 #include "sslproto.h"
(...skipping 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after
1877 static PK11CryptFcn pk11_decrypt = NULL; 1877 static PK11CryptFcn pk11_decrypt = NULL;
1878 1878
1879 static PRCallOnceType resolvePK11CryptOnce; 1879 static PRCallOnceType resolvePK11CryptOnce;
1880 1880
1881 static PRStatus 1881 static PRStatus
1882 ssl3_ResolvePK11CryptFunctions(void) 1882 ssl3_ResolvePK11CryptFunctions(void)
1883 { 1883 {
1884 #ifdef LINUX 1884 #ifdef LINUX
1885 /* On Linux we use the system NSS libraries. Look up the PK11_Encrypt and 1885 /* On Linux we use the system NSS libraries. Look up the PK11_Encrypt and
1886 * PK11_Decrypt functions at run time. */ 1886 * PK11_Decrypt functions at run time. */
1887 void *handle = dlopen(NULL, RTLD_LAZY); 1887 pk11_encrypt = (PK11CryptFcn)dlsym(RTLD_DEFAULT, "PK11_Encrypt");
1888 if (!handle) { 1888 pk11_decrypt = (PK11CryptFcn)dlsym(RTLD_DEFAULT, "PK11_Decrypt");
1889 » PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
1890 » return PR_FAILURE;
1891 }
1892 pk11_encrypt = (PK11CryptFcn)dlsym(handle, "PK11_Encrypt");
1893 pk11_decrypt = (PK11CryptFcn)dlsym(handle, "PK11_Decrypt");
1894 dlclose(handle);
1895 return PR_SUCCESS; 1889 return PR_SUCCESS;
1896 #else 1890 #else
1897 /* On other platforms we use our own copy of NSS. PK11_Encrypt and 1891 /* On other platforms we use our own copy of NSS. PK11_Encrypt and
1898 * PK11_Decrypt are known to be available. */ 1892 * PK11_Decrypt are known to be available. */
1899 pk11_encrypt = PK11_Encrypt; 1893 pk11_encrypt = PK11_Encrypt;
1900 pk11_decrypt = PK11_Decrypt; 1894 pk11_decrypt = PK11_Decrypt;
1901 return PR_SUCCESS; 1895 return PR_SUCCESS;
1902 #endif 1896 #endif
1903 } 1897 }
1904 1898
(...skipping 10946 matching lines...) Expand 10 before | Expand all | Expand 10 after
12851 PORT_Free(ss->ssl3.hs.recvdFragments.buf); 12845 PORT_Free(ss->ssl3.hs.recvdFragments.buf);
12852 } 12846 }
12853 } 12847 }
12854 12848
12855 ss->ssl3.initialized = PR_FALSE; 12849 ss->ssl3.initialized = PR_FALSE;
12856 12850
12857 SECITEM_FreeItem(&ss->ssl3.nextProto, PR_FALSE); 12851 SECITEM_FreeItem(&ss->ssl3.nextProto, PR_FALSE);
12858 } 12852 }
12859 12853
12860 /* End of ssl3con.c */ 12854 /* End of ssl3con.c */
OLDNEW
« no previous file with comments | « net/third_party/nss/ssl/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698