Skip to content

Add cert apis to enable certification auth. - #4

Closed
dyydj wants to merge 2 commits into
ParallelSSH:masterfrom
dyydj:master
Closed

Add cert apis to enable certification auth.#4
dyydj wants to merge 2 commits into
ParallelSSH:masterfrom
dyydj:master

Conversation

@dyydj

@dyydj dyydj commented Dec 14, 2018

Copy link
Copy Markdown

Add wrapping APIs for copy_cert_to_privkey.

Yong Du added 2 commits December 12, 2018 22:23
Summary:
Add wrapping APIs for copy_cert_to_privkey.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
@pkittenis

Copy link
Copy Markdown
Member

Hi there,

Thanks for the interest and PR!. Review in line.

1 similar comment
@pkittenis

Copy link
Copy Markdown
Member

Hi there,

Thanks for the interest and PR!. Review in line.

Comment thread ssh/key.pyx
c_ssh.ssh_string_free_char(_key)
return b_key

def copy_cert_to_privkey(self, SSHKey priv_key):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can probably better return a new private key, or at least make passing it in optional. Also needs a test, see existing import_* tests.

Suggested change
def copy_cert_to_privkey(self, SSHKey priv_key):
def copy_cert_to_privkey(self, SSHKey priv_key=None):
<make and return new key if priv_key is None>

Comment thread ssh/session.pyx
SSH_CLOSED_ERROR = c_ssh.SSH_CLOSED_ERROR
SSH_WRITE_PENDING = c_ssh.SSH_WRITE_PENDING

def libssh_init():

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a session function and should not be here. This is a top level libssh function, so probably should be in ssh/__init__.pyx.

Please also make a separate PR for adding these. According to libssh documentation, this function not needed to be called by users as of 0.8.0. Also needs libssh_destructor to be implemented and called if this is called by users.

@pkittenis

pkittenis commented Oct 20, 2020

Copy link
Copy Markdown
Member

Stale and unfinished, re-doing from scratch.

@pkittenis pkittenis closed this Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants