-
Notifications
You must be signed in to change notification settings - Fork 88
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
More coherent slot support #15
Comments
I'm down with exposing a key |
The scope of this library should remain small. Do one thing and do it well. The goal was to provide PKCS#11 implementations for Go crypto interfaces. This would allow HSMs to be used in the "pluggable" parts of the Go crypto ecosystem (e.g. The Go crypto packages provide no interfaces key generators and thus no way to approach this in a pluggable fashion. I see no benefit in providing a partial solution for key generation, when The potential exception to this is session keys, which cannot currently be generated in separate calls to IMO, key generation was scope creep and we will probably remove it in the future (with a suitable deprecation period). Consequently, I don't see a benefit in enhancing the existing support. |
I'm closing this. Comments on the new design are welcome at #36. |
Currently:
Configure
you can specify a token by label or serial, but you can't get the slot number where that token resides back out.None of this is insurmountable but it does leave a lot of work for the callers of the key generation APIs.
(The situation is better for finding keys, but see #16).
I propose the following changes:
GenerateDSAKeyPair
,GenerateECDSAKeyPair
,GenerateRSAKeyPair
andGenerateSecretKey
all getid
andlabel
arguments, consistent with the otherGenerate...
functions. This is an incompatible change, but since the functions are almost useless I don't foresee much downstream fallout.withSession
will becomeWithSession
, allowing applications to play nicely with the library's own session management.WithSession
will take a PIN argument rather than using the configured PIN. The present callers ofwithSession
will use the configured PIN.Configure
to find a slot given a token label/id will be exposed as a public function.The text was updated successfully, but these errors were encountered: