Evidence 클래스

정의

보안 정책 결정의 입력을 구성하는 정보 집합을 정의합니다.Defines the set of information that constitutes input to security policy decisions. 이 클래스는 상속될 수 없습니다.This class cannot be inherited.

public ref class Evidence sealed : System::Collections::ICollection
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public sealed class Evidence : System.Collections.ICollection
type Evidence = class
    interface ICollection
    interface IEnumerable
Public NotInheritable Class Evidence
Implements ICollection
상속
Evidence
특성
구현

예제

다음 코드 예제에는 새로 만드는 방법을 보여 줍니다 Evidence 둘 다를 사용 하 여 클래스 및 어셈블리 증명 정보를 호스트 합니다.The following code example demonstrates how to create new Evidence classes with both host evidence and assembly evidence.

using namespace System;
using namespace System::Collections;
using namespace System::Security;
using namespace System::Security::Policy;
using namespace System::Security::Permissions;
using namespace System::Globalization;
public ref class Evidence_Example
{
public:
   bool CreateEvidence()
   {
      bool retVal = true;
      try
      {
         // Create empty evidence using the default contructor.
         Evidence^ ev1 = gcnew Evidence;
         Console::WriteLine( "Created empty evidence with the default constructor." );

         // Constructor used to create null host evidence.
         Evidence^ ev2a = gcnew Evidence( nullptr );
         Console::WriteLine( "Created an Evidence object with null host evidence." );

         // Constructor used to create host evidence.
         Url^ url = gcnew Url( "http://www.treyresearch.com" );
         Console::WriteLine( "Adding host evidence {0}", url );
         ev2a->AddHost( url );
         Evidence^ ev2b = gcnew Evidence( ev2a );
         Console::WriteLine( "Copy evidence into new evidence" );
         IEnumerator^ enum1 = ev2b->GetHostEnumerator();
         enum1->MoveNext();
         Console::WriteLine( enum1->Current );

         // Constructor used to create both host and assembly evidence.
         array<Object^>^oa1 = {};
         Site^ site = gcnew Site( "www.wideworldimporters.com" );
         array<Object^>^oa2 = {url,site};
         Evidence^ ev3a = gcnew Evidence( oa1,oa2 );
         enum1 = ev3a->GetHostEnumerator();
         IEnumerator^ enum2 = ev3a->GetAssemblyEnumerator();
         enum2->MoveNext();
         Object^ obj1 = enum2->Current;
         enum2->MoveNext();
         Console::WriteLine( "URL = {0}  Site = {1}", obj1, enum2->Current );
         
         // Constructor used to create null host and null assembly evidence.
         Evidence^ ev3b = gcnew Evidence( (array<Object^>^)nullptr, (array<Object^>^)nullptr );
         Console::WriteLine( "Create new evidence with null host and assembly evidence" );
      }
      catch ( Exception^ e )
      {
         Console::WriteLine( "Fatal error: {0}", e );
         return false;
      }

      return retVal;
   }

   Evidence^ DemonstrateEvidenceMembers()
   {
      Evidence^ myEvidence = gcnew Evidence;
      String^ sPubKeyBlob = "00240000048000009400000006020000"
      "00240000525341310004000001000100"
      "19390E945A40FB5730204A25FA5DC4DA"
      "B18688B412CB0EDB87A6EFC50E2796C9"
      "B41AD3040A7E46E4A02516C598678636"
      "44A0F74C39B7AB9C38C01F10AF4A5752"
      "BFBCDF7E6DD826676AD031E7BCE63393"
      "495BAD2CA4BE03B529A73C95E5B06BE7"
      "35CA0F622C63E8F54171BD73E4C8F193"
      "CB2664163719CA41F8159B8AC88F8CD3";
      array<Byte>^pubkey = HexsToArray( sPubKeyBlob );

      // Create a strong name.
      StrongName^ mSN = gcnew StrongName( gcnew StrongNamePublicKeyBlob( pubkey ),"SN01",gcnew Version( "0.0.0.0" ) );

      // Create assembly and host evidence.
      Console::WriteLine( "Adding assembly evidence." );
      myEvidence->AddAssembly( "SN01" );
      myEvidence->AddAssembly( gcnew Version( "0.0.0.0" ) );
      myEvidence->AddAssembly( mSN );
      Console::WriteLine( "Count of evidence items = {0}", myEvidence->Count );

      Url^ url = gcnew Url( "http://www.treyresearch.com" );
      Console::WriteLine( "Adding host evidence {0}", url );
      myEvidence->AddHost( url );
      PrintEvidence( myEvidence ).ToString();
      Console::WriteLine( "Count of evidence items = {0}", myEvidence->Count );

      Console::WriteLine( "\nCopy the evidence to an array using CopyTo, then display the array." );
      array<Object^>^evidenceArray = gcnew array<Object^>(myEvidence->Count);
      myEvidence->CopyTo( evidenceArray, 0 );
      for each (Object^ obj in evidenceArray)
      {
         Console::WriteLine(obj->ToString());
      }

      Console::WriteLine( "\nDisplay the contents of the properties." );
      Console::WriteLine( "Locked is the only property normally used by code." );
      Console::WriteLine( "IsReadOnly, IsSynchronized, and SyncRoot properties are not normally used." );
      
      Console::WriteLine( "\nThe default value for the Locked property = {0}", myEvidence->Locked );

      Console::WriteLine( "\nGet the hashcode for the evidence." );
      Console::WriteLine( "HashCode = {0}", myEvidence->GetHashCode() );

      Console::WriteLine( "\nGet the type for the evidence." );
      Console::WriteLine( "Type = {0}", myEvidence->GetType() );

      Console::WriteLine( "\nMerge new evidence with the current evidence." );
      array<Object^>^oa1 = {};
      Site^ site = gcnew Site( "www.wideworldimporters.com" );
      array<Object^>^oa2 = {url,site};
      Evidence^ newEvidence = gcnew Evidence( oa1,oa2 );
      myEvidence->Merge( newEvidence );
      Console::WriteLine( "Evidence count = {0}", PrintEvidence( myEvidence ) );

      Console::WriteLine( "\nRemove URL evidence." );
      myEvidence->RemoveType( url->GetType() );
      Console::WriteLine( "Evidence count is now: {0}", myEvidence->Count );

      Console::WriteLine( "\nMake a copy of the current evidence." );
      Evidence^ evidenceCopy = gcnew Evidence( myEvidence );
      Console::WriteLine( "Count of new evidence items = {0}", evidenceCopy->Count );
      Console::WriteLine( "Does the copy equal the current evidence? {0}", myEvidence->Equals( evidenceCopy ) );

      Console::WriteLine( "\nClear the current evidence." );
      myEvidence->Clear();
      Console::WriteLine( "Count is now {0}", myEvidence->Count );

      return myEvidence;
   }

   static int PrintEvidence( Evidence^ myEvidence )
   {
      int p = 0;
      Console::WriteLine( "\nCurrent evidence = " );
      if ( nullptr == myEvidence )
            return 0;

      IEnumerator^ list = myEvidence->GetEnumerator();
      IEnumerator^ myEnum1 = list;
      while ( myEnum1->MoveNext() )
      {
         Object^ obj = safe_cast<Object^>(myEnum1->Current);
         Console::WriteLine( obj );
         p++;
      }

      Console::WriteLine( "\n" );
      return p;
   }

   // Convert a hexadecimal string to an array.
   static array<Byte>^ HexsToArray( String^ sHexString )
   {
      array<Byte>^arr = gcnew array<Byte>(sHexString->Length / 2);
      for ( int i = 0; i < sHexString->Length; i += 2 )
      {
         arr[ i / 2 ] = Byte::Parse( sHexString->Substring( i, 2 ), NumberStyles::HexNumber );

      }
      return arr;
   }
};


