'From Squeak3.1alpha of 4 February 2001 [latest update: #3531] on 6 February 2001 at 7:48:58 pm'! "Change Set: PositionFix-ar Date: 6 February 2001 Author: Andreas Raab Fixes a wrong file position."! !SecurityManager methodsFor: 'security operations' stamp: 'ar 2/6/2001 19:48'! 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). part2 _ aStream nextInto: (LargePositiveInteger basicNew: 20). sig _ Array with: part1 with: part2. hash _ SecureHashAlgorithm new hashStream: aStream. dsa _ DigitalSignatureAlgorithm new. trusted _ self trustedKeys. okay _ (trusted detect:[:key| dsa verifySignature: sig ofMessageHash: hash publicKey: key] ifNone:[nil]) notNil. aStream position: pos+44. ^okay! !