c++ signing data using CAPICOM
-
i want to sign some piece of data using a certificate's private key. anyone know how and what do i call from capicom functions to encrypt using private key? thanks in advance
-
i want to sign some piece of data using a certificate's private key. anyone know how and what do i call from capicom functions to encrypt using private key? thanks in advance
To access Private Key from certificate use CryptImportKey() function and you can look into the MSDN sample code for encrypting the data http://msdn.microsoft.com/en-us/library/aa382006(VS.85).aspx[^]
-
To access Private Key from certificate use CryptImportKey() function and you can look into the MSDN sample code for encrypting the data http://msdn.microsoft.com/en-us/library/aa382006(VS.85).aspx[^]
nice thanks. i'll look into this cryptimportkey() function, although the example doesn't run for me (using visual studio 2005)....
-
nice thanks. i'll look into this cryptimportkey() function, although the example doesn't run for me (using visual studio 2005)....
Yes correct, it's working for VS2008.
-
Yes correct, it's working for VS2008.
ugh i hate to keep bothering you but i can't figure out this cryptimportkey function. would you know how to use it? :sigh: basically i want to be able to click on a certificate on my gui, and use its private key to sign some data
-
ugh i hate to keep bothering you but i can't figure out this cryptimportkey function. would you know how to use it? :sigh: basically i want to be able to click on a certificate on my gui, and use its private key to sign some data
Can you please let me know how much can you able to achieve? Can u able to launch Certificate selection Dialog?? And r u trying with VS2005/2008?
-
Can you please let me know how much can you able to achieve? Can u able to launch Certificate selection Dialog?? And r u trying with VS2005/2008?
yes i am able to launch a gui (made using mfc) which displays in columns the "Issued By", "Issued To" and email address of all the certificates in MYSTORE. When I click on any of the rows, I am able to display the corresponding certificate by using the Display() command. Shall I email you my code so far? I am using VS2005. thanks
-
yes i am able to launch a gui (made using mfc) which displays in columns the "Issued By", "Issued To" and email address of all the certificates in MYSTORE. When I click on any of the rows, I am able to display the corresponding certificate by using the Display() command. Shall I email you my code so far? I am using VS2005. thanks
sorry, I was away from the forum for sometime. Does your problem get solved?? If not, may be you can copy-paste relevant code snippet here.
-
sorry, I was away from the forum for sometime. Does your problem get solved?? If not, may be you can copy-paste relevant code snippet here.
yeah i got the data to sign now, but im stuck with verifying the data, i googled it and couldn't find a satisfactory solution for it. seems to have something to do with capicom being made for java and all so the way its handling or data is different than c++ (ascii vs unicode) so im stuck there now lol. thanks for the concern though