// Main method.
int main()
{
   try
   {
      Evidence_Example^ EvidenceTest = gcnew Evidence_Example;
      bool ret = EvidenceTest->CreateEvidence();
      if ( ret )
      {
         Console::WriteLine( "Evidence successfully created." );
      }
      else
      {
         Console::WriteLine( "Evidence creation failed." );
      }
      EvidenceTest->DemonstrateEvidenceMembers();
   }
   catch ( Exception^ e ) 
   {
      Console::WriteLine( e );
      Environment::ExitCode = 101;
   }
}

using System;
using System.Collections;
using System.Security;
using System.Security.Policy;
using System.Security.Permissions;
using System.Globalization;

public class Evidence_Example
{
    public bool CreateEvidence()
    {
        bool retVal = true;

        try
        {
            // Create empty evidence using the default contructor.
            Evidence ev1 = new Evidence();
            Console.WriteLine("Created empty evidence with the default constructor.");

            // Constructor used to create null host evidence.
            Evidence ev2a = new Evidence(null);
            Console.WriteLine("Created an Evidence object with null host evidence.");

            // Constructor used to create host evidence.
            Url url = new Url("http://www.treyresearch.com");
            Console.WriteLine("Adding host evidence " + url.ToString());
            ev2a.AddHost(url);
            Evidence ev2b = new Evidence(ev2a);
            Console.WriteLine("Copy evidence into new evidence");
            IEnumerator enum1 = ev2b.GetHostEnumerator();
            enum1.MoveNext();
            Console.WriteLine(enum1.Current.ToString());
            
            // Constructor used to create both host and assembly evidence.
            Object [] oa1 = {};
            Site site = new Site("www.wideworldimporters.com");
            Object [] oa2 = { url, site };
            Evidence ev3a = new Evidence(oa1, oa2);
            enum1 = ev3a.GetHostEnumerator();
            IEnumerator enum2 = ev3a.GetAssemblyEnumerator();
            enum2.MoveNext();
            Object obj1 = enum2.Current;
            enum2.MoveNext();
            Console.WriteLine("URL = " + obj1.ToString() + "  Site = " + enum2.Current.ToString());
            
            // Constructor used to create null host and null assembly evidence.
            Evidence ev3b = new Evidence(null, null);
            Console.WriteLine("Create new evidence with null host and assembly evidence");
            
        }
        catch (Exception e)
        {
            Console.WriteLine("Fatal error: {0}", e.ToString());
            return false;
        }

        return retVal;
    }
    public Evidence DemonstrateEvidenceMembers()
    {
        Evidence myEvidence = new Evidence();
        string sPubKeyBlob =	"00240000048000009400000006020000" + 
            "00240000525341310004000001000100" + 
            "19390E945A40FB5730204A25FA5DC4DA" + 
            "B18688B412CB0EDB87A6EFC50E2796C9" + 
            "B41AD3040A7E46E4A02516C598678636" + 
            "44A0F74C39B7AB9C38C01F10AF4A5752" + 
            "BFBCDF7E6DD826676AD031E7BCE63393" + 
            "495BAD2CA4BE03B529A73C95E5B06BE7" + 
            "35CA0F622C63E8F54171BD73E4C8F193" + 
            "CB2664163719CA41F8159B8AC88F8CD3";
        Byte[] pubkey = HexsToArray(sPubKeyBlob);

        // Create a strong name.
        StrongName mSN = new StrongName(new StrongNamePublicKeyBlob(pubkey), "SN01", new Version("0.0.0.0"));

        // Create assembly and host evidence.
        Console.WriteLine("Adding assembly evidence.");
        myEvidence.AddAssembly("SN01");
        myEvidence.AddAssembly(new Version("0.0.0.0"));
        myEvidence.AddAssembly(mSN);
        Console.WriteLine("Count of evidence items = " + myEvidence.Count.ToString());
        Url url = new Url("http://www.treyresearch.com");
        Console.WriteLine("Adding host evidence " + url.ToString());
        myEvidence.AddHost(url);
        PrintEvidence(myEvidence).ToString();
        Console.WriteLine("Count of evidence items = " + myEvidence.Count.ToString());
        Console.WriteLine("\nCopy the evidence to an array using CopyTo, then display the array.");
        object[] evidenceArray = new object[myEvidence.Count];
        myEvidence.CopyTo(evidenceArray, 0);
        foreach (object obj in evidenceArray)
        {
            Console.WriteLine(obj.ToString());
        }
        Console.WriteLine("\nDisplay the contents of the properties.");
        Console.WriteLine("Locked is the only property normally used by code.");
        Console.WriteLine("IsReadOnly, IsSynchronized, and SyncRoot properties are not normally used.");
        Console.WriteLine("\nThe default value for the Locked property = " + myEvidence.Locked.ToString());
        
        Console.WriteLine("\nGet the hashcode for the evidence.");
        Console.WriteLine("HashCode = " + myEvidence.GetHashCode().ToString());
        Console.WriteLine("\nGet the type for the evidence.");
        Console.WriteLine("Type = " + myEvidence.GetType().ToString());
        Console.WriteLine("\nMerge new evidence with the current evidence.");
        Object [] oa1 = {};
        Site site = new Site("www.wideworldimporters.com");
        Object [] oa2 = { url, site };
        Evidence newEvidence = new Evidence(oa1, oa2);
        myEvidence.Merge(newEvidence);
        Console.WriteLine("Evidence count = " + PrintEvidence(myEvidence).ToString());
        Console.WriteLine("\nRemove URL evidence.");
        myEvidence.RemoveType(url.GetType());
        Console.WriteLine("Evidence count is now: " + myEvidence.Count.ToString());
        Console.WriteLine("\nMake a copy of the current evidence.");
        Evidence evidenceCopy = new Evidence(myEvidence);
        Console.WriteLine("Count of new evidence items = " + evidenceCopy.Count);
        Console.WriteLine("Does the copy equal the current evidence? " + myEvidence.Equals(evidenceCopy));
        Console.WriteLine("\nClear the current evidence.");
        myEvidence.Clear();
        Console.WriteLine("Count is now " + myEvidence.Count.ToString());
        return myEvidence;
    }
    public static int PrintEvidence(Evidence myEvidence)
    {
        int p = 0;
        Console.WriteLine("\nCurrent evidence = ");
        if (null == myEvidence) return 0;
        IEnumerator list = myEvidence.GetEnumerator();
        while (list.MoveNext())
        {
            Console.WriteLine(list.Current.ToString());
        }

        Console.WriteLine("\n");
        return p;
    }
    // Convert a hexidecimal string to an array.
    public static byte[] HexsToArray(string sHexString)
    {
        Byte[] array = new Byte[sHexString.Length/2];
        for (int i = 0; i < sHexString.Length; i += 2)
        {
            array[i / 2] = Byte.Parse(sHexString.Substring(i, 2), NumberStyles.HexNumber);
        }
        return array;
    }



