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

Unified Diff: net/third_party/nss/ssl/sslsock.c

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, 6 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 | « net/third_party/nss/patches/sslkeylogerror.patch ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/third_party/nss/ssl/sslsock.c
diff --git a/net/third_party/nss/ssl/sslsock.c b/net/third_party/nss/ssl/sslsock.c
index 1823a1ca3faa0be49d628f006d3b1df8adf4fb44..2a93daedd0b07e61e9a8f50cff0d378a66ab95f0 100644
--- a/net/third_party/nss/ssl/sslsock.c
+++ b/net/third_party/nss/ssl/sslsock.c
@@ -2934,11 +2934,15 @@ ssl_SetDefaultsFromEnvironment(void)
ev = getenv("SSLKEYLOGFILE");
if (ev && ev[0]) {
ssl_keylog_iob = fopen(ev, "a");
- if (ftell(ssl_keylog_iob) == 0) {
- fputs("# SSL/TLS secrets log file, generated by NSS\n",
- ssl_keylog_iob);
+ if (!ssl_keylog_iob) {
+ SSL_TRACE(("Failed to open key log file"));
+ } else {
+ if (ftell(ssl_keylog_iob) == 0) {
+ fputs("# SSL/TLS secrets log file, generated by NSS\n",
+ ssl_keylog_iob);
+ }
+ SSL_TRACE(("SSL: logging pre-master secrets to %s", ev));
}
- SSL_TRACE(("SSL: logging pre-master secrets to %s", ev));
}
ev = getenv("SSLBYPASS");
if (ev && ev[0]) {
« no previous file with comments | « net/third_party/nss/patches/sslkeylogerror.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698