CertIssuer (http)

De Wiki1000
(Différences entre les versions)
(Page créée avec « <source lang='delphi'>property CertIssuer:string;</source> '''Lecture/Ecriture''' Cette propriété indique l'émetteur du certificat SSL à utiliser en cas d'authentifi... »)
 
 
(3 révisions intermédiaires par 2 utilisateurs sont masquées)
Ligne 1 : Ligne 1 :
 +
{{Version800}}
 
<source lang='delphi'>property CertIssuer:string;</source>
 
<source lang='delphi'>property CertIssuer:string;</source>
  
Ligne 4 : Ligne 5 :
  
 
Cette propriété indique l'émetteur du certificat SSL à utiliser en cas d'authentification mutuelle.
 
Cette propriété indique l'émetteur du certificat SSL à utiliser en cas d'authentification mutuelle.
 +
Le certificat sera lu dans le magasin Windows.
 +
Un certificat est identifié dans le magasin par son émetteur et son numéro de série.
  
 
Exemple:
 
Exemple:
 
<source lang='delphi'>
 
<source lang='delphi'>
 +
var
 +
http : THttpClient;
 
begin
 
begin
 +
  http := ThttpClient.Create(nil);
 +
  http.URL := 'https://client.badssl.com/';
 +
  http.CertSerial := '2b936ce32d82ce8b01fd9a0595ac6366aa014c82';
 +
  http.CertIssuer := 'C=US, S=California, L=San Francisco, O=BadSSL, CN=BadSSL Client Root Certificate Authority';
 +
  http.SSL := true;
 +
  http.Method := hrmGet;
 +
try
 +
    http.Execute;
 +
    showmessage(http.RequestInfos);
 +
    showmessage(http.ResponseStr);
 +
    showmessage(http.responseInfos);
 +
  except
 +
    showmessage(http.ErrorText);
 +
    showmessage(e.message);
 +
  end;
 
end;
 
end;
 
</source>
 
</source>
Ligne 13 : Ligne 33 :
 
Voir aussi:
 
Voir aussi:
  
*[[CertIssuer (http)|CertIssuer]]
+
*[[CertSerial (http)|CertSerial]]
  
 
{{Footer|Requêtes HTTP (tech)}}
 
{{Footer|Requêtes HTTP (tech)}}
 
[[category:Requêtes HTTP]]
 
[[category:Requêtes HTTP]]
 +
[[Category:Version800]]

Version actuelle en date du 20 décembre 2019 à 14:16

version800-32x32.png

property CertIssuer:string;

Lecture/Ecriture

Cette propriété indique l'émetteur du certificat SSL à utiliser en cas d'authentification mutuelle. Le certificat sera lu dans le magasin Windows. Un certificat est identifié dans le magasin par son émetteur et son numéro de série.

Exemple:

var
http : THttpClient;
begin
  http := ThttpClient.Create(nil);
  http.URL := 'https://client.badssl.com/';
  http.CertSerial := '2b936ce32d82ce8b01fd9a0595ac6366aa014c82';
  http.CertIssuer := 'C=US, S=California, L=San Francisco, O=BadSSL, CN=BadSSL Client Root Certificate Authority';
  http.SSL := true;
  http.Method := hrmGet;
try
    http.Execute;
    showmessage(http.RequestInfos);
    showmessage(http.ResponseStr);
    showmessage(http.responseInfos);
  except
    showmessage(http.ErrorText);
    showmessage(e.message);
  end;
end;

Voir aussi:

Requêtes HTTP (tech)Développement DSM





Whos here now:   Members 0   Guests 0   Bots & Crawlers 1
 
Outils personnels