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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

GLASS mailing list
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
Reply | Threaded
Open this post in threaded view
|

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

GLASS mailing list

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
Reply | Threaded
Open this post in threaded view
|

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

GLASS mailing list
No, its just an experience I've made over time and this example is another one.

On the one side its pitty, on the other side I WANT to introduce other languages in my projects - so just another example to use other language binaries/libraries and let them do the work. As long as Gemstone/S does its core work, that is ok and it should be a NORMAL behaviour to use multiple languages (and I know it is not).

Marten

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