Code Monkey home page Code Monkey logo

bcrypt_pbkdf-ruby's Introduction

Gem Version Join the chat at https://gitter.im/net-ssh/net-ssh Build status Coverage status Backers on Open Collective Sponsors on Open Collective

Net::SSH 7.x

As of v2.6.4, all gem releases are signed. See INSTALL.

DESCRIPTION:

Net::SSH is a pure-Ruby implementation of the SSH2 client protocol. It allows you to write programs that invoke and interact with processes on remote servers, via SSH2.

FEATURES:

  • Execute processes on remote servers and capture their output
  • Run multiple processes in parallel over a single SSH connection
  • Support for SSH subsystems
  • Forward local and remote ports via an SSH connection

Supported Algorithms

Net::SSH 6.0 disables by default the usage of weak algorithms. We strongly recommend that you install a servers's version that supports the latest algorithms.

It is possible to return to the previous behavior by adding the option : append_all_supported_algorithms: true

Unsecure algoritms will definitely be removed in Net::SSH 8.*.

Host Keys

Name Support Details
ssh-rsa OK
ssh-ed25519 OK Require the gem ed25519
ecdsa-sha2-nistp521 OK using weak elliptic curves
ecdsa-sha2-nistp384 OK using weak elliptic curves
ecdsa-sha2-nistp256 OK using weak elliptic curves
ssh-dss Deprecated in 6.0 unsecure, will be removed in 8.0

Key Exchange

Name Support Details
curve25519-sha256 OK Require the gem x25519
ecdh-sha2-nistp521 OK using weak elliptic curves
ecdh-sha2-nistp384 OK using weak elliptic curves
ecdh-sha2-nistp256 OK using weak elliptic curves
diffie-hellman-group1-sha1 Deprecated in 6.0 unsecure, will be removed in 8.0
diffie-hellman-group14-sha1 OK
diffie-hellman-group-exchange-sha1 Deprecated in 6.0 unsecure, will be removed in 8.0
diffie-hellman-group-exchange-sha256 OK

Encryption algorithms (ciphers)

Name Support Details
aes256-ctr / aes192-ctr / aes128-ctr OK
[email protected] OK. Requires the gem rbnacl
aes256-cbc / aes192-cbc / aes128-cbc Deprecated in 6.0 unsecure, will be removed in 8.0
[email protected] Deprecated in 6.0 unsecure, will be removed in 8.0
blowfish-ctr blowfish-cbc Deprecated in 6.0 unsecure, will be removed in 8.0
cast128-ctr cast128-cbc Deprecated in 6.0 unsecure, will be removed in 8.0
3des-ctr 3des-cbc Deprecated in 6.0 unsecure, will be removed in 8.0
idea-cbc Deprecated in 6.0 unsecure, will be removed in 8.0
none Deprecated in 6.0 unsecure, will be removed in 8.0

Message Authentication Code algorithms

Name Support Details
hmac-sha2-512-etm OK
hmac-sha2-256-etm OK
hmac-sha2-512 OK
hmac-sha2-256 OK
hmac-sha2-512-96 Deprecated in 6.0 removed from the specification, will be removed in 8.0
hmac-sha2-256-96 Deprecated in 6.0 removed from the specification, will be removed in 8.0
hmac-sha1 OK for backward compatibility
hmac-sha1-96 Deprecated in 6.0 unsecure, will be removed in 8.0
hmac-ripemd160 Deprecated in 6.0 unsecure, will be removed in 8.0
hmac-md5 Deprecated in 6.0 unsecure, will be removed in 8.0
hmac-md5-96 Deprecated in 6.0 unsecure, will be removed in 8.0
none Deprecated in 6.0 unsecure, will be removed in 8.0

SYNOPSIS:

In a nutshell:

require 'net/ssh'

Net::SSH.start('host', 'user', password: "password") do |ssh|

# capture all stderr and stdout output from a remote process
output = ssh.exec!("hostname")
puts output

# capture only stdout matching a particular pattern
stdout = ""
ssh.exec!("ls -l /home/jamis") do |channel, stream, data|
  stdout << data if stream == :stdout && /foo/.match(data)
end
puts stdout

# run multiple processes in parallel to completion
ssh.exec "sed ..."
ssh.exec "awk ..."
ssh.exec "rm -rf ..."
ssh.loop

