How to use force encryption on server programmatically?

  • The way I am doing presently is: use the registry key to check the encryption on. I have created a certificate using Makecert. I install the certificate in localmachine, personal store. I am copying the thumbprint of the certificate to registry. All using c#. The trouble is on a standalone machine, I have no problem after doing all this I am able to restart the sqlserver without any problem. But we have to test it on different environments. So we have a virtual machine which is on domain and another virtual machine which is not on domain. I am not able to restart the sql server on these virtual machines. I am using SQLServer 2008. I am getting the error

    Unable to load user-specified certificate [Cert Hash(sha1) ......

    This is just a test certificate. Can anyone help me here?

    Thank you. Appreciate all help.

    Jayashri

  • Do you have a PKI infrastructure within your organization? If not, what might be a better option is to use an IPSEC policy to configure a secure channel on the port for the SQL Server. You can do so using a shared secret.

    K. Brian Kelley
    @kbriankelley

  • I do not know much about PKI Infrastructure. I tried googling and got some idea. My intention is to provide SSL security. Our product is a desktop application. We have a server side version and a client side version. We just wanted the transactions between the server and clients to be encrypted. If we use the Force Encryption on the server side and use a certificate, we assume all the transactions will be encrypted and communicaions will be secured. Right now our product is in the final stages of production. We wanted to finish off this security aspect. As we were testing this particular portion of Force encryption, we found that we are not able to restart the sql server after checking the force encryption flag and applying the certificate. If I go to Sql server configuration manager, I am not able to see the certificate either. We have virtual machines having different testing environments.

    Thanks for the help.

    Jayashri

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply