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 * This Source Code Form is subject to the terms of the Mozilla Public | 6 * This Source Code Form is subject to the terms of the Mozilla Public |
7 * License, v. 2.0. If a copy of the MPL was not distributed with this | 7 * License, v. 2.0. If a copy of the MPL was not distributed with this |
8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
9 #include "seccomon.h" | 9 #include "seccomon.h" |
10 #include "cert.h" | 10 #include "cert.h" |
(...skipping 3039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3050 /* This should be of type SSLKEAType, but CC on IRIX | 3050 /* This should be of type SSLKEAType, but CC on IRIX |
3051 * complains during the for loop. | 3051 * complains during the for loop. |
3052 */ | 3052 */ |
3053 int i; | 3053 int i; |
3054 SECStatus status; | 3054 SECStatus status; |
3055 | 3055 |
3056 ss->opt = ssl_defaults; | 3056 ss->opt = ssl_defaults; |
3057 ss->opt.useSocks = PR_FALSE; | 3057 ss->opt.useSocks = PR_FALSE; |
3058 ss->opt.noLocks = !makeLocks; | 3058 ss->opt.noLocks = !makeLocks; |
3059 ss->vrange = *VERSIONS_DEFAULTS(protocolVariant); | 3059 ss->vrange = *VERSIONS_DEFAULTS(protocolVariant); |
| 3060 ss->protocolVariant = protocolVariant; |
3060 | 3061 |
3061 ss->peerID = NULL; | 3062 ss->peerID = NULL; |
3062 ss->rTimeout = PR_INTERVAL_NO_TIMEOUT; | 3063 ss->rTimeout = PR_INTERVAL_NO_TIMEOUT; |
3063 ss->wTimeout = PR_INTERVAL_NO_TIMEOUT; | 3064 ss->wTimeout = PR_INTERVAL_NO_TIMEOUT; |
3064 ss->cTimeout = PR_INTERVAL_NO_TIMEOUT; | 3065 ss->cTimeout = PR_INTERVAL_NO_TIMEOUT; |
3065 ss->cipherSpecs = NULL; | 3066 ss->cipherSpecs = NULL; |
3066 ss->sizeCipherSpecs = 0; /* produced lazily */ | 3067 ss->sizeCipherSpecs = 0; /* produced lazily */ |
3067 ss->preferredCipher = NULL; | 3068 ss->preferredCipher = NULL; |
3068 ss->url = NULL; | 3069 ss->url = NULL; |
3069 | 3070 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3110 if (status != SECSuccess) | 3111 if (status != SECSuccess) |
3111 goto loser; | 3112 goto loser; |
3112 status = ssl_InitGather(&ss->gs); | 3113 status = ssl_InitGather(&ss->gs); |
3113 if (status != SECSuccess) { | 3114 if (status != SECSuccess) { |
3114 loser: | 3115 loser: |
3115 ssl_DestroySocketContents(ss); | 3116 ssl_DestroySocketContents(ss); |
3116 ssl_DestroyLocks(ss); | 3117 ssl_DestroyLocks(ss); |
3117 PORT_Free(ss); | 3118 PORT_Free(ss); |
3118 ss = NULL; | 3119 ss = NULL; |
3119 } | 3120 } |
3120 ss->protocolVariant = protocolVariant; | |
3121 } | 3121 } |
3122 return ss; | 3122 return ss; |
3123 } | 3123 } |
3124 | 3124 |
OLD | NEW |