| Sv translation |
|---|
|
The certificates are located in: | Translations Ignore |
|---|
| Code Block |
|---|
/etc/haproxy/haproxy.pem |
|
The correct permissions are 400. (read only for root) and can be set as follows: | Translations Ignore |
|---|
| Code Block |
|---|
chmod 400 haproxy.pem |
|
The file contains Sections: | Info |
|---|
| certificate chain: Private Key The end entity certificate and the matching private key are mandatory haproxy.pem - end_entity_cetificate.crt
- intermediate_certificate.crt
- root_certificate.crt
- private_key.key
Command to generate the haproxy.pem file
| Code Block |
|---|
| title | Generate the haproxy.pem file |
|---|
| $ cat end-entity.crt intermediate_certificate.crt root_certificate.crt private-key.key > haproxy.pem |
- Make sure the private key is not corrupted
$ openssl rsa -check -noout -in private_key.key
If the output “RSA key ok“ then the private key is correct. - Make sure the end entity certificate and the private key match together
Calculate the modulus of the of the private key $ openssl rsa -modulus -noout -in private_key.key | openssl md5
Calculate the modulus of the server certificate $ openssl x509 -modulus -noout -in end_entity_cetificatecertificate.crt| openssl md5
If both outputs are identical then the private key matches to the end entity certificate. - The end entity certificate muss be in the first position and the matching private key muss be in the last position
- The intermediate(s) and the root certificate are optional. In case they are included, the intermediate(s) certificates muss before the root certificate
- Make sure the end of line (EOL) in the file are Linux EOL (LF). Windows EOL (CR LF) or Macintosh EOL (CR) will fail, because the Load Balancer is a Linux distribution.

- You can check the content (Check the Validity) after with this command:
$ openssl x509 -text -in haproxy.pem
|
| Translations Ignore |
|---|
| Code Block |
|---|
-----BEGIN CERTIFICATE-----
MIIEzjCCA7agAwIBAgISESGiWLxseXetsJGbfZKEfehiMA0GCSqGSIb3DQEBCwUA
MEwxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMSIwIAYD
...
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAsDGatsqSubHWmDG2IOVbocgwJfX9dB3EtXFw6HN87zDvAvvE
9KUsDqMQiU2+aORZapzhl0oL1cfznPpQYyo4WGprQiNyL82TTxeWhCNRnBv4tnJw
...
-----END RSA PRIVATE KEY----- |
|
The minimum is that the certificate for the load balancer and private key are included. The file is referenced in haproxy.cfg: | Translations Ignore |
|---|
| Code Block |
|---|
frontend acdportal_https
mode http
bind :443 ssl crt /etc/haproxy/haproxy.pem #verify optional |
|
If an intermediate certificate must be inserted (example sales force if the certification chain is not known in SalesForce), this can be done as follows - Right mouse click on the certification in the browser:

- Display details of the certificate:


- Display intermediate certificate:


#
- Save to the local computer:

Then edit the file with a text editor, then copy the content of the intermediate certificate into the haproxy.pem file at the very bottom. Then: | Translations Ignore |
|---|
| Code Block |
|---|
service haproxy reload |
|
The following command can be used to convert a .pfx certificate file to .pem Format (the password for the certificate will be required): | Translations Ignore |
|---|
| Code Block |
|---|
openssl pkcs12 -in acd.cg.internal.pfx -out /root/haproxy.pem -nodes |
|
|
| Sv translation |
|---|
|
Die Zertifikate befinden sich in: | Translations Ignore |
|---|
| Code Block |
|---|
/etc/haproxy/haproxy.pem |
|
Die Korrekten Berechtigungen sind 400. (Nur read für root) und können so gesetzt werden: | Translations Ignore |
|---|
| Code Block |
|---|
chmod 400 haproxy.pem |
|
Die Datei enthält Sections: | Info |
|---|
Hinweis Zertifikatskette: Private Key Das end-entity Zertifikat und der dazugehörige private Schlüssel sind erforderlich. haproxy.pem - end_entity_cetificate.crt
- intermediate_certificate.crt
- root_certificate.crt
- private_key.key
Befehl zur Erzeugung der Datei haproxy.pem Generieren der Datei haproxy.pem $ cat end-entity.crt intermediate_certificate.crt root_certificate.crt private-key.key > haproxy.pem
|
- Stellen Sie sicher, dass der private Schlüssel nicht beschädigt ist.
$ openssl rsa -check -noout -in private_key.key
Wenn die Ausgabe "RSA key ok" erscheint, ist der private Schlüssel korrekt. - Stellen Sie sicher, dass das end-entity Zertifikat und der private Schlüssel übereinstimmen.
Berechnen Sie den Modulus des privaten Schlüssels $ openssl rsa -modulus -noout -in private_key.key | openssl md5
Berechnen Sie den Modulus des Server-Zertifikats $ openssl x509 -modulus -noout -in end_entity_cetificate.crt| openssl md5
Wenn die Ausgabe beider Vorgänge identisch ist, stimmt der private Schlüssel mit dem end-entity Zertifikat überein. - Das end-entity Zertifikat muss an erster Stelle stehen und der passende private Schlüssel an letzter Stelle
- Das/die intermediate(s) und das root Zertifikat sind optional. Falls sie enthalten sind, müssen die intermediate(s) Zertifikate vor dem Stammzertifikat angegeben werden.
- Stellen Sie sicher, dass die Zeilenenden (EOL) in der Datei Linux EOL (LF) sind. Windows EOL (CR LF) oder Macintosh EOL (CR) werden fehlerhaft sein, da der Load Balancer eine Linux Distribution ist.

