[squeak-dev] stream>>#nextPutAll: changed to return collection instead of the stream?

C. David Shaffer cdshaffer at acm.org
Sun Jun 27 14:16:10 UTC 2010

On 06/27/10 09:01, Rob Withers wrote:
> This has completely broken SSL.  :-(
I hit this as well.  Here's a patch (although you likely already fixed
it yourself).  BTW, when using SSL you definitely want the improvements
to Cryptography found on:


If someone is doing updates of Cryptography/SSL they might want to look
into getting this code into SqueakSource as having to search the
universe for a working SSL is kind of frustrating :-)


-------------- next part --------------
'From Squeak4.1 of 17 April 2010 [latest update: #9957] on 25 June 2010 at 10:49:58 am'!

!SSLClientHelloMsg methodsFor: 'converting' stamp: 'cds 6/25/2010 09:55'!

	| writeStream encodedSuites encodedCompressionMethods |
	encodedSuites := (self cipherSuites 
		inject: (WriteStream on: ByteArray new)
		into: [:stream :cipherSuite | 
			stream nextPutAll: cipherSuite codeAsByteArray.
			stream]) contents.
	encodedCompressionMethods := (self compressionMethods
		inject: (WriteStream on: ByteArray new)
		into: [:stream :compressionMethod | 
			stream nextPut: compressionMethod. stream]) contents.
	writeStream := WriteStream on: ByteArray new.
		nextPutAll: self clientVersion asByteArray;
		nextPutAll: self random;
		nextPutAll: (self sessionId asByteArray size) asByteArray;
		nextPutAll: self sessionId asByteArray;
		nextPutAll: (encodedSuites size asByteArrayOfSize: 2);
		nextPutAll: encodedSuites;
		nextPutAll: (encodedCompressionMethods size asByteArrayOfSize: 1);
		nextPutAll: encodedCompressionMethods.
	^writeStream contents.

! !

More information about the Squeak-dev mailing list