    // Main method.
    public static void Main()
    {
        try
        {
            Evidence_Example EvidenceTest = new Evidence_Example();
            bool ret = EvidenceTest.CreateEvidence();
            if (ret)
            {
                Console.WriteLine("Evidence successfully created.");
            }
            else
            {
                Console.WriteLine("Evidence creation failed.");
            }
            
            EvidenceTest.DemonstrateEvidenceMembers();
        }
        catch(Exception e)
        {
    
            Console.WriteLine(e.ToString());
            Environment.ExitCode = 101;
        }
    }
}
Imports System.Collections
Imports System.Security
Imports System.Security.Policy
Imports System.Security.Permissions
Imports System.Globalization

Public Class Evidence_Example

    Public Function CreateEvidence() As Boolean
        Dim retVal As Boolean = True

        Try
            ' Create empty evidence using the default contructor.
            Dim ev1 As New Evidence
            Console.WriteLine("Created empty evidence with the default constructor.")

            ' Constructor used to create null host evidence.
            Dim ev2a As New Evidence(Nothing)
            Console.WriteLine("Created an Evidence object with null host evidence.")

            ' Constructor used to create host evidence.
            Dim url As New Url("http://www.treyresearch.com")
            Console.WriteLine(("Adding host evidence " & url.ToString()))
            ev2a.AddHost(url)
            Dim ev2b As New Evidence(ev2a)
            Console.WriteLine("Copy evidence into new evidence")
            Dim enum1 As IEnumerator = ev2b.GetHostEnumerator()
            enum1.MoveNext()
            Console.WriteLine(enum1.Current.ToString())
            ' Constructor used to create both host and assembly evidence.
            Dim oa1() As [Object]
            Dim site As New Site("www.wideworldimporters.com")
            Dim oa2 As [Object]() = {url, site}
            Dim ev3a As New Evidence(oa1, oa2)
            enum1 = ev3a.GetHostEnumerator()
            Dim enum2 As IEnumerator = ev3a.GetAssemblyEnumerator()
            enum2.MoveNext()
            Dim obj1 As [Object] = enum2.Current
            enum2.MoveNext()
            Console.WriteLine(("URL = " & obj1.ToString() & "  Site = " & enum2.Current.ToString()))
            ' Constructor used to create null host and null assembly evidence.
            Dim ev3b As New Evidence(Nothing, Nothing)
            Console.WriteLine("Create new evidence with null host and assembly evidence")

        Catch e As Exception
            Console.WriteLine("Fatal error: {0}", e.ToString())
            Return False
        End Try

        Return retVal
    End Function 'CreateEvidence

    Public Function DemonstrateEvidenceMembers() As Evidence
        Dim myEvidence As New Evidence
        Dim sPubKeyBlob As String = "00240000048000009400000006020000" & "00240000525341310004000001000100" & "19390E945A40FB5730204A25FA5DC4DA" & "B18688B412CB0EDB87A6EFC50E2796C9" & "B41AD3040A7E46E4A02516C598678636" & "44A0F74C39B7AB9C38C01F10AF4A5752" & "BFBCDF7E6DD826676AD031E7BCE63393" & "495BAD2CA4BE03B529A73C95E5B06BE7" & "35CA0F622C63E8F54171BD73E4C8F193" & "CB2664163719CA41F8159B8AC88F8CD3"
        Dim pubkey As [Byte]() = HexsToArray(sPubKeyBlob)

        ' Create a strong name.
        Dim mSN As New StrongName(New StrongNamePublicKeyBlob(pubkey), "SN01", New Version("0.0.0.0"))

        ' Create assembly and host evidence.
        Console.WriteLine("Adding assembly evidence.")
        myEvidence.AddAssembly("SN01")
        myEvidence.AddAssembly(New Version("0.0.0.0"))
        myEvidence.AddAssembly(mSN)
        Console.WriteLine(("Count of evidence items = " & myEvidence.Count.ToString()))
        Dim url As New Url("http://www.treyresearch.com")
        Console.WriteLine(("Adding host evidence " & url.ToString()))
        myEvidence.AddHost(url)
        PrintEvidence(myEvidence).ToString()
        Console.WriteLine(("Count of evidence items = " & myEvidence.Count.ToString()))
        Console.WriteLine(ControlChars.Lf & "Copy the evidence to an array using CopyTo, then display the array.")
        Dim evidenceArray(myEvidence.Count - 1) As Object
        myEvidence.CopyTo(evidenceArray, 0)
        Dim obj As Object
        For Each obj In evidenceArray
            Console.WriteLine(obj.ToString())
        Next obj
        Console.WriteLine(ControlChars.Lf & "Display the contents of the properties.")
        Console.WriteLine("Locked is the only property normally used by code.")
        Console.WriteLine("IsReadOnly, IsSynchronized, and SyncRoot properties are not normally used.")
        Console.WriteLine((ControlChars.Lf & "The default value for the Locked property = " & myEvidence.Locked.ToString()))
        Console.WriteLine(ControlChars.Lf & "Get the hashcode for the evidence.")
        Console.WriteLine(("HashCode = " & myEvidence.GetHashCode().ToString()))
        Console.WriteLine(ControlChars.Lf & "Get the type for the evidence.")
        Console.WriteLine(("Type = " & myEvidence.GetType().ToString()))
        Console.WriteLine(ControlChars.Lf & "Merge new evidence with the current evidence.")
        Dim oa1() As [Object]
        Dim site As New Site("www.wideworldimporters.com")
        Dim oa2 As [Object]() = {url, site}
        Dim newEvidence As New Evidence(oa1, oa2)
        myEvidence.Merge(newEvidence)

        Console.WriteLine(("Evidence count = " & PrintEvidence(myEvidence).ToString()))
        Console.WriteLine(ControlChars.Lf & "Remove URL evidence.")
        myEvidence.RemoveType(url.GetType())
        Console.WriteLine(("Evidence count is now: " & myEvidence.Count.ToString()))
        Console.WriteLine(ControlChars.Lf & "Make a copy of the current evidence.")
        Dim evidenceCopy As New Evidence(myEvidence)
        Console.WriteLine(("Count of new evidence items = " & evidenceCopy.Count.ToString()))
        Console.WriteLine(("Does the copy equal the current evidence? " & myEvidence.Equals(evidenceCopy)))
        Console.WriteLine(ControlChars.Lf & "Clear the current evidence.")
        myEvidence.Clear()
        Console.WriteLine(("Count is now " & myEvidence.Count.ToString()))
        Return myEvidence
    End Function 'DemonstrateEvidenceMembers

    Public Shared Function PrintEvidence(ByVal myEvidence As Evidence) As Integer
        Dim p As Integer = 0
        Console.WriteLine(ControlChars.Lf & "Current evidence = ")
        If myEvidence Is Nothing Then
            Return 0
        End If
        Dim list As IEnumerator = myEvidence.GetEnumerator()
        Dim obj As Object
        While list.MoveNext()
            Console.WriteLine(list.Current.ToString())
            p = p + 1
        End While
        Console.WriteLine(ControlChars.Lf)
        Return p
    End Function 'PrintEvidence

    ' Convert a hexidecimal string to an array.
    Public Shared Function HexsToArray(ByVal sHexString As String) As Byte()
        Dim array(sHexString.Length / 2) As [Byte]
        Dim i As Integer
        For i = 0 To sHexString.Length - 2 Step 2
            array((i / 2)) = [Byte].Parse(sHexString.Substring(i, 2), NumberStyles.HexNumber)
        Next i
        Return array
    End Function 'HexsToArray




    ' Main method.
    Public Shared Sub Main()
        Try
            Dim EvidenceTest As New Evidence_Example
            Dim ret As Boolean = EvidenceTest.CreateEvidence()
            If ret Then
                Console.WriteLine("Evidence successfully created.")
            Else
                Console.WriteLine("Evidence creation failed.")
            End If

            EvidenceTest.DemonstrateEvidenceMembers()
        Catch e As Exception
            Console.WriteLine(e.ToString())
            Environment.ExitCode = 101
        End Try
    End Sub
