| OLD | NEW |
| 1 /* ***** BEGIN LICENSE BLOCK ***** | 1 /* ***** BEGIN LICENSE BLOCK ***** |
| 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 3 * | 3 * |
| 4 * The contents of this file are subject to the Mozilla Public License Version | 4 * The contents of this file are subject to the Mozilla Public License Version |
| 5 * 1.1 (the "License"); you may not use this file except in compliance with | 5 * 1.1 (the "License"); you may not use this file except in compliance with |
| 6 * the License. You may obtain a copy of the License at | 6 * the License. You may obtain a copy of the License at |
| 7 * http://www.mozilla.org/MPL/ | 7 * http://www.mozilla.org/MPL/ |
| 8 * | 8 * |
| 9 * Software distributed under the License is distributed on an "AS IS" basis, | 9 * Software distributed under the License is distributed on an "AS IS" basis, |
| 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 inf.protocolVersion = ss->version; | 90 inf.protocolVersion = ss->version; |
| 91 inf.authKeyBits = ss->sec.authKeyBits; | 91 inf.authKeyBits = ss->sec.authKeyBits; |
| 92 inf.keaKeyBits = ss->sec.keaKeyBits; | 92 inf.keaKeyBits = ss->sec.keaKeyBits; |
| 93 if (ss->version < SSL_LIBRARY_VERSION_3_0) { /* SSL2 */ | 93 if (ss->version < SSL_LIBRARY_VERSION_3_0) { /* SSL2 */ |
| 94 inf.cipherSuite = ss->sec.cipherType | 0xff00; | 94 inf.cipherSuite = ss->sec.cipherType | 0xff00; |
| 95 inf.compressionMethod = ssl_compression_null; | 95 inf.compressionMethod = ssl_compression_null; |
| 96 inf.compressionMethodName = "N/A"; | 96 inf.compressionMethodName = "N/A"; |
| 97 } else if (ss->ssl3.initialized) { /* SSL3 and TLS */ | 97 } else if (ss->ssl3.initialized) { /* SSL3 and TLS */ |
| 98 ssl_GetSpecReadLock(ss); | 98 ssl_GetSpecReadLock(ss); |
| 99 /* XXX The cipher suite should be in the specs and this | 99 /* XXX The cipher suite should be in the specs and this |
| 100 » * function should get it from crSpec rather than from the "hs". | 100 » * function should get it from cwSpec rather than from the "hs". |
| 101 * See bug 275744 comment 69. | 101 * See bug 275744 comment 69. |
| 102 */ | 102 */ |
| 103 inf.cipherSuite = ss->ssl3.hs.cipher_suite; | 103 inf.cipherSuite = ss->ssl3.hs.cipher_suite; |
| 104 » inf.compressionMethod = ss->ssl3.crSpec->compression_method; | 104 » inf.compressionMethod = ss->ssl3.cwSpec->compression_method; |
| 105 ssl_ReleaseSpecReadLock(ss); | 105 ssl_ReleaseSpecReadLock(ss); |
| 106 inf.compressionMethodName = | 106 inf.compressionMethodName = |
| 107 ssl_GetCompressionMethodName(inf.compressionMethod); | 107 ssl_GetCompressionMethodName(inf.compressionMethod); |
| 108 } | 108 } |
| 109 if (sid) { | 109 if (sid) { |
| 110 inf.creationTime = sid->creationTime; | 110 inf.creationTime = sid->creationTime; |
| 111 inf.lastAccessTime = sid->lastAccessTime; | 111 inf.lastAccessTime = sid->lastAccessTime; |
| 112 inf.expirationTime = sid->expirationTime; | 112 inf.expirationTime = sid->expirationTime; |
| 113 if (ss->version < SSL_LIBRARY_VERSION_3_0) { /* SSL2 */ | 113 if (ss->version < SSL_LIBRARY_VERSION_3_0) { /* SSL2 */ |
| 114 inf.sessionIDLength = SSL2_SESSIONID_BYTES; | 114 inf.sessionIDLength = SSL2_SESSIONID_BYTES; |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 SSL_DBG(("%d: SSL[%d]: bad socket in SSL_GetNegotiatedHostInfo", | 329 SSL_DBG(("%d: SSL[%d]: bad socket in SSL_GetNegotiatedHostInfo", |
| 330 SSL_GETPID(), fd)); | 330 SSL_GETPID(), fd)); |
| 331 return NULL; | 331 return NULL; |
| 332 } | 332 } |
| 333 | 333 |
| 334 if (ss->sec.isServer) { | 334 if (ss->sec.isServer) { |
| 335 if (ss->version > SSL_LIBRARY_VERSION_3_0 && | 335 if (ss->version > SSL_LIBRARY_VERSION_3_0 && |
| 336 ss->ssl3.initialized) { /* TLS */ | 336 ss->ssl3.initialized) { /* TLS */ |
| 337 SECItem *crsName; | 337 SECItem *crsName; |
| 338 ssl_GetSpecReadLock(ss); /*********************************/ | 338 ssl_GetSpecReadLock(ss); /*********************************/ |
| 339 crsName = &ss->ssl3.crSpec->srvVirtName; | 339 crsName = &ss->ssl3.cwSpec->srvVirtName; |
| 340 if (crsName->data) { | 340 if (crsName->data) { |
| 341 sniName = SECITEM_DupItem(crsName); | 341 sniName = SECITEM_DupItem(crsName); |
| 342 } | 342 } |
| 343 ssl_ReleaseSpecReadLock(ss); /*----------------------------*/ | 343 ssl_ReleaseSpecReadLock(ss); /*----------------------------*/ |
| 344 } | 344 } |
| 345 return sniName; | 345 return sniName; |
| 346 } | 346 } |
| 347 name = SSL_RevealURL(fd); | 347 name = SSL_RevealURL(fd); |
| 348 if (name) { | 348 if (name) { |
| 349 sniName = PORT_ZNew(SECItem); | 349 sniName = PORT_ZNew(SECItem); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 rv = ssl3_TLSPRFWithMasterSecret(ss->ssl3.cwSpec, label, labelLen, val, | 423 rv = ssl3_TLSPRFWithMasterSecret(ss->ssl3.cwSpec, label, labelLen, val, |
| 424 valLen, out, outLen); | 424 valLen, out, outLen); |
| 425 } | 425 } |
| 426 ssl_ReleaseSpecReadLock(ss); | 426 ssl_ReleaseSpecReadLock(ss); |
| 427 ssl_ReleaseSSL3HandshakeLock(ss); | 427 ssl_ReleaseSSL3HandshakeLock(ss); |
| 428 ssl_ReleaseRecvBufLock(ss); | 428 ssl_ReleaseRecvBufLock(ss); |
| 429 | 429 |
| 430 PORT_ZFree(val, valLen); | 430 PORT_ZFree(val, valLen); |
| 431 return rv; | 431 return rv; |
| 432 } | 432 } |
| OLD | NEW |