# Class Security#unregisterServerCertificate

Security

- Defined in: security.js

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| Security#unregisterServerCertificate(successCallback, errorCallback, options) Unregisters a server certificate and deactivate the TLS authentication and the host verification.

## Class Detail

Security#unregisterServerCertificate(successCallback, errorCallback, options)
Unregisters a server certificate and deactivate the TLS authentication and the host verification. After unregistration, reboot must be needed.

    // Javascript code
    function unregisterServerCertificate () {
      var options = {
         userName : "testserver",
         password : "passCode1"
      };

      function successCb() {
         // Do something
      }

      function failureCb(cbObject) {
         var errorCode = cbObject.errorCode;
         var errorText = cbObject.errorText;
         console.log ("Error Code [" + errorCode + "]: " + errorText);
      }

      var security = new Security();
      security.unregisterServerCertificate(successCb, failureCb, options);
    }

Parameters:
{Function} successCallback
  success callback function.
{Function} errorCallback
  failure callback function.
{Object} options

  Property | Type | Description | Required
  --- | --- | --- | ---
  userName | String | username for the server certificate to unregister. | required
  password | String | password to be used for the registration of the server certificate before | required

Since:
  1.4.1
Returns:

  If the method is successfully executed, call the success callback function without a parameter. If an error occurs, failure callback function is called with failure callback object as a parameter.