protected virtual ITenantManagementService CreateRmsOnlineWebServiceProxy(X509Certificate2 authenticationCertificate) { TenantManagementServiceClient tenantManagementServiceClient = new TenantManagementServiceClient(new WSHttpBinding { SendTimeout = RmsOnlineConstants.SendTimeout, ReceiveTimeout = RmsOnlineConstants.ReceiveTimeout, ReaderQuotas = RmsOnlineConstants.ReaderQuotas, MaxReceivedMessageSize = RmsOnlineConstants.MaxReceivedMessageSize, Name = RmsOnlineConstants.BindingName, Security = RmsOnlineConstants.Security }, new EndpointAddress(this.rmsOnlineKeySharingLocation, new AddressHeader[0])); RmsUtil.ThrowIfClientCredentialsIsNull(tenantManagementServiceClient); if (tenantManagementServiceClient.ClientCredentials != null) { tenantManagementServiceClient.ClientCredentials.ClientCertificate.Certificate = authenticationCertificate; } return(tenantManagementServiceClient); }