Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identity should be a factory #232

Open
obsgolem opened this issue Aug 29, 2022 · 1 comment
Open

Identity should be a factory #232

obsgolem opened this issue Aug 29, 2022 · 1 comment

Comments

@obsgolem
Copy link

Currently, Identity is given a PKCS#12 or PKCS#8 blob. This does not encompass several usecases, including smartcards, whose private key is non-exportable. In order to fix this, Identity should be changed to be a factory that returns an imp::Identity.

Basic factories on Windows would be

  • A factory that prompts a user for a key using Window's built in method for doing so (I believe the relevant function would be CryptUIDlgSelectCertificateFromStore).
  • A similar factory that remembers your choice for the process duration

I expect MacOS has a similar system for prompting the user to choose a cert. I don't know if Linux does, but factories should still be applicable there.

The one usecase this wouldn't support is choosing an identity based on what identities the server says it will accept, but that extension should be doable.

@sfackler
Copy link
Owner

If you can design a cross-platform interface for that kind of identity it seems doable to add.

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

No branches or pull requests

2 participants