Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with OpenSSL v3 #526

Open
andyundso opened this issue Jan 16, 2023 · 2 comments
Open

Compatibility with OpenSSL v3 #526

andyundso opened this issue Jan 16, 2023 · 2 comments

Comments

@andyundso
Copy link
Contributor

I dived into the reported issues with Ruby 3.1 that @bryanwieg describes at #523 and I'm mostly sure it is because of OpenSSL v3 and not Ruby 3.1.

First, I replicated the commands from the CI on my machine with Docker, but using Ruby 3.1.

docker exec -it cimg_ruby ruby -v
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux]

First, I compiled OpenSSL as on the CI.

docker exec cimg_ruby bash -c 'sudo -E ./test/bin/install-openssl.sh'
+ set -e
+ '[' -z '' ']'
++ ruby -r ./ext/tiny_tds/extconsts.rb -e 'puts OPENSSL_VERSION'
+ OPENSSL_VERSION=1.1.1s
....

Then installed FreeTDS, which seems to link against OpenSSL v3 instead of 1.1.1:

docker exec cimg_ruby bash -c 'sudo -E ./test/bin/install-freetds.sh'
+ set -e
+ '[' -z '' ']'
++ ruby -r ./ext/tiny_tds/extconsts.rb -e 'puts FREETDS_VERSION'
+ FREETDS_VERSION=1.1.24
+ wget http://www.freetds.org/files/stable/freetds-1.1.24.tar.gz
....
/usr/include/openssl/rand.h:79:29: note: declared here
   79 | OSSL_DEPRECATEDIN_1_1_0 int RAND_pseudo_bytes(unsigned char *buf, int num);
      |                             ^~~~~~~~~~~~~~~~~
  CC       sec_negotiate.lo
In file included from sec_negotiate.c:45:
sec_negotiate_openssl.h: In function ‘rsa_get_n’:
sec_negotiate_openssl.h:45:9: warning: ‘RSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   45 |         RSA_get0_key(rsa, &n, &e, &d);
      |         ^~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
                 from /usr/include/openssl/pem.h:23,
                 from sec_negotiate_openssl.h:22,
                 from sec_negotiate.c:45:
...

Confirmation of the version:

docker exec cimg_ruby bash -c 'sudo dpkg -l | grep openssl'
ii  libcurl4-openssl-dev:amd64    7.81.0-1ubuntu1.6                       amd64        development files and documentation for libcurl (OpenSSL flavour)
ii  openssl                       3.0.2-0ubuntu1.7                        amd64        Secure Sockets Layer toolkit - cryptographic utility

Continuing building and running the tests then ends up in the situation described in the PR that all tests fail.

However, if I first compile the ports that tiny_tds specifies and then run the tests, all works fine.

$ docker exec cimg_ruby bash -c 'bundle exec rake ports'
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:29: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:44: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
Compiling ports for x86_64-pc-linux-gnu...
Extracting openssl-1.1.1s.tar.gz into tmp/x86_64-pc-linux-gnu/ports/openssl/1.1.1s... OK
Running 'configure' for openssl 1.1.1s... OK
Running 'compile' for openssl 1.1.1s... OK
Running 'install' for openssl 1.1.1s... OK
Activating openssl 1.1.1s (from ports/x86_64-pc-linux-gnu/openssl/1.1.1s)...
Downloading libiconv-1.15.tar.gz (100%) 
Extracting libiconv-1.15.tar.gz into tmp/x86_64-pc-linux-gnu/ports/libiconv/1.15... OK
Running 'compile' for libiconv 1.15... OK
Running 'install' for libiconv 1.15... OK
Activating libiconv 1.15 (from ports/x86_64-pc-linux-gnu/libiconv/1.15)...
Downloading freetds-1.1.24.tar.bz2 (100%) 
Extracting freetds-1.1.24.tar.bz2 into tmp/x86_64-pc-linux-gnu/ports/freetds/1.1.24... OK
Running 'compile' for freetds 1.1.24... OK
Running 'install' for freetds 1.1.24... OK
Activating freetds 1.1.24 (from ports/x86_64-pc-linux-gnu/freetds/1.1.24)...
$ docker exec cimg_ruby bash -c 'bundle exec rake build'
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:29: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:44: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/usr/local/bin/ruby -I. -r.rake-compiler-siteconf.rb ../../../../ext/tiny_tds/extconf.rb
mkdir -p tmp/x86_64-linux/tiny_tds/3.1.3
cd tmp/x86_64-linux/tiny_tds/3.1.3
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:29: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:44: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
looking for freetds headers in the following directories:
 - /home/circleci/project/ports/x86_64-pc-linux-gnu/freetds/1.1.24/include
 - /home/circleci/project/ports/x86_64-pc-linux-gnu/freetds/1.1.24/include/freetds
 - /opt/local/include
 - /opt/local/include/freetds
 - /usr/local/include
 - /usr/local/include/freetds
