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 2809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2820 } | 2820 } |
2821 if (!ssl_trace_iob) { | 2821 if (!ssl_trace_iob) { |
2822 ssl_trace_iob = stderr; | 2822 ssl_trace_iob = stderr; |
2823 } | 2823 } |
2824 #ifdef TRACE | 2824 #ifdef TRACE |
2825 ev = getenv("SSLTRACE"); | 2825 ev = getenv("SSLTRACE"); |
2826 if (ev && ev[0]) { | 2826 if (ev && ev[0]) { |
2827 ssl_trace = atoi(ev); | 2827 ssl_trace = atoi(ev); |
2828 SSL_TRACE(("SSL: tracing set to %d", ssl_trace)); | 2828 SSL_TRACE(("SSL: tracing set to %d", ssl_trace)); |
2829 } | 2829 } |
| 2830 #endif /* TRACE */ |
| 2831 ev = getenv("SSLDEBUG"); |
| 2832 if (ev && ev[0]) { |
| 2833 ssl_debug = atoi(ev); |
| 2834 SSL_TRACE(("SSL: debugging set to %d", ssl_debug)); |
| 2835 } |
| 2836 #endif /* DEBUG */ |
2830 ev = getenv("SSLKEYLOGFILE"); | 2837 ev = getenv("SSLKEYLOGFILE"); |
2831 if (ev && ev[0]) { | 2838 if (ev && ev[0]) { |
2832 ssl_keylog_iob = fopen(ev, "a"); | 2839 ssl_keylog_iob = fopen(ev, "a"); |
2833 if (ftell(ssl_keylog_iob) == 0) { | 2840 if (ftell(ssl_keylog_iob) == 0) { |
2834 fputs("# pre-master secret log file, generated by NSS\n", | 2841 fputs("# pre-master secret log file, generated by NSS\n", |
2835 ssl_keylog_iob); | 2842 ssl_keylog_iob); |
2836 } | 2843 } |
2837 SSL_TRACE(("SSL: logging pre-master secrets to %s", ev)); | 2844 SSL_TRACE(("SSL: logging pre-master secrets to %s", ev)); |
2838 } | 2845 } |
2839 #endif /* TRACE */ | |
2840 ev = getenv("SSLDEBUG"); | |
2841 if (ev && ev[0]) { | |
2842 ssl_debug = atoi(ev); | |
2843 SSL_TRACE(("SSL: debugging set to %d", ssl_debug)); | |
2844 } | |
2845 #endif /* DEBUG */ | |
2846 ev = getenv("SSLBYPASS"); | 2846 ev = getenv("SSLBYPASS"); |
2847 if (ev && ev[0]) { | 2847 if (ev && ev[0]) { |
2848 ssl_defaults.bypassPKCS11 = (ev[0] == '1'); | 2848 ssl_defaults.bypassPKCS11 = (ev[0] == '1'); |
2849 SSL_TRACE(("SSL: bypass default set to %d", \ | 2849 SSL_TRACE(("SSL: bypass default set to %d", \ |
2850 ssl_defaults.bypassPKCS11)); | 2850 ssl_defaults.bypassPKCS11)); |
2851 } | 2851 } |
2852 ev = getenv("SSLFORCELOCKS"); | 2852 ev = getenv("SSLFORCELOCKS"); |
2853 if (ev && ev[0] == '1') { | 2853 if (ev && ev[0] == '1') { |
2854 ssl_force_locks = PR_TRUE; | 2854 ssl_force_locks = PR_TRUE; |
2855 ssl_defaults.noLocks = 0; | 2855 ssl_defaults.noLocks = 0; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2965 ssl_DestroySocketContents(ss); | 2965 ssl_DestroySocketContents(ss); |
2966 ssl_DestroyLocks(ss); | 2966 ssl_DestroyLocks(ss); |
2967 PORT_Free(ss); | 2967 PORT_Free(ss); |
2968 ss = NULL; | 2968 ss = NULL; |
2969 } | 2969 } |
2970 ss->protocolVariant = protocolVariant; | 2970 ss->protocolVariant = protocolVariant; |
2971 } | 2971 } |
2972 return ss; | 2972 return ss; |
2973 } | 2973 } |
2974 | 2974 |
OLD | NEW |