次の方法で共有


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[]

Secure Sockets Layer (SSL) バインディング ハッシュを表すバイト配列。

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 設定されます。

適用対象