looking for freetds library in the following directories:
 - /home/circleci/project/ports/x86_64-pc-linux-gnu/freetds/1.1.24/lib
 - /home/circleci/project/ports/x86_64-pc-linux-gnu/freetds/1.1.24/lib/freetds
 - /opt/local/lib
 - /opt/local/lib/freetds
 - /usr/local/lib
 - /usr/local/lib/freetds
checking for sybfront.h... yes
checking for sybdb.h... yes
checking for tdsdbopen() in -lsybdb... yes
checking for dbanydatecrack() in -lsybdb... yes
creating Makefile
/usr/bin/gmake
cd -
cd tmp/x86_64-linux/tiny_tds/3.1.3
compiling ../../../../ext/tiny_tds/client.c
../../../../ext/tiny_tds/client.c: In function ‘init_tinytds_client’:
../../../../ext/tiny_tds/client.c:448:6: warning: old-style function definition [-Wold-style-definition]
  448 | void init_tinytds_client() {
      |      ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/string.h:535,
                 from /usr/local/include/ruby-3.1.0/ruby/defines.h:39,
                 from /usr/local/include/ruby-3.1.0/ruby/ruby.h:25,
                 from /usr/local/include/ruby-3.1.0/ruby.h:38,
                 from ../../../../ext/tiny_tds/tiny_tds_ext.h:7,
                 from ../../../../ext/tiny_tds/client.c:1:
In function ‘strncpy’,
    inlined from ‘tinytds_err_handler’ at ../../../../ext/tiny_tds/client.c:126:3:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: warning: ‘__builtin_strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   96 |                                   __glibc_objsize (__dest));
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: warning: ‘__builtin_strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation]
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: warning: ‘__builtin_strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation]
In function ‘strncpy’,
    inlined from ‘tinytds_msg_handler’ at ../../../../ext/tiny_tds/client.c:161:3:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: warning: ‘__builtin_strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   96 |                                   __glibc_objsize (__dest));
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../ext/tiny_tds/client.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
compiling ../../../../ext/tiny_tds/result.c
../../../../ext/tiny_tds/result.c: In function ‘init_tinytds_result’:
../../../../ext/tiny_tds/result.c:581:6: warning: old-style function definition [-Wold-style-definition]
  581 | void init_tinytds_result() {
      |      ^~~~~~~~~~~~~~~~~~~
../../../../ext/tiny_tds/result.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
compiling ../../../../ext/tiny_tds/tiny_tds_ext.c
../../../../ext/tiny_tds/tiny_tds_ext.c: In function ‘Init_tiny_tds’:
../../../../ext/tiny_tds/tiny_tds_ext.c:6:6: warning: old-style function definition [-Wold-style-definition]
    6 | void Init_tiny_tds() {
      |      ^~~~~~~~~~~~~
../../../../ext/tiny_tds/tiny_tds_ext.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
linking shared-object tiny_tds/tiny_tds.so
/usr/bin/gmake install target_prefix=
cd -
mkdir -p tmp/x86_64-linux/stage/lib/tiny_tds
mkdir -p tmp/x86_64-linux/stage/.circleci
cp .circleci/config.yml tmp/x86_64-linux/stage/.circleci/config.yml
cp .codeclimate.yml tmp/x86_64-linux/stage/.codeclimate.yml
cp .gitattributes tmp/x86_64-linux/stage/.gitattributes
cp .gitignore tmp/x86_64-linux/stage/.gitignore
cp .rubocop.yml tmp/x86_64-linux/stage/.rubocop.yml
cp CHANGELOG.md tmp/x86_64-linux/stage/CHANGELOG.md
cp CODE_OF_CONDUCT.md tmp/x86_64-linux/stage/CODE_OF_CONDUCT.md
cp Gemfile tmp/x86_64-linux/stage/Gemfile
cp ISSUE_TEMPLATE.md tmp/x86_64-linux/stage/ISSUE_TEMPLATE.md
cp MIT-LICENSE tmp/x86_64-linux/stage/MIT-LICENSE
cp README.md tmp/x86_64-linux/stage/README.md
cp Rakefile tmp/x86_64-linux/stage/Rakefile
cp VERSION tmp/x86_64-linux/stage/VERSION
mkdir -p tmp/x86_64-linux/stage/bin
cp bin/defncopy-ttds tmp/x86_64-linux/stage/bin/defncopy-ttds
cp bin/tsql-ttds tmp/x86_64-linux/stage/bin/tsql-ttds
cp docker-compose.yml tmp/x86_64-linux/stage/docker-compose.yml
mkdir -p tmp/x86_64-linux/stage/exe
cp exe/.keep tmp/x86_64-linux/stage/exe/.keep
mkdir -p tmp/x86_64-linux/stage/ext/tiny_tds
cp ext/tiny_tds/client.c tmp/x86_64-linux/stage/ext/tiny_tds/client.c
cp ext/tiny_tds/client.h tmp/x86_64-linux/stage/ext/tiny_tds/client.h
cp ext/tiny_tds/extconf.rb tmp/x86_64-linux/stage/ext/tiny_tds/extconf.rb
cp ext/tiny_tds/extconsts.rb tmp/x86_64-linux/stage/ext/tiny_tds/extconsts.rb
cp ext/tiny_tds/result.c tmp/x86_64-linux/stage/ext/tiny_tds/result.c
cp ext/tiny_tds/result.h tmp/x86_64-linux/stage/ext/tiny_tds/result.h
cp ext/tiny_tds/tiny_tds_ext.c tmp/x86_64-linux/stage/ext/tiny_tds/tiny_tds_ext.c
cp ext/tiny_tds/tiny_tds_ext.h tmp/x86_64-linux/stage/ext/tiny_tds/tiny_tds_ext.h
cp lib/tiny_tds.rb tmp/x86_64-linux/stage/lib/tiny_tds.rb
cp lib/tiny_tds/bin.rb tmp/x86_64-linux/stage/lib/tiny_tds/bin.rb
cp lib/tiny_tds/client.rb tmp/x86_64-linux/stage/lib/tiny_tds/client.rb
cp lib/tiny_tds/error.rb tmp/x86_64-linux/stage/lib/tiny_tds/error.rb
cp lib/tiny_tds/gem.rb tmp/x86_64-linux/stage/lib/tiny_tds/gem.rb
cp lib/tiny_tds/result.rb tmp/x86_64-linux/stage/lib/tiny_tds/result.rb
cp lib/tiny_tds/version.rb tmp/x86_64-linux/stage/lib/tiny_tds/version.rb
mkdir -p tmp/x86_64-linux/stage/patches/freetds/1.00.27
cp patches/freetds/1.00.27/0001-mingw_missing_inet_pton.diff tmp/x86_64-linux/stage/patches/freetds/1.00.27/0001-mingw_missing_inet_pton.diff
cp patches/freetds/1.00.27/0002-Don-t-use-MSYS2-file-libws2_32.diff tmp/x86_64-linux/stage/patches/freetds/1.00.27/0002-Don-t-use-MSYS2-file-libws2_32.diff
mkdir -p tmp/x86_64-linux/stage/patches/libiconv/1.14
cp patches/libiconv/1.14/1-avoid-gets-error.patch tmp/x86_64-linux/stage/patches/libiconv/1.14/1-avoid-gets-error.patch
cp setup_cimgruby_dev.sh tmp/x86_64-linux/stage/setup_cimgruby_dev.sh
cp start_dev.sh tmp/x86_64-linux/stage/start_dev.sh
mkdir -p tmp/x86_64-linux/stage/tasks
cp tasks/native_gem.rake tmp/x86_64-linux/stage/tasks/native_gem.rake
cp tasks/package.rake tmp/x86_64-linux/stage/tasks/package.rake
cp tasks/ports.rake tmp/x86_64-linux/stage/tasks/ports.rake
mkdir -p tmp/x86_64-linux/stage/tasks/ports
cp tasks/ports/freetds.rb tmp/x86_64-linux/stage/tasks/ports/freetds.rb
cp tasks/ports/libiconv.rb tmp/x86_64-linux/stage/tasks/ports/libiconv.rb
cp tasks/ports/openssl.rb tmp/x86_64-linux/stage/tasks/ports/openssl.rb
cp tasks/ports/recipe.rb tmp/x86_64-linux/stage/tasks/ports/recipe.rb
cp tasks/test.rake tmp/x86_64-linux/stage/tasks/test.rake
mkdir -p tmp/x86_64-linux/stage/test/benchmark
cp test/benchmark/query.rb tmp/x86_64-linux/stage/test/benchmark/query.rb
cp test/benchmark/query_odbc.rb tmp/x86_64-linux/stage/test/benchmark/query_odbc.rb
cp test/benchmark/query_tinytds.rb tmp/x86_64-linux/stage/test/benchmark/query_tinytds.rb
mkdir -p tmp/x86_64-linux/stage/test/bin
cp test/bin/install-freetds.sh tmp/x86_64-linux/stage/test/bin/install-freetds.sh
cp test/bin/install-mssql.ps1 tmp/x86_64-linux/stage/test/bin/install-mssql.ps1
cp test/bin/install-mssqltools.sh tmp/x86_64-linux/stage/test/bin/install-mssqltools.sh
cp test/bin/install-openssl.sh tmp/x86_64-linux/stage/test/bin/install-openssl.sh
cp test/bin/setup_tinytds_db.sh tmp/x86_64-linux/stage/test/bin/setup_tinytds_db.sh
cp test/bin/setup_volume_permissions.sh tmp/x86_64-linux/stage/test/bin/setup_volume_permissions.sh
cp test/client_test.rb tmp/x86_64-linux/stage/test/client_test.rb
cp test/gem_test.rb tmp/x86_64-linux/stage/test/gem_test.rb
cp test/result_test.rb tmp/x86_64-linux/stage/test/result_test.rb
mkdir -p tmp/x86_64-linux/stage/test/schema
cp test/schema/1px.gif tmp/x86_64-linux/stage/test/schema/1px.gif
cp test/schema/sqlserver_2000.sql tmp/x86_64-linux/stage/test/schema/sqlserver_2000.sql
cp test/schema/sqlserver_2005.sql tmp/x86_64-linux/stage/test/schema/sqlserver_2005.sql
cp test/schema/sqlserver_2008.sql tmp/x86_64-linux/stage/test/schema/sqlserver_2008.sql
cp test/schema/sqlserver_2014.sql tmp/x86_64-linux/stage/test/schema/sqlserver_2014.sql
cp test/schema/sqlserver_2016.sql tmp/x86_64-linux/stage/test/schema/sqlserver_2016.sql
cp test/schema/sqlserver_azure.sql tmp/x86_64-linux/stage/test/schema/sqlserver_azure.sql
cp test/schema/sybase_ase.sql tmp/x86_64-linux/stage/test/schema/sybase_ase.sql
cp test/schema_test.rb tmp/x86_64-linux/stage/test/schema_test.rb
mkdir -p tmp/x86_64-linux/stage/test/sql
cp test/sql/db-create.sql tmp/x86_64-linux/stage/test/sql/db-create.sql
cp test/sql/db-login.sql tmp/x86_64-linux/stage/test/sql/db-login.sql
cp test/test_helper.rb tmp/x86_64-linux/stage/test/test_helper.rb
cp test/thread_test.rb tmp/x86_64-linux/stage/test/thread_test.rb
cp tiny_tds.gemspec tmp/x86_64-linux/stage/tiny_tds.gemspec
/usr/bin/install -c -m 0755 tiny_tds.so /home/circleci/project/lib/tiny_tds
cp tmp/x86_64-linux/tiny_tds/3.1.3/tiny_tds.so tmp/x86_64-linux/stage/lib/tiny_tds/tiny_tds.so
$ docker exec cimg_ruby bash -c 'TINYTDS_UNIT_HOST=sqlserver bundle exec rake test'
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:29: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:44: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/usr/local/bin/ruby -w -I"lib:test" /usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb "test/client_test.rb" "test/gem_test.rb" "test/result_test.rb" "test/schema_test.rb" "test/thread_test.rb" -v
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:29: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:44: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Object#untaint is deprecated and will be removed in Ruby 3.2
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/dsl.rb:47: warning: Object#untaint is deprecated and will be removed in Ruby 3.2
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Object#untaint is deprecated and will be removed in Ruby 3.2
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:272: warning: Object#untaint is deprecated and will be removed in Ruby 3.2
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/rubygems_ext.rb:51: warning: Object#untaint is deprecated and will be removed in Ruby 3.2
/home/circleci/.rubygems/gems/bundler-1.17.3/lib/bundler/rubygems_ext.rb:51: warning: Object#untaint is deprecated and will be removed in Ruby 3.2
Run options: -v --seed 46784

# Running:

TinyTds::Gem::#ports_host::on a x86_64-w64-mingw32 architecture#test_0001_should return a x86_64-w64-mingw32 ports host = 0.00 s = .
TinyTds::Gem::#ports_host::on a x86_64-pc-linux-gnu architecture#test_0001_should return a x86_64-pc-linux-gnu ports host = 0.00 s = .
#parse_username#test_0003_returns full username if azure is false = 0.05 s = .
#parse_username#test_0005_returns username with servername if passed and azure is true = 0.01 s = .
#parse_username#test_0006_returns username with servername if passed and azure is false = 0.01 s = .
#parse_username#test_0002_returns short username if azure is true = 0.01 s = .
#parse_username#test_0004_returns short username if passed and azure is true = 0.01 s = .
#parse_username#test_0001_returns username if azure is not true = 0.01 s = .
Casting SQL Server schema::for 2005 and up#test_0003_casts varchar(max) = 0.10 s = .
Casting SQL Server schema::for 2005 and up#test_0004_casts xml = 0.01 s = .
Casting SQL Server schema::for 2005 and up#test_0001_casts nvarchar(max) = 0.01 s = .
Casting SQL Server schema::for 2005 and up#test_0002_casts varbinary(max) = 0.01 s = .
TinyTds::Gem::#ports_root_path#test_0002_should be the ports path no matter the cwd = 0.00 s = .
TinyTds::Gem::#ports_root_path#test_0001_should be the ports path = 0.00 s = .
Basic query and result::with data type::char max#test_0001_must insert and select large varchar_max = 0.20 s = .
Basic query and result::with data type::char max#test_0002_must insert and select large nvarchar_max = 0.10 s = .
Casting SQL Server schema::for 2008 and up#test_0004_casts datetimeoffset = 0.01 s = .
Casting SQL Server schema::for 2008 and up#test_0002_casts time = 0.01 s = .
Casting SQL Server schema::for 2008 and up#test_0001_casts date = 0.01 s = .
Casting SQL Server schema::for 2008 and up#test_0003_casts datetime2 = 0.01 s = .
Basic query and result::with multiple result sets::using :empty_sets FALSE#test_0001_handles a basic empty result set = 0.02 s = .
Basic query and result::with multiple result sets::using :empty_sets FALSE#test_0003_must not include empty result sets by default - using 2nd empty buffer = 0.02 s = .
Basic query and result::with multiple result sets::using :empty_sets FALSE#test_0004_must not include empty result sets by default - using 3rd empty buffer = 0.02 s = .
Basic query and result::with multiple result sets::using :empty_sets FALSE#test_0002_must not include empty result sets by default - using 1st empty buffer = 0.02 s = .
....

The tests using toxiproxy on my Mac fail as Docker on Mac does not support network_mode: host, but everything else looks good.

I also looked a bit through the issues over at freetds and it seems that most people where their distribution ships OpenSSL v3 now switch to GnuTLS.

I'm wondering what should be the approach that tiny_tds recommends? Compile and install OpenSSL v1? Generally switch to GnuTLS?

@bryanwieg
Copy link
Contributor

Ahh, good point about OpenSSL v3, I hadn’t even thought of it.

I don’t know that I personally know a lot either way. I can say anecdotally that I’ve used OpenSSL v3 in a few things, and while it’s great in most cases, occasionally it has its own bugs. But, that may not ever affect FreeTDS implementation.

But also that I researched this, most of projects that ran into this issue with FreeTDS simply handled it by switching on gnutls. None mentioned trying OpenSSL 3. Unfortunately I’m not a FreeTDS expert myself.

It may be helpful to ask this in the FreeTDS repo.

@andyundso
Copy link
Contributor Author

I think FreeTDS/freetds#474 could fix the issue - the stack trace posted in the PR mentiones OpenSSL v3. would require us to bump FreeTDS to at least v1.3.16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants