Пример #1
0
 protected bool Equals(SaslTpmHandler other)
 {
     return
         (Equals(_endorsementKey, other._endorsementKey) &&
          Equals(_storageRootKey, other._storageRootKey) &&
          string.CompareOrdinal(_idScope, other._idScope) == 0 &&
          Equals(_security, other._security));
 }
 protected bool Equals(SaslTpmHandler other)
 {
     return
         (Equals(_endorsementKey, other._endorsementKey) &&
          Equals(_storageRootKey, other._storageRootKey) &&
          string.Equals(_hostName, other._hostName, StringComparison.InvariantCulture) &&
          Equals(_encodedNonceStringBuilder, other._encodedNonceStringBuilder) &&
          Equals(_security, other._security));
 }
Пример #3
0
        public override AmqpSettings CreateAmqpSettings(string idScope)
        {
            var settings = new AmqpSettings();

            var saslProvider = new SaslTransportProvider();

            saslProvider.Versions.Add(AmqpConstants.DefaultProtocolVersion);
            settings.TransportProviders.Add(saslProvider);

            byte[]         ekBuffer   = _security.GetEndorsementKey();
            byte[]         srkBuffer  = _security.GetStorageRootKey();
            SaslTpmHandler tpmHandler = new SaslTpmHandler(ekBuffer, srkBuffer, idScope, _security);

            saslProvider.AddHandler(tpmHandler);

            return(settings);
        }