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

Side by Side Diff: net/third_party/nss/patches/sslkeylogerror.patch

Issue 10636062: Fix crash when an SSL key-log file couldn't be opened. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « net/third_party/nss/patches/applypatches.sh ('k') | net/third_party/nss/ssl/sslsock.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 diff --git a/net/third_party/nss/ssl/sslsock.c b/net/third_party/nss/ssl/sslsock .c
2 index 1823a1c..2a93dae 100644
3 --- a/net/third_party/nss/ssl/sslsock.c
4 +++ b/net/third_party/nss/ssl/sslsock.c
5 @@ -2934,11 +2934,15 @@ ssl_SetDefaultsFromEnvironment(void)
6 ev = getenv("SSLKEYLOGFILE");
7 if (ev && ev[0]) {
8 ssl_keylog_iob = fopen(ev, "a");
9 - if (ftell(ssl_keylog_iob) == 0) {
10 - fputs("# SSL/TLS secrets log file, generated by NSS\n",
11 - ssl_keylog_iob);
12 + if (!ssl_keylog_iob) {
13 + SSL_TRACE(("Failed to open key log file"));
14 + } else {
15 + if (ftell(ssl_keylog_iob) == 0) {
16 + fputs("# SSL/TLS secrets log file, generated by NSS\n",
17 + ssl_keylog_iob);
18 + }
19 + SSL_TRACE(("SSL: logging pre-master secrets to %s", ev));
20 }
21 - SSL_TRACE(("SSL: logging pre-master secrets to %s", ev));
22 }
23 ev = getenv("SSLBYPASS");
24 if (ev && ev[0]) {
OLDNEW
« no previous file with comments | « net/third_party/nss/patches/applypatches.sh ('k') | net/third_party/nss/ssl/sslsock.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698