tim Rowledge uploaded a new version of SqueakSSL-Core to project The Trunk: http://source.squeak.org/trunk/SqueakSSL-Core-tpr.35.mcz
==================== Summary ====================
Name: SqueakSSL-Core-tpr.35 Author: tpr Time: 23 October 2023, 4:34:50.645901 pm UUID: 9f4c4bae-a267-439e-a8c1-a29e3b07b470 Ancestors: SqueakSSL-Core-mt.34
Use the simple (and cached) "Smalltalk platformName" instead of several roundabout methods
=============== Diff against SqueakSSL-Core-mt.34 ===============
Item was changed: ----- Method: SqueakSSL class>>ensureSampleCert (in category 'examples') ----- ensureSampleCert "Ensure that we have a sample certificate for the tests"
+ Smalltalk platformName caseOf: { - SqueakSSL platformName caseOf: { ['unix'] -> [^self ensureSampleCertFile]. ['Win32'] -> [^self ensureSampleCertInStore]. } otherwise: [^nil]. !
Item was changed: ----- Method: SqueakSSL class>>ensureSampleCertFile (in category 'examples') ----- ensureSampleCertFile "On Unix, we can simply create a valid cert file"
| certName file | + Smalltalk platformName = 'unix' ifFalse:[^self]. - SqueakSSL platformName = 'unix' ifFalse:[^self]. certName := self name, 'Cert.pem'. (FileDirectory default fileExists: certName) ifFalse:[ file := FileDirectory default newFileNamed: certName. [file nextPutAll: self exampleCertFile withUnixLineEndings] ensure:[file close]. ]. ^FileDirectory default fullNameFor: certName. !
Item was changed: ----- Method: SqueakSSL class>>ensureSampleCertInStore (in category 'examples') ----- ensureSampleCertInStore "Ensure that we have a valid certificate in the Windows certificate store"
+ Smalltalk platformName = 'Win32' ifFalse:[^self]. - SqueakSSL platformName = 'Win32' ifFalse:[^self]. "Undocumented. Allows importing a pfx w/o password. For the sole purpose of being able to run tests reliably" SqueakSSL new setStringProperty: 10001 to: self exampleCertPFX. ^'testcert'. "Friendly name of test cert" !
Item was changed: ----- Method: SqueakSSL class>>platformName (in category 'utilities') ----- platformName "Return the name of the platform we're running on."
+ ^Smalltalk platformName! - ^Smalltalk getSystemAttribute: 1001!
Item was changed: ----- Method: SqueakSSL>>canVerify (in category 'testing') ----- canVerify + ^ (Smalltalk platformName = 'Mac OS' and: [self pluginVersion < 3]) not. - ^ (WebUtils platformName = 'Mac OS' and: [self pluginVersion < 3]) not. !
packages@lists.squeakfoundation.org