|
| Translations Ignore |
|---|
| Code Block |
|---|
-----BEGIN CERTIFICATE-----
MIIEzjCCA7agAwIBAgISESGiWLxseXetsJGbfZKEfehiMA0GCSqGSIb3DQEBCwUA
MEwxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMSIwIAYD
...
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAsDGatsqSubHWmDG2IOVbocgwJfX9dB3EtXFw6HN87zDvAvvE
9KUsDqMQiU2+aORZapzhl0oL1cfznPpQYyo4WGprQiNyL82TTxeWhCNRnBv4tnJw
...
-----END RSA PRIVATE KEY----- |
|
Das Mindeste ist, dass der Zertifikat für den Load-Balancer sowie Private Key davon enthalten sind. Die Datei wird in haproxy.cfg referenziert: | Translations Ignore |
|---|
| Code Block |
|---|
frontend acdportal_https
mode http
bind :443 ssl crt /etc/haproxy/haproxy.pem #verify optional |
|
Falls ein Intermediate-Zertifikat eingefügt werden muss (Beispiel Sales-Force falls der Zertifizierungschain nicht bei SalesForce bekannt ist), kann dies wie folgt geschehen: - Rechter Mausklick auf die Zertifizierung im Browser:

- Details des Zertifikats anzeigen lassen:


- Intermediate Zertifikat anzeigen lassen:


#
- Auf den lokalen Rechner speichern:

Die Datei dann mit einem Text-Editor editieren, dann den Inhalt des Intermediate-Zertifikats in die Datei haproxy.pem ganz unten hineinkopieren. Dann: | Translations Ignore |
|---|
| Code Block |
|---|
service haproxy reload |
|
|
| Sv translation |
|---|
|
Les certificats sont situés à : | Translations Ignore |
|---|
| Code Block |
|---|
/etc/haproxy/haproxy.pem |
Les autorisations correctes sont de 400. (en lecture seule pour la racine) et peuvent être définies comme suit : | Translations Ignore |
|---|
| Code Block |
|---|
chmod 400 haproxy.pem |
Le fichier contient des sections : | Info |
|---|
|
|
chaîne de certificats :
Clé privée
Le certificat de l'entité finale et la clé privée correspondante sont obligatoires.
haproxy.pem
- end_entity_cetificate.crt
- intermediate_certificate.crt
- root_certificate.crt
- private_key.key
Commande pour générer le fichier haproxy.pem
| Code Block |
|---|
| title | Générer le fichier haproxy.pem |
|---|
|
$ cat end-entity.crt intermediate_certificate.crt root_certificate.crt private-key.key > haproxy.pem |
- Assurez-vous que la clé privée n'est pas corrompue.
$ openssl rsa -check -noout -in private_key.key
Si la sortie “RSA key ok“ alors la clé privée est correcte.
- Assurez-vous que le certificat de l'entité finale et la clé privée correspondent ensemble
Calculer le modulus de la clé privée.
$ openssl rsa -modulus -noout -in private_key.key | openssl md5
Calculer le module du certificat du serveur
$ openssl x509 -modulus -noout -in end_entity_cetificate.crt| openssl md5
Si les deux résultats sont identiques, la clé privée correspond au certificat de l'entité finale.
- Le certificat de l'entité finale doit être en première position et la clé privée correspondante doit être en dernière position.
- Le ou les intermédiaires et le certificat racine sont facultatifs. S'ils sont inclus, les certificats intermédiaires doivent précéder le certificat root.
- Assurez-vous que les fins de ligne (EOL) dans le fichier sont Linux EOL (LF). Windows EOL (CR LF) ou Macintosh EOL (CR) échouera, car l'équilibreur de charge est une distribution Linux.
Image Removed
| Translations Ignore |
|---|
| Code Block |
|---|
-----BEGIN CERTIFICATE----- MIIEzjCCA7agAwIBAgISESGiWLxseXetsJGbfZKEfehiMA0GCSqGSIb3DQEBCwUA MEwxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMSIwIAYD ... -----END CERTIFICATE----- -----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEAsDGatsqSubHWmDG2IOVbocgwJfX9dB3EtXFw6HN87zDvAvvE 9KUsDqMQiU2+aORZapzhl0oL1cfznPpQYyo4WGprQiNyL82TTxeWhCNRnBv4tnJw ... -----END RSA PRIVATE KEY----- |
Le minimum est que le certificat pour l'équilibreur de charge et la clé privée soient inclus. Ce fichier est référencé dans haproxy.cfg :
| Translations Ignore |
|---|
| Code Block |
|---|
frontend acdportal_https mode http bind :443 ssl crt /etc/haproxy/haproxy.pem #verify optional |
Si un certificat intermédiaire doit être inséré (exemple : force de vente si la chaîne de certification n'est pas connue dans SalesForce), cela peut être fait comme suit
- Cliquez avec le bouton droit de la souris sur la certification dans le navigateur :
Image Removed
- Afficher les détails du certificat :
Image Removed
Image Removed
- Afficher le certificat intermédiaire :
Image Removed
- Enregistrer sous forme de fichier :
Image Removed
Image Removed#
- Enregistrez sur l'ordinateur local :
Image Removed
Ensuite, modifiez le fichier avec un éditeur de texte, puis copiez le contenu du certificat intermédiaire dans le fichier haproxy.pem tout en bas.
Ensuite :
| Translations Ignore |
|---|
| Code Block |
|---|
service haproxy reload |
La commande suivante peut être utilisée pour convertir un fichier de certificat .pfx au format .pem (le mot de passe du certificat sera requis) :
| Translations Ignore |
|---|
| Code Block |
|---|
openssl pkcs12 -in acd.cg.internal.pfx -out /root/haproxy.pem -nodes |
|