[Glass] ZnEasy, Gemstone 3.5.x, https and certificates ...

Dale Henrichs dale.henrichs at gemtalksystems.com
Wed Feb 5 12:37:30 PST 2020


Marten,

Is this a question or ???

Assuming that you are asking a question like: "how do I use ZNClient to 
download a page from an https server?", then I can point to this example[1]:

    projectProjectEntryFromUrl: projectEntryUrl
       | response client entryNodeSource node url |
       url := projectEntryUrl asZnUrl.
       url scheme = #'https'
         ifTrue: [
           Smalltalk
             at: #'GsSecureSocket'
             ifPresent: [ :class | class perform: #'disableCertificateVerificationOnClient' ] ].
       client := ZnClient new.
       response := client
         beOneShot;
         enforceHttpSuccess: true;
         get: url.
       entryNodeSource := response decodeFromUTF8.
       node := self objectSerializer fromString: entryNodeSource.
       ^ node

There are also several (passing) tests that hit https sites that should 
be in your image:

    ZnHTTPSTests debug: #testAmazonAWS
    ZnHTTPSTests debug: #testGetPharoVersion
    ZnHTTPSTests debug: #testGForceInria
    ZnHTTPSTests debug: #testGmailEncrypted
    ZnHTTPSTests debug: #testGoogleEncrypted
    ZnHTTPSTests debug: #testRequestResponse
    ZnHTTPSTests debug: #testTransfers
    ZnHTTPSTests debug: #testTransfersSingleClient
    ZnHTTPSTests debug: #testWikimedia

If you are hitting errors, GemStone version numbers and error stacks 
would help me help you ...

Dale

[1] 
https://github.com/dalehenrich/tode/blob/master/repository/Topez-Server-Core.package/TDMetacelloTool.class/instance/projectProjectEntryFromUrl..st

On 2/5/20 10:55 AM, Marten Feldtmann via Glass wrote:
> I tried to use ZnEasy to make a post call against a https server ... 
> but that did not work. Exception with hand shaking ... etc.
>
> I rewrote the logic in my software using external curl and that worked 
> out of the box ...
>
> Thats a typical experience ... pagecode detection by using external 
> programs, uploads using external programs, compression and unpacking 
> using external programs ...
>
> That IS experience ...
>
> Marten
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> https://lists.gemtalksystems.com/mailman/listinfo/glass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gemtalksystems.com/mailman/private/glass/attachments/20200205/59202dbd/attachment.htm>


More information about the Glass mailing list