Saluts,
Sauf erreur, il est possible de créer x certificat si besoin.
Je me suis inspirer de ces doc et tuto suivant :
Ajouter le SMTP de Gmail en SmartHost avec Postfix sous Ubuntu Server
Guide pratique des certificats SSL
Gérer une authorité de certification (CA) complète avec OpenSSL (SSL/TLS)
Mais j’avoue bien volontiers, que je m’y perds un peu, beaucoup, énormément …
Cependant, depuis hier soir cela ne peut se faire ! Alors que quelques heures auparavant …
[code]:~# /usr/lib/ssl/misc/CA.pl -newca
CA certificate filename (or enter to create)
Making CA certificate …
Generating a 1024 bit RSA private key
…++++++
…++++++
writing new private key to ‘./demoCA/private/cakey.pem’
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
Country Name (2 letter code) [AU]:FR
(…)[/code]
[code]:~# openssl req -new -nodes -subj ‘/CN=Debian-pc-1/O=Mon_Domaine.net/C=FR/ST=Nord de France/emailAddress=Mon_Adresse@gmail.com’ -keyout FOO-key.pem -out FOO-req.pem -days 3650
Generating a 1024 bit RSA private key
…++++++
…++++++
writing new private key to ‘FOO-key.pem’
:~#[/code]
Mais cela c’est soldé par un échec!!!
[quote]:~# openssl ca -out FOO-cert.pem -infiles FOO-req.pem
Using configuration from /usr/lib/ssl/openssl.cnf
Enter pass phrase for ./demoCA/private/cakey.pem:
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number:
xx:xx:xx:xx:xx:xx:xx:xx
Validity
Not Before: Jul 30 14:31:51 2011 GMT
Not After : Jul 29 14:31:51 2012 GMT
Subject:
countryName = FR
stateOrProvinceName = Nord de France
organizationName = Mon_Domaine.net
commonName = Debian-pc-1
emailAddress = Mon_Adresse@gmail.com
(…)
Certificate is to be certified until Jul 29 14:31:51 2012 GMT (365 days)
Sign the certificate? [y/n]:y
failed to update database
TXT_DB error number 2
root@Debian-pc-1:~#[/quote]
Suite à cela, j’ai tenté de rétablir cette situation avec mv.
[code]:~# mv /usr/lib/ssl/openssl.cnf /home/pc-1-loreleil
:~# mv /usr/lib/ssl/misc/CA.pl /home/pc-1-loreleil[/code]
J’ai relancé la création d’un nouveau certificat, mais la console reste muette.
:~$ /usr/lib/ssl/misc/CA.pl -newca
:~$ ....??????
Pour finir, j’ai replacé /usr/lib/ssl/openssl.cnf & /usr/lib/ssl/misc/CA.pl à leur emplacement d’origine, et depuis je bloques la dessus.
[code]:~$ su
Mot de passe :
:~# cd /usr/lib/ssl/misc/
:/usr/lib/ssl/misc# ls -l
total 32
-rwxr-xr-x 1 root root 5875 10 févr. 20:20 CA.pl
-rwxr-xr-x 1 root root 5175 10 févr. 20:20 CA.sh
-rwxr-xr-x 1 root root 119 10 févr. 20:20 c_hash
-rwxr-xr-x 1 root root 152 10 févr. 20:20 c_info
-rwxr-xr-x 1 root root 112 10 févr. 20:20 c_issuer
-rwxr-xr-x 1 root root 110 10 févr. 20:20 c_name
:/usr/lib/ssl/misc#
:/usr/lib/ssl/misc# cd /usr/lib/ssl
:/usr/lib/ssl# ls -l
total 8
lrwxrwxrwx 1 root root 14 25 févr. 20:54 certs -> /etc/ssl/certs
drwxr-xr-x 2 root root 4096 26 févr. 10:52 engines
drwxr-xr-x 2 root root 4096 30 juil. 17:31 misc
lrwxrwxrwx 1 root root 20 26 févr. 10:52 openssl.cnf -> /etc/ssl/openssl.cnf
lrwxrwxrwx 1 root root 16 25 févr. 20:54 private -> /etc/ssl/private
r:/usr/lib/ssl#
[/code]
[code]:/home/pc-1-loreleil# cd /root
:~# ls -l
total 1438061
-rw-r–r-- 1 root root 4300 26 févr. 13:16 [26-02-2011][13-13-17]-nmapsi4.log
-rw-r–r-- 1 root root 2127 8 mars 16:18 bibliotheque.txt
-rw-r–r-- 1 root root 0 21 juin 19:09 Changelog
drwxrwxrwx 2 pc-1-loreleil pc-1-loreleil 1024 7 mars 08:54 cles
-rw------- 1 root root 872239269 2 juil. 18:10 dead.letter
drwxr-xr-x 6 root root 1024 30 juil. 16:27 demoCA
-rw-r–r-- 1 root root 790 8 mars 16:17 dump_file
-rw-r–r-- 1 root root 59 15 mai 11:19 exclure
-rw-r–r-- 1 root root 9300 3 mars 22:56 fichier.cap
-rw-r–r-- 1 root root 0 30 juil. 16:37 FOO-cert.pem
-rw-r–r-- 1 root root 887 30 juil. 17:38 FOO-key.pem
-rw-r–r-- 1 root root 680 30 juil. 17:38 FOO-req.pem
drwxr-xr-x 2 root root 1024 13 févr. 2006 ftester-1.0
-rw-r–r-- 1 root root 30821 4 nov. 2008 ftester-1.0.tar.gz
-rw-r–r-- 1 root root 0 22 mai 12:54 gparted_details.htm
-rw-r–r-- 1 root root 8846 25 juil. 17:29 master
-rw-r–r-- 1 root root 90114 11 mars 13:18 matos.html
-rw------- 1 root root 60484 12 juil. 20:25 mbox
-rw-r–r-- 1 root root 161 27 mars 10:30 my.cnf
drwxr-xr-x 8 pc-1-loreleil pc-1-loreleil 1024 28 févr. 14:30 ossec-hids-2.5.1
-rw-r–r-- 1 root root 740470 12 oct. 2010 ossec-hids-2.5.1.tar.gz
drwxr-xr-x 3 pc-1-loreleil root 1024 20 avril 2010 rootcheck-2.4
-rw-r–r-- 1 root root 379167 20 avril 2010 rootcheck-2.4.tar.gz
-rw-r–r-- 1 root root 379167 20 avril 2010 rootcheck-2.4.tar.gz.1
-rw-r–r-- 1 root root 379167 20 avril 2010 rootcheck-2.4.tar.gz.2
-rw------- 1 root root 592466304 30 juil. 19:50 sent
:~#
[/code]
[code]root@Debian-pc-1:/usr/lib/ssl# cd /root/demoCA
root@Debian-pc-1:~/demoCA# ls -l
total 12
-rw-r–r-- 1 root root 3498 30 juil. 16:27 cacert.pem
-rw-r–r-- 1 root root 704 30 juil. 16:26 careq.pem
drwxr-xr-x 2 root root 1024 30 juil. 16:23 certs
drwxr-xr-x 2 root root 1024 30 juil. 16:23 crl
-rw-r–r-- 1 root root 3 30 juil. 17:38 crlnumber
-rw-r–r-- 1 root root 0 30 juil. 17:38 index.txt
-rw-r–r-- 1 root root 21 30 juil. 16:27 index.txt.attr
-rw-r–r-- 1 root root 0 30 juil. 16:23 index.txt.old
drwxr-xr-x 2 root root 1024 30 juil. 16:27 newcerts
drwxr-xr-x 2 root root 1024 30 juil. 16:23 private
-rw-r–r-- 1 root root 17 30 juil. 16:27 serial
:~/demoCA#
:~/demoCA# cd /root/cles
:~/cles# ls -l
total 0
:~/cles#
:~/cles# cd /root/demoCA/certs
:~/demoCA/certs# ls -l
total 0
:~/demoCA/certs#
:~/demoCA/certs# cd /root/demoCA/crl
:~/demoCA/crl# ls -l
total 0
:~/demoCA/crl# cd /root/demoCA/newcerts
:~/demoCA/newcerts# ls -l
total 4
-rw-r–r-- 1 root root 3498 30 juil. 16:27 xxxxxxxxxxxxxxxx.pem
:~/demoCA/newcerts#
:~/demoCA/newcerts# cd /root/demoCA/private
:~/demoCA/private# ls -l
total 1
-rw-r–r-- 1 root root 963 30 juil. 16:26 cakey.pem
:~/demoCA/private#
[/code]
Comment remettre tout ceci à plat ? …
Je vous en serre cinq … merci. …