/// <summary> /// Constructor /// </summary> /// <param name="ticketEncryptKey">Encrypt key of the service principle. This parameter cannot be null.</param> /// <exception cref="System.ArgumentNullException">Thrown when the input parameter is null.</exception> public KerberosServerSecurityContext(EncryptionKey ticketEncryptKey) { if (ticketEncryptKey == null) { throw new ArgumentNullException("ticketEncryptKey"); } server = new KileServer(""); server.context = new KileServerContext(); this.ticketEncryptKey = ticketEncryptKey; isInitialToken = true; contextSizes = new SecurityPackageContextSizes(); contextSizes.MaxTokenSize = ConstValue.MAX_TOKEN_SIZE; contextSizes.MaxSignatureSize = ConstValue.MAX_SIGNATURE_SIZE; contextSizes.BlockSize = ConstValue.BLOCK_SIZE; contextSizes.SecurityTrailerSize = ConstValue.SECURITY_TRAILER_SIZE; }
/// <summary> /// Release resources. /// </summary> /// <param name="disposing">If disposing equals true, Managed and unmanaged resources are disposed. /// if false, Only unmanaged resources can be disposed.</param> protected virtual void Dispose(bool disposing) { if (!disposed) { if (disposing) { //Release managed resource. if (server != null) { server.Dispose(); server = null; } } //Note disposing has been done. disposed = true; } }