End Class

설명

증명 정보의 일반적인 형식 서명 및 원본 코드의 위치를 포함 하지만 아무 것도 될 수 있습니다.Common forms of evidence include signatures and location of origin of code, but can potentially be anything. 보안 정책에 의해 인식 되는 모든 형식의 개체는 증명 정보를 나타냅니다.Objects of any type that are recognized by security policy represent evidence.

코드 그룹의 보안 정책 구성 됩니다. 특정 어셈블리 (보안 권한 부여에 대 한 코드의 기본 단위)를 코드 그룹의 멤버인 경우 코드 그룹의 멤버 자격 조건을 충족 합니다.Security policy is composed of code groups; a particular assembly (the basic unit of code for granting security permissions) is a member of a code group if it satisfies the code group's membership condition. 증명 정보는 멤버 자격 조건 사용 하 여 어셈블리가 코드 그룹에 속하는지 확인 하는 정책에 대 한 입력 집합입니다.Evidence is the set of inputs to policy that membership conditions use to determine to which code groups an assembly belongs.

합니다 Evidence 클래스는 컬렉션 (참조 ICollection) 증명 정보를 나타내는 개체의 집합을 보유 하는 합니다.The Evidence class is a collection (see ICollection) that holds a set of objects that represent evidence. 이 클래스의 증명 정보 원본에 해당 하는 두 집합을 보유 합니다: 호스트 및 어셈블리 증명 정보입니다.This class holds two sets that correspond to the source of the evidence: host evidence and assembly evidence.

