EDN Admin
Well-known member
Hi there!
Im developing a Smart Card CSP(Smart Card Cryptographic Service Provider), I should implement these functions:
<p style="margin:0in 0in 0pt" class=MsoNormal><b><span style="font-family:Courier New;color:red;font-size:10pt <font color="#000000 CPAcquireContext</font></b>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <b><span style="color:red <font color="#000000 CPReleaseContext</font></b>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <b><span style="color:red <font color="#000000 CPGenKey</font></b>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <b><span style="color:red <span style="font-family:Courier New;color:red;font-size:10pt <font color="#000000 CPDestroyKey</font></b> <span style="font-family:Courier New;font-size:10pt <span style="color:red <span style="font-family:Courier New;color:red;font-size:10pt
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;color:red;font-size:10pt <font color="#000000 CPSignHash</font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span> <font color="#000000 CPVerifySignature</font> <span style="font-family:Courier New;font-size:10pt <span>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;color:red;font-size:10pt <font color="#000000 CPGetUserKey</font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span> <font color="#000000 CPSetProvParam</font> <span style="font-family:Courier New;font-size:10pt <span>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;color:#ff6600;font-size:10pt <font color="#000000 CPCreateHash</font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span> <font color="#000000 CPHashData</font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span> <font color="#000000 from 23 CSPs functions!</font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span> <font color="#000000 A sample code of general template of a CSP in C++ language, is included in cspdk.exe that can be downloded from here:</font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span> http://www.microsoft.com/downloads/details.aspx?FamilyID=0F436C75-2304-42BB-B81A-BA0C2C47BAC2&displaylang=en http://www.microsoft.com/downloads/details.aspx?FamilyID=0F436C75-2304-42BB-B81A-BA0C2C47BAC2&displaylang=en
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span><font color="#330000 The functions listed above, should call WinSCard.dll functions for interacting with Smart Card!</font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span><font color="#330000 Now, I dont know how to implemet CPAcquirecontext function in CSP in order to </font><font color="#008000" size=2><font color="#008000" size=2><font color="#330000 acquire a context handle to a cryptographic service provider (CSP)!</font></font></font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span><span style="font-family:Courier New;font-size:10pt <span><font color="#008000" size=2><font color="#008000" size=2><font color="#330000 I studied MSDN library completely, but unfortunately there is not any sample code of using or implementing this function in CSP.</font></font></font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span><font color="#008000" size=2><font color="#008000" size=2><font color="#330000 I ask from CSP developers or anyone can help ,guide me with implementing this function or give me a sample code(in C++) </font></font></font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span><font color="#008000" size=2><font color="#008000" size=2><font color="#330000 I really need so help,</font></font></font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span><font color="#008000" size=2><font color="#008000" size=2><font color="#330000 giving a sample code or any help will be greatly appreciated!</font></font></font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span><font color="#008000" size=2><font color="#008000" size=2><font color="#330000 Best Regards.</font>
<p style="margin:0in 0in 0pt" class=MsoNormal></font></font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span>
<p style="margin:0in 0in 0pt" class=MsoNormal>
<p style="margin:0in 0in 0pt" class=MsoNormal>
<p style="margin:0in 0in 0pt" class=MsoNormal>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span>
<p style="margin:0in 0in 0pt" class=MsoNormal>
View the full article
Im developing a Smart Card CSP(Smart Card Cryptographic Service Provider), I should implement these functions:
<p style="margin:0in 0in 0pt" class=MsoNormal><b><span style="font-family:Courier New;color:red;font-size:10pt <font color="#000000 CPAcquireContext</font></b>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <b><span style="color:red <font color="#000000 CPReleaseContext</font></b>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <b><span style="color:red <font color="#000000 CPGenKey</font></b>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <b><span style="color:red <span style="font-family:Courier New;color:red;font-size:10pt <font color="#000000 CPDestroyKey</font></b> <span style="font-family:Courier New;font-size:10pt <span style="color:red <span style="font-family:Courier New;color:red;font-size:10pt
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;color:red;font-size:10pt <font color="#000000 CPSignHash</font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span> <font color="#000000 CPVerifySignature</font> <span style="font-family:Courier New;font-size:10pt <span>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;color:red;font-size:10pt <font color="#000000 CPGetUserKey</font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span> <font color="#000000 CPSetProvParam</font> <span style="font-family:Courier New;font-size:10pt <span>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;color:#ff6600;font-size:10pt <font color="#000000 CPCreateHash</font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span> <font color="#000000 CPHashData</font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span> <font color="#000000 from 23 CSPs functions!</font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span> <font color="#000000 A sample code of general template of a CSP in C++ language, is included in cspdk.exe that can be downloded from here:</font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span> http://www.microsoft.com/downloads/details.aspx?FamilyID=0F436C75-2304-42BB-B81A-BA0C2C47BAC2&displaylang=en http://www.microsoft.com/downloads/details.aspx?FamilyID=0F436C75-2304-42BB-B81A-BA0C2C47BAC2&displaylang=en
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span><font color="#330000 The functions listed above, should call WinSCard.dll functions for interacting with Smart Card!</font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span><font color="#330000 Now, I dont know how to implemet CPAcquirecontext function in CSP in order to </font><font color="#008000" size=2><font color="#008000" size=2><font color="#330000 acquire a context handle to a cryptographic service provider (CSP)!</font></font></font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span><span style="font-family:Courier New;font-size:10pt <span><font color="#008000" size=2><font color="#008000" size=2><font color="#330000 I studied MSDN library completely, but unfortunately there is not any sample code of using or implementing this function in CSP.</font></font></font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span><font color="#008000" size=2><font color="#008000" size=2><font color="#330000 I ask from CSP developers or anyone can help ,guide me with implementing this function or give me a sample code(in C++) </font></font></font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span><font color="#008000" size=2><font color="#008000" size=2><font color="#330000 I really need so help,</font></font></font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span><font color="#008000" size=2><font color="#008000" size=2><font color="#330000 giving a sample code or any help will be greatly appreciated!</font></font></font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span><font color="#008000" size=2><font color="#008000" size=2><font color="#330000 Best Regards.</font>
<p style="margin:0in 0in 0pt" class=MsoNormal></font></font>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span>
<p style="margin:0in 0in 0pt" class=MsoNormal>
<p style="margin:0in 0in 0pt" class=MsoNormal>
<p style="margin:0in 0in 0pt" class=MsoNormal>
<p style="margin:0in 0in 0pt" class=MsoNormal><span style="font-family:Courier New;font-size:10pt <span>
<p style="margin:0in 0in 0pt" class=MsoNormal>
View the full article