libssh 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.travis.yml +3 -1
- data/CHANGELOG.md +3 -0
- data/ext/libssh_ruby/session.c +19 -0
- data/lib/libssh/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 484030cf7864bb22b9a46afb3e00534b5a42afcc83e9ff42124a62636ef6b72b
|
4
|
+
data.tar.gz: 834b045234a74b7221a59ed213512c3179cf4fd02c1436246bab882e1139f47e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b078df4702b81966afedea4d0e3eebf57558fde8fd31b832137accf14e7f430f77cfedc4d1f071ad4376a17755deb89086355d7f4edee4c5d023d40c31e9fa3
|
7
|
+
data.tar.gz: 39d1b54ba67f766c28f66e1286807bb614c7b2405808219f5cbb06f12a59f2ad1af2640cfca2d6f7a25d36a3d74a59186a19c1369d3008db8c3fb2c924f83f87
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/ext/libssh_ruby/session.c
CHANGED
@@ -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",
|
data/lib/libssh/version.rb
CHANGED
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.
|
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:
|
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
|
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:
|