# open a new channel and configure a minimal set of callbacks, then run
# the event loop until the channel finishes (closes)
channel = ssh.open_channel do |ch|
  ch.exec "/usr/local/bin/ruby /path/to/file.rb" do |ch, success|
    raise "could not execute command" unless success

    # "on_data" is called when the process writes something to stdout
    ch.on_data do |c, data|
      $stdout.print data
    end

    # "on_extended_data" is called when the process writes something to stderr
    ch.on_extended_data do |c, type, data|
      $stderr.print data
    end

    ch.on_close { puts "done!" }
  end
end

channel.wait

# forward connections on local port 1234 to port 80 of www.capify.org
ssh.forward.local(1234, "www.capify.org", 80)
ssh.loop { true }
end

See Net::SSH for more documentation, and links to further information.

REQUIREMENTS:

The only requirement you might be missing is the OpenSSL bindings for Ruby with a version greather than 1.0.1. These are built by default on most platforms, but you can verify that they're built and installed on your system by running the following command line:

ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION'

If that spits out something like OpenSSL 1.0.1 14 Mar 2012, then you're set. If you get an error, then you'll need to see about rebuilding ruby with OpenSSL support, or (if your platform supports it) installing the OpenSSL bindings separately.

INSTALL:

gem install net-ssh # might need sudo privileges