정책 코드에 대 한 사용 권한을 평가 하는 경우 두 가지 원본에서 증명 정보를 가져올 수 있습니다.Policy can get evidence from two different sources when evaluating permissions for code.

  • Host evidence 허용 된 호스트에서 제공 될 수 있습니다 하 고 호스트에서 제공 되는 ControlEvidence 권한.Host evidence is provided by the host, and can only be provided by hosts that have been granted the ControlEvidence permission. 일반적으로 이것이 코드 및 어셈블리에 디지털 서명이 원본 증명 정보입니다.Typically, this is evidence of the origin of the code and digital signatures on the assembly. 일반적으로 원본에 대 한 증명 정보를 포함 Url, Site, 및 Zone 증명 정보입니다.Evidence about origin typically includes Url, Site, and Zone evidence. 서명은은 소프트웨어 게시자 (AuthentiCode X.509v3 서명) 및 강력한 이름 id를 참조 하십시오.Signatures refer to software publisher (AuthentiCode X.509v3 signature) and strong name identities. 두 종류의 디지털 서명을 기반 id 어셈블리로 빌드됩니다 있지만 여야 유효성을 검사 하며 호스트;에서 정책에 전달 로드 되 면 보안 시스템에서 서명을 확인 합니다.Both kinds of digital signature-based identity are built into the assembly, but must be validated and passed to policy by the host; when loaded, the security system verifies the signature. 시스템 후 적절 한 증명 정보를 만들고 해당 서명이 유효 하는 경우에 정책에 전달 합니다.The system then creates the appropriate evidence and passes it to policy only if the corresponding signature is valid.

  • Assembly evidence 어셈블리 자체의 일부가입니다.Assembly evidence is part of the assembly itself. 개발자 또는 관리자 정책에 대 한 증명 정보 집합을 확장 하 여 어셈블리 사용자 지정 증명 정보를 연결할 수 있습니다.Developers or administrators can attach custom evidence to the assembly to extend the set of evidence for policy. 어셈블리 증명 정보는 어셈블리를 서명 하기 전에 발생 하는 어셈블리 생성 시만 추가할 수 있습니다.Assembly evidence can only be added at the time of assembly generation, which occurs before the assembly is signed. 보안 시스템의 기본 정책 어셈블리에서 제공한 증명 정보를 무시 하지만 정책 수락 하도록 확장할 수 있습니다.The default policy of the security system ignores assembly-provided evidence, but policy can be extended to accept it.

