When I run these two commands, the program prompts me for my password
twice, and then I get a popup which says, "openssl.exe has stopped
working... A problem caused the program to stop working..." (I am using
Windows 7)

 

C:\OpenSSL> openssl pkcs12 -export -out cff_auth.pfx -name "HRB Web
Service" -inkey CFF_auth.key -in CFF_auth.pem

 

C:\OpenSSL> openssl pkcs12 -export -out cff_soap.pfx -name "HRB SOAP Web
Service" -inkey cff_soap.key -in CFF_soap.pem

 

After I get the error, the .pfx files are still created, but I think
they might be corrupted because they cause a run time,
"CryptographicException was unhandled" dialog, with an

"Unspecified error" in my C# program. See code below.

 

I don't know if, or how, I might need to install OpenSSL. I just
unzipped it and I running it in the directory where I unzipped it with
my .pem's and .key's in that same directory.

 

n  Error on highlighted line:

 

using ADPTest.com.adp.hrbws;

using System.Security.Cryptography.X509Certificates;

using Microsoft.Web.Services3.Security;

using Microsoft.Web.Services3.Security.Tokens;

using Microsoft.Web.Services3.Security.Cryptography;

 

namespace ADPTest

{

    class Program

    {

        static void Main(string[] args)

        {

            // Create the web service proxy.

            HrbService proxy = new HrbService();

 

            // Add the Username token.

            UsernameToken usernameToken = new UsernameToken("user@org","
");

            proxy.RequestSoapContext.Security.Tokens.Add(usernameToken);

 

            // Add the certificate for mutual SSL.

            X509Certificate2 mutualCert = new
X509Certificate2("I:\\MyDocs\\ADP\\CFF_auth.pfx", "OpenSSL_Pswd");

            proxy.ClientCertificates.Add(mutualCert);

 

Rick Kushner

Sr Database Engineer

Cystic Fibrosis Foundation

301-907-2684 - office

317-758-7463 - cell

 

Reply via email to