Changeset 1587


Ignore:
Timestamp:
04/17/09 11:23:55 (12 years ago)
Author:
mbecirov
Message:

#528 Adopt settings for activating/deactivating the use of certificates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Contracts/3.2/WcfSettings.cs

    r1579 r1587  
    1 #define USE_MSG_BINDING
     1//#define USE_MSG_BINDING
    22using System;
    33using System.Collections.Generic;
     
    2323      NetTcpBinding binding = new NetTcpBinding(SecurityMode.Message);
    2424#else
    25       NetTcpBinding binding = new NetTcpBinding(SecurityMode.TransportWithMessageCredential);
    26       binding.Security.Message.ClientCredentialType = MessageCredentialType.Certificate;
     25      NetTcpBinding binding = new NetTcpBinding();
    2726#endif
    2827      return binding;
     
    3433    /// <param name="svchost">A service for which this certificate is applicable.</param>
    3534    public static void SetServiceCertificate(ServiceHost svchost) {
     35#if USE_MSG_BINDING
    3636      svchost.Credentials.ServiceCertificate.SetCertificate(
    3737        StoreLocation.LocalMachine,
     
    3939        X509FindType.FindBySubjectName,
    4040        SERVERCERT);
     41#endif
    4142    }
    4243
Note: See TracChangeset for help on using the changeset viewer.