생성자

Evidence()

Evidence 클래스의 비어 있는 새 인스턴스를 초기화합니다.Initializes a new empty instance of the Evidence class.

Evidence(Evidence)

기존 Evidence 클래스의 단순 복사본에서 해당 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the Evidence class from a shallow copy of an existing one.

Evidence(EvidenceBase[], EvidenceBase[])

호스트 및 어셈블리 증명 정보의 여러 집합에서 Evidence 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the Evidence class from multiple sets of host and assembly evidence.

Evidence(Object[], Object[])

호스트 및 어셈블리 증명 정보의 여러 집합에서 Evidence 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the Evidence class from multiple sets of host and assembly evidence.

속성

Count

증명 정보 집합의 증명 정보 개체 수를 가져옵니다.Gets the number of evidence objects in the evidence set.

IsReadOnly

증명 정보 집합이 읽기 전용인지 여부를 나타내는 값을 가져옵니다.Gets a value indicating whether the evidence set is read-only.

IsSynchronized

증명 정보 집합이 스레드로부터 안전한지 여부를 나타내는 값을 가져옵니다.Gets a value indicating whether the evidence set is thread-safe.

Locked

증명 정보가 잠겨 있는지 여부를 나타내는 값을 가져오거나 설정합니다.Gets or sets a value indicating whether the evidence is locked.

