@@ -29,7 +29,7 @@ public extension SSH {
29
29
guard let rawSession else {
30
30
return false
31
31
}
32
- guard callSSH2 { libssh2_userauth_password_ex ( rawSession, user, user. count. load ( ) , password, password. count. load ( ) , nil ) } == LIBSSH2_ERROR_NONE, isAuthenticated else {
32
+ guard callSSH2 { libssh2_userauth_password_ex ( rawSession, user, user. count. load ( ) , password, password. count. load ( ) , nil ) } == LIBSSH2_ERROR_NONE else {
33
33
return false
34
34
}
35
35
return isAuthenticated
@@ -60,7 +60,7 @@ public extension SSH {
60
60
guard let rawSession else {
61
61
return false
62
62
}
63
- guard callSSH2 { libssh2_userauth_publickey_fromfile_ex ( rawSession, user, user. count. load ( ) , publickeyFile, privateKeyFile, passphrase) } == LIBSSH2_ERROR_NONE, isAuthenticated else {
63
+ guard callSSH2 { libssh2_userauth_publickey_fromfile_ex ( rawSession, user, user. count. load ( ) , publickeyFile, privateKeyFile, passphrase) } == LIBSSH2_ERROR_NONE else {
64
64
return false
65
65
}
66
66
return isAuthenticated
@@ -92,7 +92,7 @@ public extension SSH {
92
92
guard let rawSession else {
93
93
return false
94
94
}
95
- guard callSSH2 { libssh2_userauth_publickey_frommemory ( rawSession, user, user. count, publickey, publickey. count, privateKey, privateKey. count, passphrase) } == LIBSSH2_ERROR_NONE, isAuthenticated else {
95
+ guard callSSH2 { libssh2_userauth_publickey_frommemory ( rawSession, user, user. count, publickey, publickey. count, privateKey, privateKey. count, passphrase) } == LIBSSH2_ERROR_NONE else {
96
96
return false
97
97
}
98
98
return isAuthenticated
@@ -117,7 +117,7 @@ public extension SSH {
117
117
// guard let rawSession else {
118
118
// return false
119
119
// }
120
- // guard callSSH2 { libssh2_userauth_hostbased_fromfile_ex(rawSession, user, user.count.load(), publickeyFile, privateKeyFile, passphrase, hostname, hostname.count.load(), user, user.count.load()) } == LIBSSH2_ERROR_NONE, isAuthenticated else {
120
+ // guard callSSH2 { libssh2_userauth_hostbased_fromfile_ex(rawSession, user, user.count.load(), publickeyFile, privateKeyFile, passphrase, hostname, hostname.count.load(), user, user.count.load()) } == LIBSSH2_ERROR_NONE else {
121
121
// return false
122
122
// }
123
123
// return isAuthenticated
0 commit comments