/// <summary>
 /// Constructor
 /// </summary>
 /// <param name="clientCredential">Client account credential.</param>
 /// <param name="serverPrincipal">Server principal.</param>
 /// <param name="contextAttributes">Server security context attributes.</param>
 /// <param name="targetDataRep">The data representation, such as byte ordering, on the target.</param>
 public SspiServerSecurityConfig(
     AccountCredential clientCredential,
     string serverPrincipal,
     ServerSecurityContextAttribute contextAttributes,
     SecurityTargetDataRepresentation targetDataRep)
     : base(SecurityPackageType.Unknown)
 {
     this.clientCredential = clientCredential;
     this.serverPrincipal = serverPrincipal;
     this.securityAttributes = contextAttributes;
     this.targetDataRep = targetDataRep;
 }
Пример #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="clientCredential">Client account credential.</param>
 /// <param name="serverPrincipal">Server principal.</param>
 /// <param name="contextAttributes">Server security context attributes.</param>
 /// <param name="targetDataRep">The data representation, such as byte ordering, on the target.</param>
 public SspiServerSecurityConfig(
     AccountCredential clientCredential,
     string serverPrincipal,
     ServerSecurityContextAttribute contextAttributes,
     SecurityTargetDataRepresentation targetDataRep)
     : base(SecurityPackageType.Unknown)
 {
     this.clientCredential   = clientCredential;
     this.serverPrincipal    = serverPrincipal;
     this.securityAttributes = contextAttributes;
     this.targetDataRep      = targetDataRep;
 }
Пример #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="packageType">Specifies the name of the security package with which these credentials will be used
 /// </param>
 /// <param name="serverCredential">The credential of server, if null, use default user account.</param>
 /// <param name="serverPrincipal">Server principal name</param>
 /// <param name="contextAttributes">Bit flags that specify the attributes required by the server to establish
 /// the context</param>
 /// <param name="targetDataRep">The data representation, such as byte ordering, on the target. This parameter
 /// can be either SECURITY_NATIVE_DREP or SECURITY_NETWORK_DREP.</param>
 public SspiServerSecurityContext(
     SecurityPackageType packageType,
     CertificateCredential serverCredential,
     string serverPrincipal,
     ServerSecurityContextAttribute contextAttributes,
     SecurityTargetDataRepresentation targetDataRep)
 {
     this.packageType               = packageType;
     this.serverPrincipalName       = serverPrincipal;
     this.securityContextAttributes = contextAttributes;
     this.targetDataRepresentaion   = targetDataRep;
     this.AcquireCredentialsHandle(serverCredential);
 }
        public DtlsServerSecurityContext(
            SecurityPackageType packageType,
            CertificateCredential serverCredential,
            string serverPrincipal,
            ServerSecurityContextAttribute contextAttributes,
            SecurityTargetDataRepresentation targetDataRep)
        {
            this.packageType               = packageType;
            this.serverPrincipalName       = serverPrincipal;
            this.securityContextAttributes = contextAttributes;
            this.targetDataRepresentaion   = targetDataRep;

            this.Context = new Sspi.DtlsServerSecurityContext(packageType, serverCredential, serverPrincipal, contextAttributes, targetDataRep);
        }
Пример #5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="packageType">Specifies the name of the security package with which these credentials will be used
 /// </param>
 /// <param name="serverCredential">The credential of server, if null, use default user account.</param>
 /// <param name="serverPrincipal">Server principal name</param>
 /// <param name="contextAttributes">Bit flags that specify the attributes required by the server to establish
 /// the context</param>
 /// <param name="targetDataRep">The data representation, such as byte ordering, on the target. This parameter
 /// can be either SECURITY_NATIVE_DREP or SECURITY_NETWORK_DREP.</param>
 public SspiServerSecurityContext(
     SecurityPackageType packageType,
     AccountCredential serverCredential,
     string serverPrincipal,
     ServerSecurityContextAttribute contextAttributes,
     SecurityTargetDataRepresentation targetDataRep)
 {
     this.packageType               = packageType;
     this.serverPrincipalName       = serverPrincipal;
     this.securityContextAttributes = contextAttributes;
     this.targetDataRepresentaion   = targetDataRep;
     SspiUtility.AcquireCredentialsHandle(
         packageType,
         serverCredential,
         serverPrincipal,
         NativeMethods.SECPKG_CRED_INBOUND,
         out this.credentialHandle);
 }
        public DtlsServerSecurityContext(
            SecurityPackageType packageType,
            CertificateCredential serverCredential,
            string serverPrincipal,
            ServerSecurityContextAttribute contextAttributes,
            SecurityTargetDataRepresentation targetDataRep)
        {
            this.packageType = packageType;
            this.serverPrincipalName = serverPrincipal;
            this.securityContextAttributes = contextAttributes;
            this.targetDataRepresentaion = targetDataRep;
            SspiUtility.DtlsAcquireCredentialsHandle(
                packageType,
                serverCredential,
                serverPrincipal,
                NativeMethods.SECPKG_CRED_INBOUND,
                out this.credentialHandle);

            bStreamSizes = false;
            hasMoreFragments = false;
        }
Пример #7
0
        public DtlsServerSecurityContext(
            SecurityPackageType packageType,
            CertificateCredential serverCredential,
            string serverPrincipal,
            ServerSecurityContextAttribute contextAttributes,
            SecurityTargetDataRepresentation targetDataRep)
        {
            this.packageType               = packageType;
            this.serverPrincipalName       = serverPrincipal;
            this.securityContextAttributes = contextAttributes;
            this.targetDataRepresentaion   = targetDataRep;
            SspiUtility.DtlsAcquireCredentialsHandle(
                packageType,
                serverCredential,
                serverPrincipal,
                NativeMethods.SECPKG_CRED_INBOUND,
                out this.credentialHandle);

            bStreamSizes     = false;
            hasMoreFragments = false;
        }
 public SspiServerSecurityContext(
     SecurityPackageType packageType,
     AccountCredential serverCredential,
     string serverPrincipal,
     ServerSecurityContextAttribute contextAttributes,
     SecurityTargetDataRepresentation targetDataRep)
 {
     this.packageType = packageType;
     this.serverPrincipalName = serverPrincipal;
     this.securityContextAttributes = contextAttributes;
     this.targetDataRepresentaion = targetDataRep;
     SspiUtility.AcquireCredentialsHandle(
         packageType,
         serverCredential,
         serverPrincipal,
         NativeMethods.SECPKG_CRED_INBOUND,
         out this.credentialHandle);
 }