[squeak-dev] The Trunk: System-nice.435.mcz

commits at source.squeak.org commits at source.squeak.org
Sun May 8 11:59:39 UTC 2011


Nicolas Cellier uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-nice.435.mcz

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

Name: System-nice.435
Author: nice
Time: 8 May 2011, 1:58:52.95 pm
UUID: f0aef1ea-3f57-4432-be83-31c9527522f1
Ancestors: System-nice.434

1) minor refactorings: use #anySatisfy: #allSatisfy: #noneSatisfy: where it simplifies
2) use newParser in PseudoClass now that it is defined

=============== Diff against System-nice.434 ===============

Item was changed:
  ----- Method: PseudoClass>>addMethodChange: (in category 'methods') -----
  addMethodChange: aChangeRecord
  	| selector |
+ 	selector := self newParser parseSelector: aChangeRecord string.
- 	selector := self parserClass new parseSelector: aChangeRecord string.
  	self organization classify: selector under: aChangeRecord category.
  	self sourceCodeAt: selector put: aChangeRecord!

Item was changed:
  ----- Method: SecurityManager>>positionToSecureContentsOf: (in category 'security operations') -----
  positionToSecureContentsOf: aStream
  	| bytes trusted part1 part2 sig hash dsa okay pos |
  	aStream binary.
  	pos := aStream position.
  	bytes := aStream next: 4.
  	bytes = 'SPRJ' asByteArray ifFalse:[
  		"was not signed"
  		aStream position: pos.
  		^false].
  	part1 := (aStream nextInto: (LargePositiveInteger basicNew: 20)) normalize.
  	part2 := (aStream nextInto: (LargePositiveInteger basicNew: 20)) normalize.
  	sig := Array with: part1 with: part2.
  	hash := SecureHashAlgorithm new hashStream: aStream.
  	dsa := DigitalSignatureAlgorithm new.
  	trusted := self trustedKeys.
+ 	okay := trusted anySatisfy: [:key| dsa verifySignature: sig ofMessageHash: hash publicKey: key].
- 	okay := (trusted detect:[:key| dsa verifySignature: sig ofMessageHash: hash publicKey: key]
- 			ifNone:[nil]) notNil.
  	aStream position: pos+44.
  	^okay!




More information about the Squeak-dev mailing list