Quantcast

The Trunk: Network-pre.195.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

The Trunk: Network-pre.195.mcz

commits-2
Patrick Rein uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-pre.195.mcz

==================== Summary ====================

Name: Network-pre.195
Author: pre
Time: 12 May 2017, 5:35:28.541874 pm
UUID: a8f3d074-fcfc-0749-b727-93d1a7f62304
Ancestors: Network-pre.194

Fixes a defect in the starttls implementation which caused the client to initiate starttls during an active starttls session

=============== Diff against Network-pre.194 ===============

Item was changed:
  ----- Method: POP3Client>>initiateSession (in category 'private protocol') -----
  initiateSession
 
  self sendCommand: 'CAPA'.
  self checkResponse.
 
  self parseCapabilities: self getMultilineResponse lines.
 
+ (self tlsIsActive not and: [self serverSupportsStarttls] and: [self wantsStarttls])
- (self serverSupportsStarttls and: [self wantsStarttls])
  ifTrue: [self starttls]!

Item was changed:
  ----- Method: ProtocolClient>>starttls (in category 'private protocol') -----
  starttls
  Smalltalk at: #SqueakSSL ifAbsent:[self error: 'SqueakSSL is missing'].
 
  self sendCommand: self starttlsVerb.
  self checkResponse.
  self responseIsSuccess ifTrue: [
  stream := SqueakSSL secureSocketStream on: stream socket.
+ stream sslConnectTo: self hostName.
+ self connectionInfo at: #tlsActive put: true].!
- stream sslConnectTo: self hostName].!

Item was added:
+ ----- Method: ProtocolClient>>tlsIsActive (in category 'testing') -----
+ tlsIsActive
+
+ ^ self connectionInfo at: #tlsActive ifAbsent: [false]!

Item was changed:
  ----- Method: SMTPClient>>initiateSession (in category 'private protocol') -----
  initiateSession
  "EHLO <SP> <domain> <CRLF>"
 
  self sendCommand: (self useHelo ifTrue:['HELO '] ifFalse: ['EHLO ']) , self localHostName.
  self checkResponse.
 
  self parseCapabilities: (self lastResponse lines allButFirst
  collect: [:l | self valueOfResponseLine: l]).
 
+ (self tlsIsActive not and: [self serverSupportsStarttls] and: [self wantsStarttls])
- (self serverSupportsStarttls and: [self wantsStarttls])
  ifTrue: [self starttls]!


Loading...