Skip to content

Conversation

bagajjal
Copy link

  1. Remove unnecessary references to ssh-pkcs11.c
  2. fix warnings
  3. Create the duplicate token used for create process(ssh-pkcs11-helper.exe)
  4. Delete and overwrite the ssh-pkcs11 keys when ssh-add.exe is rerun again.

bagajjal and others added 30 commits October 14, 2019 13:03
@bagajjal bagajjal merged commit 3a33ea8 into PowerShell:latestw_all Feb 19, 2022
@yan4321
Copy link

yan4321 commented Feb 21, 2022

@bagajjal , I think you might have missed my comment here.

Failing to add a provider if it already exists is done intentionally as this is the upstream behavior of openssh/openssh-portable. It also makes sense for the user to explicitly remove a provider that already exists before re-adding.

@@ -37,7 +38,7 @@
#define BUFSIZE 5 * 1024

char* sshagent_con_username;
int sshagent_client_pid;
HANDLE sshagent_client_primary_token;
Copy link

Choose a reason for hiding this comment

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

@bagajjal , Exposing the token itself as a global variable is a bit riskier than exposing the client's pid.

Copy link
Author

Choose a reason for hiding this comment

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

@bagajjal , Exposing the token itself as a global variable is a bit riskier than exposing the client's pid.

We already do this in multiple places. I don't see why it's riskier.

extern HANDLE password_auth_token;

@bagajjal
Copy link
Author

@bagajjal , I think you might have missed my comment here.

Failing to add a provider if it already exists is done intentionally as this is the upstream behavior of openssh/openssh-portable. It also makes sense for the user to explicitly remove a provider that already exists before re-adding.

It was an intentional change. To me it doesn't make sense to fail it. If we fail, the error message is not clear as to why it's failing. I don't see failure message in the upstream code.
Even if it's a deviation from the upstream, I would like to do whatever it's better for customers.

@bagajjal bagajjal deleted the bagajjal/fix_minor_issues branch April 11, 2022 22:42
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