libssh 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4aaa6647d6cc89439be59eeacbf35a3a21d72bf5
4
- data.tar.gz: fe1ea02bf8d3405739187fddcfa2064486d5db98
2
+ SHA256:
3
+ metadata.gz: 484030cf7864bb22b9a46afb3e00534b5a42afcc83e9ff42124a62636ef6b72b
4
+ data.tar.gz: 834b045234a74b7221a59ed213512c3179cf4fd02c1436246bab882e1139f47e
5
5
  SHA512:
6
- metadata.gz: ded180b1cfe0766e45e2ddefd438db49c9ca8c2a4edf2dde1fe59453274010df4d7c3a9f038224d35345285d22a6c3b7a7836b1ffb6601119ce2aa3cb464c94a
7
- data.tar.gz: 7b6fda7559baeeabe109e7ac30222335d52d930f752ae4542d51a81351d5e08e444fb48ad41826616d0b298dea8c67415e9d99f2c11b2a48d19c5e09d7a2e690
6
+ metadata.gz: 7b078df4702b81966afedea4d0e3eebf57558fde8fd31b832137accf14e7f430f77cfedc4d1f071ad4376a17755deb89086355d7f4edee4c5d023d40c31e9fa3
7
+ data.tar.gz: 39d1b54ba67f766c28f66e1286807bb614c7b2405808219f5cbb06f12a59f2ad1af2640cfca2d6f7a25d36a3d74a59186a19c1369d3008db8c3fb2c924f83f87
@@ -7,7 +7,9 @@ addons:
7
7
  - libssh-dev
8
8
  rvm:
9
9
  - 2.2
10
- - 2.3.0
10
+ - 2.3
11
+ - 2.4
12
+ - 2.5
11
13
  - ruby-head
12
14
  before_install:
13
15
  - gem install --no-rdoc --no-ri bundler
@@ -1,3 +1,6 @@
1
+ ## 0.4.0 (2018-03-03)
2
+ - Add `Session#userauth_password`
3
+
1
4
  ## 0.3.1 (2016-04-08)
2
5
  - Fix SSHKit::Backend::Libssh for SSHKit v1.9.0
3
6
  - libssh now requires SSHKit v1.9.0 or later.
@@ -529,6 +529,23 @@ static VALUE m_userauth_none(VALUE self) {
529
529
  return INT2FIX(rc);
530
530
  }
531
531
 
532
+ /*
533
+ * @overload userauth_password
534
+ * Try to authenticate through the "password" method.
535
+ * @param [String] password
536
+ * @return [Fixnum]
537
+ * @see http://api.libssh.org/stable/group__libssh__auth.html ssh_userauth_password
538
+ */
539
+ static VALUE m_userauth_password(VALUE self, VALUE password) {
540
+ SessionHolder *holder;
541
+ int rc;
542
+
543
+ TypedData_Get_Struct(self, SessionHolder, &session_type, holder);
544
+ rc = ssh_userauth_password(holder->session, NULL, StringValueCStr(password));
545
+ RAISE_IF_ERROR(rc);
546
+ return INT2FIX(rc);
547
+ }
548
+
532
549
  /*
533
550
  * @overload userauth_list
534
551
  * Get available authentication methods from the server.
@@ -699,6 +716,8 @@ void Init_libssh_session() {
699
716
 
700
717
  rb_define_method(rb_cLibSSHSession, "userauth_none",
701
718
  RUBY_METHOD_FUNC(m_userauth_none), 0);
719
+ rb_define_method(rb_cLibSSHSession, "userauth_password",
720
+ RUBY_METHOD_FUNC(m_userauth_password), 1);
702
721
  rb_define_method(rb_cLibSSHSession, "userauth_list",
703
722
  RUBY_METHOD_FUNC(m_userauth_list), 0);
704
723
  rb_define_method(rb_cLibSSHSession, "userauth_publickey_auto",
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module LibSSH
3
3
  # The version of libssh gem.
4
- VERSION = '0.3.1'.freeze
4
+ VERSION = '0.4.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kohei Suzuki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-07 00:00:00.000000000 Z
11
+ date: 2018-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -168,9 +168,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  requirements: []
170
170
  rubyforge_project:
171
- rubygems_version: 2.6.1
171
+ rubygems_version: 2.7.6
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Ruby binding for libssh.
175
175
  test_files: []
176
- has_rdoc: