DolphinSure Error

25 views
Skip to first unread message

Charybdis

unread,
Jul 25, 2022, 11:35:48 PM7/25/22
to
Hi all,
I have Dolphin 7.1.23 image installed and attempted to create a Digital Certificate.

MyOwnCertificate serial: 'MY100002' owner: 'My Own Company Inc.' details: 'secu...@company.com'

Received the following error:

an invalid MyOwnCertificate [STBFiler - Input stream contains an invalid class (AnsiString)].

As this concerns foundation classes and behaviors, any idea how to correct the problem?

Somewhat of a newbie here and I don't know whats causing this error.

Thanks

john.a...@gmail.com

unread,
Jul 26, 2022, 4:39:20 AM7/26/22
to
Hi - it looks like DolphinSure is out-of-date with the current String implementation in Dolphin 7.1.

This an be fixed by modifying the DolphinSureCertificateInfo class method binaryReadFrom:context: changing the reference to #String to #AnsiString :

binaryReadFrom: aStream context: anObject
"Answers an instance of this class from its binary STB representation on aStream. Because STB is inherently an insecure format
we must use an STBInFiler that especially guarded with a ValidatingClassLocator to that only expected, non-dangerous
classes can be loaded from the STB stream."

| inFiler validClasses |
validClasses := (Set new)
add: #Date;
add: #AnsiString; "<- change here"
add: #LargeInteger;
add: #SmallInteger;
add: self name;
yourself.
inFiler := (STBValidatingInFiler on: aStream)
validationBlock: [:className | validClasses identityIncludes: className];
context: anObject;
yourself.
^inFiler next

The initial part of the example should then work OK. However there look to be further errors when working through the examples in the Workspace that opens. I've raised an issue for these on the Dolphin GitHub repository:

https://github.com/dolphinsmalltalk/Dolphin/issues/1169

Cheers,

John Aspinall

john.a...@gmail.com

unread,
Jul 26, 2022, 12:33:34 PM7/26/22
to
Blair has submitted a fix to the issue; I've just rebuilt an image from the 7.1 branch and the DolphinSure examples now work OK.

Cheers.

John
Reply all
Reply to author
Forward
0 new messages