Download
Http://www.slproweb.com/products/Win32OpenSSL.html Open SSL
Generate Certificate
OpenSSL genrsa-des3-out priv. Key-passout pass: mypassword 1024
OpenSSL req-X509-New-key priv. Key-passin pass: mypassword-days 3650-out cert. Cer
OpenSSL PKCS12-export-out pkcsfile. p12-inkey priv. Key-in CERT. cer-name "friendlyname"
Import Certificate
Open MMC and find the Certificate Management certmgr. MSC to import the generated certificate exporttable. You must check the import certificate. Otherwise (this item is not suitable for use in the specified state, not valid for use in specified state)
No certificate found.
_ Location = wsex509.x509certificatestore. storelocation. currentuser;
_ Provider = wsex509.x509certificatestore. storeprovider. system;
_ Store = new wsex509.x509certificatestore (_ provider, _ location, "my ");
Change these three values to the appropriate values.
Read from Certificate file directly
String Filename = Httpcontext. Current. server. mappath ( " ~ /Pkcsfile. p12 " );
System. Security. cryptography. x509certificates. x509certificate x = New System. Security. cryptography. x509certificates. x509certificate (filename, " 123456 " , System. Security. cryptography. x509certificates. x509keystorageflags. exportable );
Microsoft. Web. Services. Security. x509.x509certificate Cert = new Microsoft. Web. Services. Security. x509.x509certificate (X. Handle );
In this way, you can get it ..
(The main problem is net.CodeNot implemented again. Directly call the DLL under Win32)
How to add a certificate to a local device
Http://www.ca365.com/handbook10.asp
After adding the certificate, you can set SSL on IIS.
In essence, public keys are used for verification.
Ideal Interface. Is the public key of the merchant. Private key encryption. Commercial Public Key decryption.
The other is similar. The service provider discloses its own public key. Private Key Encryption. We use the public key for decryption.