다음을 통해 공유


Binding.CertificateHash 속성

정의

바인딩할 인증서의 해시를 가져오거나 설정합니다.

public:
 property cli::array <System::Byte> ^ CertificateHash { cli::array <System::Byte> ^ get(); void set(cli::array <System::Byte> ^ value); };
public byte[] CertificateHash { get; set; }
member this.CertificateHash : byte[] with get, set
Public Property CertificateHash As Byte()

속성 값

Byte[]

SSL(Secure Sockets Layer) 바인딩 해시를 나타내는 바이트 배열입니다.

예제

다음 예제는 CertificateHash 속성입니다. 프로토콜 식별자가 "https"인 경우 인증서 해시 및 인증서 저장소 이름이 표시됩니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 Binding 클래스입니다.

if (binding.Protocol == "https")
{
     // There is a CertificateHash and  
     // CertificateStoreName for the https protocol only.
    bindingdisplay = bindingdisplay + "\n   CertificateHash: " + 
        binding.CertificateHash + ": ";
    // Display the hash.
    foreach (System.Byte certhashbyte in binding.CertificateHash)
    {
        bindingdisplay = bindingdisplay + certhashbyte.ToString() + " ";
    }
    bindingdisplay = bindingdisplay + "\n   CertificateStoreName: " + 
        binding.CertificateStoreName;
}

설명

속성에는 CertificateHash SSL 바인딩에 대한 인증서 해시가 포함되어 있습니다. 인증서 해시는 인증서의 고유 식별자입니다.

속성은 CertificateHash 속성에 정의된 Protocol 프로토콜 식별자가 "https"인 경우에만 사용할 수 있습니다. "http"의 프로토콜을 사용하여 바인딩에 CertificateHash 대한 속성을 얻거나 설정하려고 하면 오류가 발생합니다.

속성의 CertificateHash 값은 개체에 설정됩니다 BindingCollection .

적용 대상