Login  Register

Re: ZnEasy, Gemstone 3.5.x, https and certificates ...

Posted by GLASS mailing list on Feb 05, 2020; 8:37pm
URL: https://forum.world.st/ZnEasy-Gemstone-3-5-x-https-and-certificates-tp5111221p5111229.html

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
[hidden email]
https://lists.gemtalksystems.com/mailman/listinfo/glass

_______________________________________________
Glass mailing list
[hidden email]
https://lists.gemtalksystems.com/mailman/listinfo/glass