Exemple #1
0
 internal X509ClientCertificateAuthentication(X509ClientCertificateAuthentication other)
 {
     this.certificateValidationMode            = other.certificateValidationMode;
     this.customCertificateValidator           = other.customCertificateValidator;
     this.includeWindowsGroups                 = other.includeWindowsGroups;
     this.mapClientCertificateToWindowsAccount = other.mapClientCertificateToWindowsAccount;
     this.trustedStoreLocation                 = other.trustedStoreLocation;
     this.revocationMode = other.revocationMode;
     this.isReadOnly     = other.isReadOnly;
 }
 internal X509ClientCertificateAuthentication(X509ClientCertificateAuthentication other)
 {
     this.certificateValidationMode = other.certificateValidationMode;
     this.customCertificateValidator = other.customCertificateValidator;
     this.includeWindowsGroups = other.includeWindowsGroups;
     this.mapClientCertificateToWindowsAccount = other.mapClientCertificateToWindowsAccount;
     this.trustedStoreLocation = other.trustedStoreLocation;
     this.revocationMode = other.revocationMode;
     this.isReadOnly = other.isReadOnly;
 }
 internal void ApplyConfiguration(X509ClientCertificateAuthentication cert)
 {
     if (cert == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("cert");
     }
     cert.CertificateValidationMode = this.CertificateValidationMode;
     cert.RevocationMode = this.RevocationMode;
     cert.TrustedStoreLocation = this.TrustedStoreLocation;
     cert.IncludeWindowsGroups = this.IncludeWindowsGroups;
     cert.MapClientCertificateToWindowsAccount = this.MapClientCertificateToWindowsAccount;
     if (!string.IsNullOrEmpty(this.CustomCertificateValidatorType))
     {
         Type c = Type.GetType(this.CustomCertificateValidatorType, true);
         if (!typeof(X509CertificateValidator).IsAssignableFrom(c))
         {
             throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(System.ServiceModel.SR.GetString("ConfigInvalidCertificateValidatorType", new object[] { this.CustomCertificateValidatorType, typeof(X509CertificateValidator).ToString() })));
         }
         cert.CustomCertificateValidator = (X509CertificateValidator) Activator.CreateInstance(c);
     }
 }
Exemple #4
0
 internal X509CertificateInitiatorServiceCredential(X509CertificateInitiatorServiceCredential other)
 {
     this.certificate    = other.certificate;
     this.authentication = new X509ClientCertificateAuthentication(other.authentication);
     this.isReadOnly     = other.isReadOnly;
 }
Exemple #5
0
 internal X509CertificateInitiatorServiceCredential()
 {
     this.authentication = new X509ClientCertificateAuthentication();
 }
 internal X509CertificateInitiatorServiceCredential(X509CertificateInitiatorServiceCredential other)
 {
     this.certificate = other.certificate;
     this.authentication = new X509ClientCertificateAuthentication(other.authentication);
     this.isReadOnly = other.isReadOnly;
 }
 internal X509CertificateInitiatorServiceCredential()
 {
     this.authentication = new X509ClientCertificateAuthentication();
 }
        X509SecurityTokenAuthenticator CreateClientX509TokenAuthenticator()
        {
            X509ClientCertificateAuthentication authentication = parent.ClientCertificate.Authentication;

            return(new X509SecurityTokenAuthenticator(authentication.GetCertificateValidator(), authentication.MapClientCertificateToWindowsAccount, authentication.IncludeWindowsGroups));
        }