SKP 2017 Launching external .exe making https calls

Dan,

This applies only to loading “net/http” within SketchUp’s Ruby process.

A discussion of processes is probably outside of the scope of this forum. What is important is the environment in place when an external command is executed in SU. I am speaking only about Windows, if anyone (Dan?) can test these issues with OSX, it would be appreciated.

I’ve attached three files:

  1. info_dump.rb generates output for two below files.

  2. info_dump_ruby_from_su.txt - generated by stand-alone ruby install run from the SU Ruby Console.

  3. info_dump_ruby.txt - generated by stand-alone ruby.

So, regarding your phrase ‘This applies only to’, you’ll notice that the environment that is passed to stand-alone ruby run from SU is not the same as the environment when run outside of SU. In particular, ENV[‘SSL_CERT_FILE’] is set to the SU location.

Hence, any apps shelled out to from ruby in SU do not receive an environment that is the same as if they were run stand-alone.

BTW, if you’re aware of the cert file, why was SU2017 released with one dated 2014-09-03? Of course, we won’t even talk about the version of OpenSSL, etc.

info_dump_ruby_from_su.txt (3.5 KB)
info_dump_ruby.txt (3.3 KB)
info_dump.rb (2.4 KB)

Below is the ‘Native Ruby’ section of what I’m currently using in SU2017:

-------------------------------------------------------------------- Native Ruby
ruby 2.3.5p310 (2017-05-01) [x64-mingw32]

Gem::VERSION     2.5.2
DBM::VERSION     GDBM version 1.10. 13/11/2011 (built Apr  3 2017 16:32:08)
GDBM::VERSION    GDBM version 1.10. 13/11/2011 (built Apr  3 2017 16:32:08)

OpenSSL::VERSION              1.1.0
    OPENSSL_VERSION           OpenSSL 1.0.2k  26 Jan 2017
    OPENSSL_LIBRARY_VERSION   OpenSSL 1.0.2k  26 Jan 2017

Psych::VERSION                2.1.0          LIBYAML_VERSION  0.1.7
Readline::VERSION (ext)       7.0
Zlib::ZLIB_VERSION            1.2.11

Socket                        Ok
Win32::Registry               Ok
WIN32OLE                      Ok

From initial testing (more to come) everything works fine. In case you’re wondering, OpenSSL 1.1.0 will only work with Ruby 2.4+. And, 2.4+ will not work with SU due the Integer issue.

But, since 2.3 works with SU, it would allow plug-in devs to start testing with # frozen_string_literal: true. There’s also 147 warnings generated by code included with SU…

Ruby v2.2 - trunk docs