Utiliser un certificat ssl .cer pour apache

Fermé
final - 28 févr. 2011 à 11:49
 coconutmalibu - 6 avril 2011 à 21:22
Bonjour,

Je tente de mettre de passer un site en https. La version http du site est sous apache donc je voudrais garder ce serveur pour celle sous https.

J'ai appris par ce tuto (https://apache.developpez.com/cours/apache20-modssl-windows/ qu'elle était la procédure. Mais le hic est qu'on y utilise un certificat de test ( ou d'essai) et je voudrais utiliser un certificat officiel.

J'ai un tel certificat mais qui a pour extension .cer et non .cert comme dans le tutorial. de plus, je n'ai pas de fichier key.

Comme vous vous en doutez, je n'arrive pas à utiliser ce certificat. Auriez - vous une idée sur ce problème.


A voir également:

3 réponses

Finalement, je me répond tous seul.

J'ai finalement trouver une solution à mon problème sur cette page (http://www.opensourcetutor.com/... ). Il semblerait que les certificats .cer soient pour les serveur IIS à la base...

En bref, je convertis en .pfx ( = extension parallèle) grâce aux outils natif de windows, puis j'utilise openssl (fourni avec Apache généralement) pour obtenir les fichiers .key et .cert qui sont eux compréhensible par Apache.


Au cas où la page n'est plus accessible, je vous recopie son contenue :

Last time I did this, I found the instructions pretty easily on how to migrate SSL's from IIS to Apache. This time I found it hard to locate the documentation, so for my own lack of memory and when google fails you, here it is:

First we need to export the certificate from IIS into a pfx file. To do that:
Click Start->Run->type: mmc [enter]
Click ->'Console' -> `Add/Remove Snap-in'.
Click -> `Add' -> `certificates' snap-in and click on `Add'.
Select -> `Computer Account' -> click `Next'.
Select `Local Computer' and then click `OK'.
Click `Close' and then click `OK'.

In the menu for `Certificates' and click on the `Personal' folder.

Choose your certificate to export and select `All tasks' -> `Export'.
In the wizard, check the box to include the private key, continue until you have a .PFX file.

Move the Certificate to the machine Running Apache:

Now, we are going to use openssl to extract the private key, and the cert file.

    # Export the private key from the pfx file
    openssl pkcs12 -in iis.pfx -nocerts -out apache.key.pem
    # Export the certificate file from the pfx file
    openssl pkcs12 -in iis.pfx -clcerts -nokeys -out apache.cert.pem
    # ****This removes the passphrase from the private key so Apache won't
    # ****prompt you for your passphase when it starts
    openssl rsa -in apache.key.pem -out apache.key
0
Utilisateur anonyme
2 mars 2011 à 10:04
Bonjour,

lorsque vous achetez un certificat officiel, normalement les procédures d'installation vous sont envoyées accompagnées du certificat ou sont disponibles sur le site du revendeur de certificats SSL ou sur le site de l'Autorité de Certification.

Mais bon, vous avez résolu votre problème et c'est cela le plus important.

Cordialement,
Networking4all
0
coconutmalibu
6 avril 2011 à 21:22
Merciiii vous me rendez un trés trés grand service
0