...
byte[] pfxData = GetFile(certificatePath);
...
CRYPT_DATA_BLOB pPFX = new CRYPT_DATA_BLOB();
pPFX.cbData = pfxData.Length;
pPFX.pbData = Marshal.AllocHGlobal(pfxData.Length);
Marshal.Copy(pfxData, 0, pPFX.pbData, pfxData.Length);
...
hMemStore = PFXImportCertStore(ref pPFX, password, CRYPT_USER_KEYSET);
...
cert_MY_store = CryptoAPI.CertOpenStore(new IntPtr(CERT_STORE_PROV_SYSTEM_W),
0,
IntPtr.Zero,
CERT_SYSTEM_STORE_CURRENT_USER,
"MY");
...
...
CertAddCertificateContextToStore(cert_MY_store,
hCertCntxt,
(int)CERT_STORE_ADD_REPLACE_EXISTING, IntPtr.Zero)
Siccolo helps MS SQL Server professionals save time and increase their productivity by utilizing a more efficient approach to database management - use their Windows Mobile empowered device while sipping margarita on the beach. Siccolo extends support from mobile devices for Microsoft SQL Servers
Friday, February 1, 2008
How to Install Personal Security Certificate in C# compact framework using PFXIsPFXBlob(), CertAddCertificateContextToStore() functions
Access web service with required personal security certificate - using x509 PFX personal certificate - Install Personal Security Certificate in C# compact framework. :
Subscribe to:
Post Comments (Atom)
Exception handling -> "bubble up
Exception handling -> "bubble up" Exception handling (#1) try { ... // might fail ... } ca...
-
see it at Siccolo Articles - How to Create SQL Function To Format To Currency
-
New article at Siccolo .NET Development Articles - Open Dataset from Text File - Load ListView and GridView in .NET from TextFile - using ...
-
SQL Sever - How to Create a Directory (Folder) - Using xp_cmdshell and mkdir command
No comments:
Post a Comment