Post not yet marked as solved
Good morning,
The CTK works perfectly in Chrome.
But in Safari, the hash it sends me to sign doesn't make any sense.
Size to sign: 37417
And the hash is huge does not correspond.
Thanks greetings.
Post not yet marked as solved
Thank you very much Eskimo, everything perfect in Chrome,
although I have a problem with Safari...
He sends me to sign crazy things, where chrome works perfectly.
DataToSign: 37417
Inside there are many CA's and certificates...
Post not yet marked as solved
Yes exactly, in the signData function. I need to ask for the pin of the certificate to validate it, before sending the signature to the api.
To do something fast I made the NSAlert and added a NSSecureTextField. But the control I can not write or delete, only select. If I add a string value by default, when I click the accept button it picks it up.
If I create a new window and initialize it on the main thread. The window comes out all as disabled. I suppose it will be something from the ui update that should also be executed in the main thread.
Thanks.
PS: In the other incident that you helped me with, it didn't work because I had a cpp dll that seems to have broken the token. :)
Post not yet marked as solved
Good morning,
I think I have not explained myself well, what I need to do exactly is:
I need safari, chrome or any application to detect my certificate (without having the private key).
When selecting that certificate for any operation, sign in an external hsm and return the signature.
I have programmed windows CrytoAPI, pkcs11 and I have not had any problem. Since I give him the public part of the certificate and when I go to do the signature, I sign in the HSM and return the signature.
I thought that with CryptoTokenKit I could do it, but I'm not sure anymore.
I think I have to create Smart Card Application Extension.
https://developer.apple.com/documentation/cryptotokenkit/authenticating_users_with_a_cryptographic_token?language=objc
But I'm not going to have a smart card reader or a token.
As I said, you would need to create a virtual smart card with the public part of the certificate and then sign into the HSM.
I've tried everything and I can't find any tutorial or flowchart or order of execution either.
Let's see if you can guide me a little.
Thanks greetings