Salut à tous.

Je suis sous Apache 2.4.39.

Jusqu'à présent, je n'ai utilisé que la connexion SSL de type certificat serveur dans mon WampServer.
Un certificat SSL de type CA dans le navigateur "Google Chrome" et j'arrive à me connecter sans problème.
Le même certificat SSL de type CA et le certificat serveur "localhost" dans le virtualHost "localhost" résolvent le problème.
Et ça fonctionne !

Maintenant, j'aimerai passer à un certificat SSL de type client.
J'aimerai mettre autre chose dans SSLVerifyClient que "none" !
Si je mets "require", je n'arrive pas à obtenir une connexion avec authentification.
Voici le message d'anomalie que j'obtiens quand je me connecte à "ht tp://localhost" :
Forbidden
You don't have permission to access / on this server.
Reason: Cannot perform Post-Handshake Authentication.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
J'ai cherché d'où provenait cette erreur, mais sans succès jusqu'à présent.

Voici ce que j'ai dans le virtualhost "localhost", puisque je fais mes tests sur ce site local :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
	SSLEngine on
	SSLCertificateFile    "${SRVROOT}/conf/Certificat/Localhost/localhost.crt"
	SSLCertificateKeyFile "${SRVROOT}/conf/Certificat/Localhost/localhost.key"
#
	SSLCACertificatePath  "${SRVROOT}/conf/Certificat/Ca"
	SSLCACertificateFile  "${SRVROOT}/conf/Certificat/Ca/Ca.crt"
#
	<Directory />
		SSLVerifyClient optional
		SSLVerifyDepth  10
		SSLOptions +StdEnvVars
#
		Options -Indexes +FollowSymLinks +MultiViews
		AllowOverride none
		Require local
	</Directory>
J'ai juste ajouté/modifié les lignes 9 et 10

Et la déclarative SSL, un peu plus haut dans le fichier "httpd.conf" :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# ====================================== #
#     Module socache_shmcb               #
# ====================================== #
 
LoadModule socache_shmcb_module        modules/mod_socache_shmcb.so
 
<IfModule socache_shmcb_module>
#	SSLUseStapling                  On
#	SSLStaplingCache                "shmcb:${repertoire}/logs/ssl_stapling(32768)"
#	SSLStaplingStandardCacheTimeout 3600
#	SSLStaplingErrorCacheTimeout    600
#
	SSLSessionCache                 "shmcb:${repertoire}/logs/ssl_scache(512000)"
	SSLSessionCacheTimeout          300
</IfModule>
 
# ====================================== #
#     Module SSL                         #
# ====================================== #
 
LoadModule ssl_module                  modules/mod_ssl.so
 
<IfModule ssl_module>
	# -------------------- #
	# Strong SSL protocols #
	# -------------------- #
#
	SSLRandomSeed startup builtin
	SSLRandomSeed connect builtin
	SSLPassPhraseDialog   builtin
#
	SSLProtocol +All -SSLv3 -SSLv2 -TLSv1 -TLSv1.1
	SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
#
	SSLHonorCipherOrder On
	SSLSessionTickets   Off
	SSLCompression      Off
</IfModule>
J'ai créé un certificat "localhost" de type client dont l'extension est "p12" (format PKCS#12).
Sauf que je ne suis pas sûr de ce que j'ai mis au niveau des déclarative.

Que dois-je mettre comme CN (common name) ?
Pour le certificat serveur, j'ai mis "localhost" et cela m'a semblé logique de le faire.
Mais pour le certificat client, je ne sais pas si je dois mettre le nom de l'utilisateur, le nom du "o" (organization) qui est celui du certificat CA ou autre chose ?

Si vous avez fait cela, j'aimerai un exemple de configuration (openssl.cnf) et un exemple de la commande openssl pour créer le certificat "p12" ?

@+