SyncRoot

동기화 루트를 가져옵니다.Gets the synchronization root.

메서드

AddAssembly(Object)

지정된 어셈블리 증명 정보를 증명 정보 집합에 추가합니다.Adds the specified assembly evidence to the evidence set.

AddAssemblyEvidence<T>(T)

지정된 형식의 증명 정보 개체를 어셈블리에서 제공한 증명 정보 목록에 추가합니다.Adds an evidence object of the specified type to the assembly-supplied evidence list.

AddHost(Object)

호스트에서 제공한 지정된 증명 정보를 증명 정보 집합에 추가합니다.Adds the specified evidence supplied by the host to the evidence set.

AddHostEvidence<T>(T)

지정된 형식의 호스트 증명 정보를 호스트 증명 정보 컬렉션에 추가합니다.Adds host evidence of the specified type to the host evidence collection.

Clear()

호스트 및 어셈블리 증명 정보를 증명 정보 집합에서 제거합니다.Removes the host and assembly evidence from the evidence set.

Clone()

이 증명 정보 개체의 복사본을 반환합니다.Returns a duplicate copy of this evidence object.

CopyTo(Array, Int32)

증명 정보 개체를 Array에 복사합니다.Copies evidence objects to an Array.

Equals(Object)

지정한 Evidence 개체가 현재 Evidence과 같은지 여부를 확인합니다.Determines whether the specified Evidence object is equal to the current Evidence.

