OLD | NEW |
1 /* | 1 /* |
2 * vtables (and methods that call through them) for the 4 types of | 2 * vtables (and methods that call through them) for the 4 types of |
3 * SSLSockets supported. Only one type is still supported. | 3 * SSLSockets supported. Only one type is still supported. |
4 * Various other functions. | 4 * Various other functions. |
5 * | 5 * |
6 * ***** BEGIN LICENSE BLOCK ***** | 6 * ***** BEGIN LICENSE BLOCK ***** |
7 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 7 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
8 * | 8 * |
9 * The contents of this file are subject to the Mozilla Public License Version | 9 * The contents of this file are subject to the Mozilla Public License Version |
10 * 1.1 (the "License"); you may not use this file except in compliance with | 10 * 1.1 (the "License"); you may not use this file except in compliance with |
(...skipping 2916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2927 #endif /* TRACE */ | 2927 #endif /* TRACE */ |
2928 ev = getenv("SSLDEBUG"); | 2928 ev = getenv("SSLDEBUG"); |
2929 if (ev && ev[0]) { | 2929 if (ev && ev[0]) { |
2930 ssl_debug = atoi(ev); | 2930 ssl_debug = atoi(ev); |
2931 SSL_TRACE(("SSL: debugging set to %d", ssl_debug)); | 2931 SSL_TRACE(("SSL: debugging set to %d", ssl_debug)); |
2932 } | 2932 } |
2933 #endif /* DEBUG */ | 2933 #endif /* DEBUG */ |
2934 ev = getenv("SSLKEYLOGFILE"); | 2934 ev = getenv("SSLKEYLOGFILE"); |
2935 if (ev && ev[0]) { | 2935 if (ev && ev[0]) { |
2936 ssl_keylog_iob = fopen(ev, "a"); | 2936 ssl_keylog_iob = fopen(ev, "a"); |
2937 » if (ftell(ssl_keylog_iob) == 0) { | 2937 » if (!ssl_keylog_iob) { |
2938 » » fputs("# SSL/TLS secrets log file, generated by NSS\n", | 2938 » » SSL_TRACE(("Failed to open key log file")); |
2939 » » ssl_keylog_iob); | 2939 » } else { |
| 2940 » » if (ftell(ssl_keylog_iob) == 0) { |
| 2941 » » fputs("# SSL/TLS secrets log file, generated by NSS\n", |
| 2942 » » » ssl_keylog_iob); |
| 2943 » » } |
| 2944 » » SSL_TRACE(("SSL: logging pre-master secrets to %s", ev)); |
2940 } | 2945 } |
2941 SSL_TRACE(("SSL: logging pre-master secrets to %s", ev)); | |
2942 } | 2946 } |
2943 ev = getenv("SSLBYPASS"); | 2947 ev = getenv("SSLBYPASS"); |
2944 if (ev && ev[0]) { | 2948 if (ev && ev[0]) { |
2945 ssl_defaults.bypassPKCS11 = (ev[0] == '1'); | 2949 ssl_defaults.bypassPKCS11 = (ev[0] == '1'); |
2946 SSL_TRACE(("SSL: bypass default set to %d", \ | 2950 SSL_TRACE(("SSL: bypass default set to %d", \ |
2947 ssl_defaults.bypassPKCS11)); | 2951 ssl_defaults.bypassPKCS11)); |
2948 } | 2952 } |
2949 ev = getenv("SSLFORCELOCKS"); | 2953 ev = getenv("SSLFORCELOCKS"); |
2950 if (ev && ev[0] == '1') { | 2954 if (ev && ev[0] == '1') { |
2951 ssl_force_locks = PR_TRUE; | 2955 ssl_force_locks = PR_TRUE; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3062 ssl_DestroySocketContents(ss); | 3066 ssl_DestroySocketContents(ss); |
3063 ssl_DestroyLocks(ss); | 3067 ssl_DestroyLocks(ss); |
3064 PORT_Free(ss); | 3068 PORT_Free(ss); |
3065 ss = NULL; | 3069 ss = NULL; |
3066 } | 3070 } |
3067 ss->protocolVariant = protocolVariant; | 3071 ss->protocolVariant = protocolVariant; |
3068 } | 3072 } |
3069 return ss; | 3073 return ss; |
3070 } | 3074 } |
3071 | 3075 |
OLD | NEW |