B
Brad
I have a Personal Information Exchange PCKS #12 certificate file that
requires a password when manually installing. This certificate was
issued by a 3rd party company I need to communicate with via https.
Initially I exported the PCKS #12 certificate to a DER encoded binary
X.509 certificate and used the following code to reference it in my
application:
// Create Certificate
X509Certificate cert = X509Certificate.CreateFromCertFile(strCertPath);
// Create request
HttpWebRequest req =
(HttpWebRequest)WebRequest.Create("https://serverurl/");
// Add Certficate
req.ClientCertificates.Add(cert);
This works great as long as the original PCKS #12 cert is installed in
the Windows Certificate Store on the maching running the application.
Rather than having to go around to each client's computer and manually
installing this certificate on their machine so my application will
run, I would like to programmatically search the certificate store for
the PCKS #12 cert and, if it doesn't exist, install it on the fly.
Could anyone help me with this task? I've heard of CAPICOM, but most
of the references I've seen to it have either been relatively confusing
or not addressing the task at hand. Thanks in advance for any help.
requires a password when manually installing. This certificate was
issued by a 3rd party company I need to communicate with via https.
Initially I exported the PCKS #12 certificate to a DER encoded binary
X.509 certificate and used the following code to reference it in my
application:
// Create Certificate
X509Certificate cert = X509Certificate.CreateFromCertFile(strCertPath);
// Create request
HttpWebRequest req =
(HttpWebRequest)WebRequest.Create("https://serverurl/");
// Add Certficate
req.ClientCertificates.Add(cert);
This works great as long as the original PCKS #12 cert is installed in
the Windows Certificate Store on the maching running the application.
Rather than having to go around to each client's computer and manually
installing this certificate on their machine so my application will
run, I would like to programmatically search the certificate store for
the PCKS #12 cert and, if it doesn't exist, install it on the fly.
Could anyone help me with this task? I've heard of CAPICOM, but most
of the references I've seen to it have either been relatively confusing
or not addressing the task at hand. Thanks in advance for any help.