NOTE: If you are running on jruby on windows you need to install jruby-pageant manually (gemspec doesn't allow for platform specific dependencies at gem installation time).

However, in order to be sure the code you're installing hasn't been tampered with, it's recommended that you verify the signature. To do this, you need to add my public key as a trusted certificate (you only need to do this once):

# Add the public key as a trusted certificate
# (You only need to do this once)
curl -O https://raw.githubusercontent.com/net-ssh/net-ssh/master/net-ssh-public_cert.pem
gem cert --add net-ssh-public_cert.pem

Then, when install the gem, do so with high security:

gem install net-ssh -P HighSecurity

If you don't add the public key, you'll see an error like "Couldn't verify data signature". If you're still having trouble let me know and I'll give you a hand.

For ed25519 public key auth support your bundle file should contain ed25519, bcrypt_pbkdf dependencies.

gem install ed25519
gem install bcrypt_pbkdf

For curve25519-sha256 kex exchange support your bundle file should contain x25519 dependency.

RUBY SUPPORT

RUNNING TESTS

If you want to run the tests or use any of the Rake tasks, you'll need Mocha and other dependencies listed in Gemfile

Run the test suite from the net-ssh directory with the following command:

bundle exec rake test

NOTE : you can run test on all ruby versions with docker :

docker-compose up --build

Run a single test file like this:

ruby -Ilib -Itest test/transport/test_server_version.rb

To run integration tests see here

BUILDING GEM

rake build

GEM SIGNING (for maintainers)

If you have the net-ssh private signing key, you will be able to create signed release builds. Make sure the private key path matches the signing_key path set in net-ssh.gemspec and tell rake to sign the gem by setting the NET_SSH_BUILDGEM_SIGNED flag:

NET_SSH_BUILDGEM_SIGNED=true rake build

For time to time, the public certificate associated to the private key needs to be renewed. You can do this with the following command:

gem cert --build [email protected] --private-key path/2/net-ssh-private_key.pem
mv gem-public_cert.pem net-ssh-public_cert.pem
gem cert --add net-ssh-public_cert.pem

or rake cert:update_public_when_expired

Security contact information

See SECURITY.md

CREDITS

Contributors

This project exists thanks to all the people who contribute.

contributors

Backers

Thank you to all our backers! ๐Ÿ™ Become a backer

backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. Become a sponsor

Sponsor

LICENSE:

(The MIT License)

Copyright (c) 2008 Jamis Buck

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

bcrypt_pbkdf-ruby's People

Contributors

bjfish avatar edwardbetts avatar fundsaccess-dco avatar h0tw1r3 avatar marcparadise avatar mfazekas avatar mtasaka avatar porkotron avatar sled avatar ujjwalsh avatar unit193 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bcrypt_pbkdf-ruby's Issues

symbol lookup error: bcrypt_pbkdf_ext.so: undefined symbol: SHA512Init

Hi,

we're experiencing an issue when bcrypt_pbkdf-ruby is built on a bitnami docker image (bitnami/ruby:2.5.8-prod-debian-10-r236), it compiles fine but fails at runtime with:

symbol lookup error: /app/lib/bcrypt_pbkdf_ext.so: undefined symbol: SHA512Init

However if compiled with the "standard" ruby image (ruby:2.5.8) it works fine.

Both docker images use the same OpenSSL version (OpenSSL 1.1.1d 10 Sep 2019) and same GCC version (version 8.3.0 (Debian 8.3.0-6))

In order to reproduce it I created two Dockerfiles:

bitnami/ruby:2.5.8-prod-debian-10-r236

FROM bitnami/ruby:2.5.8-prod-debian-10-r236

RUN apt-get update \
        && apt-get install -y --no-install-recommends --no-install-suggests \
                            build-essential \
                            git \
                            openssh-client \
        && gem install bundler -v 1.17.3

WORKDIR /app

RUN git clone https://github.com/net-ssh/bcrypt_pbkdf-ruby.git /app \
    && git checkout v1.0.1 \
    && bundle

RUN rake compile
RUN rake test

CMD ["/bin/bash"]

ruby:2.5.8

FROM ruby:2.5.8

RUN apt-get update \
	 && apt-get install -y --no-install-recommends --no-install-suggests \
                             build-essential \
                             git \
                             openssh-client \
         && gem install bundler -v 1.17.3

RUN mkdir /app

WORKDIR /app

RUN git clone https://github.com/net-ssh/bcrypt_pbkdf-ruby.git /app \
         && git checkout v1.0.1 \
         && bundle

RUN rake compile
RUN rake test

CMD ["/bin/bash"]

When I inspect the built "bcrypt_pbkdf_ext.so" using nm on the bitnami container I get:

root@5a6e512b11bb:/app/lib# nm -gD bcrypt_pbkdf_ext.so
0000000000002491 T Blowfish_decipher
0000000000001b1f T Blowfish_encipher
0000000000002ee7 T Blowfish_expand0state
0000000000003061 T Blowfish_expandstate
0000000000002e03 T Blowfish_initstate
0000000000002e64 T Blowfish_stream2word
0000000000001a9a T Init_bcrypt_pbkdf_ext
                 U SHA512Final
                 U SHA512Init
                 U SHA512Update
                 w _ITM_deregisterTMCloneTable
                 w _ITM_registerTMCloneTable
                 w __cxa_finalize
                 w __gmon_start__
0000000000001295 T bcrypt_hash
0000000000001504 T bcrypt_pbkdf
00000000000037ea T blf_cbc_decrypt
000000000000363d T blf_cbc_encrypt
0000000000003317 T blf_dec
00000000000034d9 T blf_ecb_decrypt
0000000000003375 T blf_ecb_encrypt
00000000000032b9 T blf_enc
000000000000327d T blf_key
000000000000985b T crypto_hash_sha512
000000000000980f T crypto_hash_sha512_final
0000000000009649 T crypto_hash_sha512_init
0000000000009690 T crypto_hash_sha512_update
0000000000003b1b T explicit_bzero
                 U memcpy
                 U memset
                 U rb_cObject
                 U rb_define_class_under
                 U rb_define_module
                 U rb_define_singleton_method
                 U rb_num2ulong
                 U rb_str_new
                 U rb_string_value_ptr
                 U ruby_xfree
                 U ruby_xmalloc

On the "standard" ruby container I get:

root@ec3d13ecaef3:/app/lib# nm -gD bcrypt_pbkdf_ext.so
0000000000001c80 T Blowfish_decipher
0000000000001880 T Blowfish_encipher
0000000000002160 T Blowfish_expand0state
0000000000002260 T Blowfish_expandstate
0000000000002080 T Blowfish_initstate
00000000000020c0 T Blowfish_stream2word
0000000000001810 T Init_bcrypt_pbkdf_ext
                 w _ITM_deregisterTMCloneTable
                 w _ITM_registerTMCloneTable
                 w __cxa_finalize
                 w __gmon_start__
0000000000001270 T bcrypt_hash
00000000000013c0 T bcrypt_pbkdf
0000000000002750 T blf_cbc_decrypt
0000000000002610 T blf_cbc_encrypt
0000000000002460 T blf_dec
0000000000002560 T blf_ecb_decrypt
00000000000024b0 T blf_ecb_encrypt
0000000000002410 T blf_enc
00000000000023e0 T blf_key
0000000000005d30 T crypto_hash_sha512
0000000000005c50 T crypto_hash_sha512_final
0000000000005a20 T crypto_hash_sha512_init
0000000000005a60 T crypto_hash_sha512_update
0000000000002900 T explicit_bzero
                 U memcpy
                 U memset
                 U rb_cObject
                 U rb_define_class_under
                 U rb_define_module
                 U rb_define_singleton_method
                 U rb_num2ulong
                 U rb_str_new
                 U rb_string_value_ptr
                 U ruby_xfree
                 U ruby_xmalloc

The problem seems to be with the inline functions SHA512Final, SHA512Init, SHA512Update defined in https://github.com/net-ssh/bcrypt_pbkdf-ruby/blob/v1.0.1/ext/mri/sha2.h

Inside the bitnami image, those inline methods end up as undefined symbols while inside the "standard" ruby image the inlining seems to work properly.

My simple fix was to declare those inline functions as inline static (see v1.0.1...at-point:fix-inline-static)

cannot load such file - ruby 3.0 - windows

How to reproduce:

  1. Create a new rails app: rails new app_name
  2. add the following gems in the Gemfile:
    gem 'net-sftp', '>4.0.0'
    gem 'ed25519', '
    >1.2.0'
    gem 'bcrypt_pbkdf', '~>1.1.0'
  3. bundle
  4. rails c

The output:
C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in require': cannot load such file -- bcrypt_pbkdf_ext (LoadError) from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in require'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.7.3/lib/active_support/dependencies.rb:332:in block in require' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.7.3/lib/active_support/dependencies.rb:299:in load_dependency'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.7.3/lib/active_support/dependencies.rb:332:in require' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bcrypt_pbkdf-1.1.0-x64-mingw32/lib/bcrypt_pbkdf.rb:5:in rescue in '
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bcrypt_pbkdf-1.1.0-x64-mingw32/lib/bcrypt_pbkdf.rb:1:in <main>' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bundler-2.3.3/lib/bundler/runtime.rb:60:in block (2 levels) in require'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bundler-2.3.3/lib/bundler/runtime.rb:55:in each' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bundler-2.3.3/lib/bundler/runtime.rb:55:in block in require'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bundler-2.3.3/lib/bundler/runtime.rb:44:in each' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bundler-2.3.3/lib/bundler/runtime.rb:44:in require'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bundler-2.3.3/lib/bundler.rb:176:in require' from C:/Temp/test-gem/config/application.rb:7:in '
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/railties-6.1.7.3/lib/rails/command/actions.rb:22:in require_application!' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/railties-6.1.7.3/lib/rails/command/actions.rb:14:in require_application_and_environment!'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/railties-6.1.7.3/lib/rails/commands/console/console_command.rb:101:in perform' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in run'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in invoke_command' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in dispatch'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/railties-6.1.7.3/lib/rails/command/base.rb:69:in perform' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/railties-6.1.7.3/lib/rails/command.rb:48:in invoke'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/railties-6.1.7.3/lib/rails/commands.rb:18:in <main>' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' from bin/rails:4:in '
C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in require': cannot load such file -- 3.0/bcrypt_pbkdf_ext (LoadError) from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in require'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.7.3/lib/active_support/dependencies.rb:332:in block in require' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.7.3/lib/active_support/dependencies.rb:299:in load_dependency'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/activesupport-6.1.7.3/lib/active_support/dependencies.rb:332:in require' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bcrypt_pbkdf-1.1.0-x64-mingw32/lib/bcrypt_pbkdf.rb:3:in '
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bundler-2.3.3/lib/bundler/runtime.rb:60:in block (2 levels) in require' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bundler-2.3.3/lib/bundler/runtime.rb:55:in each'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bundler-2.3.3/lib/bundler/runtime.rb:55:in block in require' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bundler-2.3.3/lib/bundler/runtime.rb:44:in each'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bundler-2.3.3/lib/bundler/runtime.rb:44:in require' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bundler-2.3.3/lib/bundler.rb:176:in require'
from C:/Temp/test-gem/config/application.rb:7:in <main>' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/railties-6.1.7.3/lib/rails/command/actions.rb:22:in require_application!'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/railties-6.1.7.3/lib/rails/command/actions.rb:14:in require_application_and_environment!' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/railties-6.1.7.3/lib/rails/commands/console/console_command.rb:101:in perform'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in run' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in invoke_command'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in dispatch' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/railties-6.1.7.3/lib/rails/command/base.rb:69:in perform'
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/railties-6.1.7.3/lib/rails/command.rb:48:in invoke' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/railties-6.1.7.3/lib/rails/commands.rb:18:in '
from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' from C:/Ruby/3.0.5-1/lib/ruby/gems/3.0.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require'
from bin/rails:4:in `'

The gem does not build the "bcrypt_pbkdf_ext.so" file for ruby 3.0.
Any idea how to do this?

Release the final 1.1 release

Hey there @mfazekas,

It's been a while since the 1.1 RC release came out and we've been shipping that in Chef Infra Client without any problems. Any chance this release could get pushed up to Rubygems as full release?

installation issues with latest github actions windows 2022 runner

In the last few days, Github updated their Windows 2022 (windows-latest) runner, and it looks like something in there has broken the bcrypt_pbkdf build.

The build error I'm seeing is:

current directory:
C:/hostedtoolcache/windows/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bcrypt_pbkdf-1.1.0/ext/mri
make.exe DESTDIR\= sitearchdir\=./.gem.20240516-4380-2nneud
sitelibdir\=./.gem.20240516-4380-2nneud
generating bcrypt_pbkdf_ext-x64-mingw-ucrt.def
compiling bcrypt_pbkdf.c
compiling bcrypt_pbkdf_ext.c
compiling blowfish.c
compiling explicit_bzero.c
explicit_bzero.c: In function 'explicit_bzero':
explicit_bzero.c:18:9: error: implicit declaration of function 'bzero'
[-Wimplicit-function-declaration]
   18 |         bzero(p, n);
      |         ^~~~~
explicit_bzero.c:18:9: warning: incompatible implicit declaration of built-in
function 'bzero' [-Wbuiltin-declaration-mismatch]
make: *** [Makefile:248: explicit_bzero.o] Error 1

I'm seeing this in the integration tests for rails/tailwindcss-rails.

The runner images are described here:

I'm sorry I'm not able to narrow this down any further today.

Should we bump to 2.0?

With the planned 1.1 we might be dropping older rubies on windows. (2.0 and 2.1) while those EOL 3 years ago, we might want to bump major version.
We probably still compile/run on very old rubies, just our windows binary precompiler doesn't not build for them.

One thing is that our docs in net-ssh are documenting < 2.0, so bumping the version might be more trouble than worth.

https://github.com/net-ssh/net-ssh/blob/fc91300d7ee6299ba2fe4039cc8085aec9edb7f3/lib/net/ssh/authentication/ed25519_loader.rb#L27

unable to build on x86 (32bit)

As reported on gentoo's bug tracker, 32 bit x86 compiling is broken https://bugs.gentoo.org/629164

Including up to the latest tag

Installing bcrypt_pbkdf 1.0.1 (was 1.1.0.rc1) with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/var/tmp/portage/net-analyzer/metasploit-9999/work/all/vendor/ruby/2.5.0/gems/bcrypt_pbkdf-1.0.1/ext/mri
/usr/bin/ruby25 -r ./siteconf20200914-252-mtxmyv.rb extconf.rb
creating Makefile

current directory:
/var/tmp/portage/net-analyzer/metasploit-9999/work/all/vendor/ruby/2.5.0/gems/bcrypt_pbkdf-1.0.1/ext/mri
make "DESTDIR=" clean

current directory:
/var/tmp/portage/net-analyzer/metasploit-9999/work/all/vendor/ruby/2.5.0/gems/bcrypt_pbkdf-1.0.1/ext/mri
make "DESTDIR="
compiling bcrypt_pbkdf.c
compiling bcrypt_pbkdf_ext.c
compiling blowfish.c
compiling explicit_bzero.c
compiling hash_sha512.c
linking shared-object bcrypt_pbkdf_ext.so
/usr/lib/gcc/i686-pc-linux-gnu/9.3.0/../../../../i686-pc-linux-gnu/bin/ld:
bcrypt_pbkdf.o: in function `bcrypt_pbkdf':
bcrypt_pbkdf.c:(.text+0x221): undefined reference to `SHA512Update'
/usr/lib/gcc/i686-pc-linux-gnu/9.3.0/../../../../i686-pc-linux-gnu/bin/ld:
bcrypt_pbkdf.c:(.text+0x2b1): undefined reference to `SHA512Update'
/usr/lib/gcc/i686-pc-linux-gnu/9.3.0/../../../../i686-pc-linux-gnu/bin/ld:
bcrypt_pbkdf.c:(.text+0x2c3): undefined reference to `SHA512Update'
/usr/lib/gcc/i686-pc-linux-gnu/9.3.0/../../../../i686-pc-linux-gnu/bin/ld:
bcrypt_pbkdf.c:(.text+0x32c): undefined reference to `SHA512Update'
collect2: error: ld returned 1 exit status
make: *** [Makefile:259: bcrypt_pbkdf_ext.so] Error 1

Can you please remove the inline definitions as suggested in the gentoo bug?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.