Binding.CertificateHash Propriété

Définition

Obtient ou définit le hachage du certificat à lier.

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()

Valeur de propriété

Byte[]

Tableau d’octets qui représente le hachage de liaison SSL (Secure Sockets Layer).

Exemples

L’exemple suivant illustre la CertificateHash propriété . Si l’identificateur de protocole est « https », le hachage du certificat et le nom du magasin de certificats s’affichent. Cet exemple de code fait partie d’un exemple plus grand fourni pour la Binding classe .

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;
}

Remarques

La CertificateHash propriété contient le hachage de certificat pour la liaison SSL. Le hachage du certificat est l’identificateur unique du certificat.

La CertificateHash propriété est disponible uniquement lorsque l’identificateur de protocole défini par la Protocol propriété est « https ». Une tentative d’obtention ou de définition de la CertificateHash propriété d’une liaison avec un protocole « http » génère une erreur.

La valeur de la CertificateHash propriété est définie dans l’objet BindingCollection .

S’applique à