Uh oh!
There was an error while loading. Please reload this page.
x509-cert: don't bind builder with signer early - #1161
Conversation
tarcieri
commented
Jul 22, 2023
Looks good at first glance |
bkstein
commented
Jul 24, 2023
I think, this will improve the situation. However, monomorphization will still take place. |
tarcieri
commented
Jul 24, 2023
The signing API isn't dynamic (yet) so we can't yet avoid monomorphization around the signing operation. It would need fully dynamic counterparts to everything in |
ca9a75f to
490edd4Comparebaloo
commented
Jul 27, 2023
This is a breaking change. I don't think we mean to introduce a |
tarcieri
commented
Jul 27, 2023
Yeah, that's fine. We can keep it open until the next breaking release cycle. |
41e0d7b to
25a4391Compare| fn finalize<S>( | ||
| &mut self, | ||
| _signer: &S, | ||
| ) -> core::result::Result<Vec<u8>, x509_cert::builder::Error> |
There was a problem hiding this comment.
Shouldn't this be independent of x509_cert?
There was a problem hiding this comment.
That was just a rebase from this PR on a fresh master.
But I needed to change the signature of finalize because I attach the public key of the signer "late".
Getting the public from the keypair made it so that I could not get away with just a der::Result.
This is still a breaking change though.
Uh oh!
There was an error while loading. Please reload this page.
25a4391 to
a561c25Comparea561c25 to
bbe0523Compare5a3ce21 to
183bbbfCompareThis is mostly a draft after discussion in RustCrypto#1160 Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
183bbbf to
ff582c3CompareCould One of the shortcomings of the current API is its assumption that the private key is always available. By adopting this approach, only the build method would necessitate access to the private key (or signer). Users could directly invoke |
Here is an example of the use of this API (before this PR merged): Here is an example of the use of this API (after this PR merged): Both are use-cases where the signer doesn't have direct access to the private material (PKCS11 for use on HSMs, YubiKey in the PIV applet). For YubiHSMs there are also various implementations of signers:
I'd like to come around and make a compatibility crate for TPMs at some point (in https://github.com/parallaxsecond/rust-tss-esapi) too. I'd love help on any of those :) But I think that should address your concerns about hardware tokens. |
a1ien
commented
Mar 20, 2024
Yeah thanks. This looks really awesome. |
This is mostly a draft after discussion in #1160
cc @bkstein@tarcieri@jstayton