GetAssemblyEnumerator()

어셈블리에서 제공한 증명 정보를 나열합니다.Enumerates evidence provided by the assembly.

GetAssemblyEvidence<T>()

지정된 형식의 어셈블리 증명 정보를 컬렉션에서 가져옵니다.Gets assembly evidence of the specified type from the collection.

GetEnumerator()

모든 증명 정보, 즉 호스트에서 제공한 증명 정보와 어셈블리에서 제공한 증명 정보를 집합으로 나열합니다.Enumerates all evidence in the set, both that provided by the host and that provided by the assembly.

GetHashCode()

해시 알고리즘과 해시 테이블 같은 데이터 구조에 사용하기 적합한 Evidence 개체에 대한 해시 코드를 가져옵니다.Gets a hash code for the Evidence object that is suitable for use in hashing algorithms and data structures such as a hash table.

GetHostEnumerator()

호스트에서 제공한 증명 정보를 나열합니다.Enumerates evidence supplied by the host.

GetHostEvidence<T>()

지정된 형식의 호스트 증명 정보를 컬렉션에서 가져옵니다.Gets host evidence of the specified type from the collection.

GetType()

현재 인스턴스의 Type을 가져옵니다.Gets the Type of the current instance.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.Creates a shallow copy of the current Object.

(다음에서 상속됨 Object)
Merge(Evidence)

지정된 증명 정보 집합을 현재 증명 정보 집합에 병합합니다.Merges the specified evidence set into the current evidence set.

RemoveType(Type)

지정한 형식의 증명 정보를 호스트 및 어셈블리 열거형에서 제거합니다.Removes the evidence for a given type from the host and assembly enumerations.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.Returns a string that represents the current object.

(다음에서 상속됨 Object)

확장 메서드

Cast<TResult>(IEnumerable)

IEnumerable의 요소를 지정된 형식으로 캐스팅합니다.Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

지정된 형식에 따라 IEnumerable의 요소를 필터링합니다.Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

쿼리를 병렬화할 수 있도록 합니다.Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerableIQueryable로 변환합니다.Converts an IEnumerable to an IQueryable.

적용 대상