View | Details | Raw Unified | Return to bug 51645
Collapse All | Expand All

(-)a/ssh2/ssh2.c (-2 / +2 lines)
Lines 653-659 PHP_FUNCTION(ssh2_auth_pubkey_file) Link Here
653
{
653
{
654
	LIBSSH2_SESSION *session;
654
	LIBSSH2_SESSION *session;
655
	zval *zsession;
655
	zval *zsession;
656
	zend_string *username, *pubkey, *privkey, *passphrase;
656
	zend_string *username, *pubkey, *privkey, *passphrase = NULL;
657
#ifndef PHP_WIN32
657
#ifndef PHP_WIN32
658
	zend_string *newpath;
658
	zend_string *newpath;
659
	struct passwd *pws;
659
	struct passwd *pws;
Lines 689-695 PHP_FUNCTION(ssh2_auth_pubkey_file) Link Here
689
#endif
689
#endif
690
690
691
	/* TODO: Support passphrase callback */
691
	/* TODO: Support passphrase callback */
692
	if (libssh2_userauth_publickey_fromfile_ex(session, ZSTR_VAL(username), ZSTR_LEN(username), ZSTR_VAL(pubkey), ZSTR_VAL(privkey), ZSTR_VAL(passphrase))) {
692
	if (libssh2_userauth_publickey_fromfile_ex(session, ZSTR_VAL(username), ZSTR_LEN(username), ZSTR_VAL(pubkey), ZSTR_VAL(privkey), passphrase ? ZSTR_VAL(passphrase) : NULL)) {
693
		char *buf;
693
		char *buf;
694
		int len;
694
		int len;
695
		libssh2_session_last_error(session, &buf, &len, 0);
695
		libssh2_session_last_error(session, &buf, &len, 0);

Return to bug 51645