aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/resources/analysis/SSLTest/README
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/test/resources/analysis/SSLTest/README')
-rw-r--r--tests/src/test/resources/analysis/SSLTest/README184
1 files changed, 184 insertions, 0 deletions
diff --git a/tests/src/test/resources/analysis/SSLTest/README b/tests/src/test/resources/analysis/SSLTest/README
new file mode 100644
index 00000000000..fb535a907c6
--- /dev/null
+++ b/tests/src/test/resources/analysis/SSLTest/README
@@ -0,0 +1,184 @@
+$ openssl req -config ./openssl.cnf -newkey rsa:2048 -nodes -keyform PEM -keyout ca.key -x509 -days 3650 -extensions certauth -outform PEM -out ca.cer
+Generating a 2048 bit RSA private key
+..............................................+++
+........................................................................................................+++
+writing new private key to 'ca.key'
+-----
+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 [FR]:
+Locality [Poitiers]:
+Organization [SonarSource]:
+Common Name []:CA for SonarQube ITs
+
+$ openssl genrsa -out server.key 2048
+Generating RSA private key, 2048 bit long modulus
+........................+++
+............................+++
+e is 65537 (0x10001)
+
+$ openssl req -config ./openssl.cnf -new -key server.key -out server.req
+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 [FR]:
+Locality [Poitiers]:
+Organization [SonarSource]:
+Common Name []:localhost
+
+$ openssl x509 -req -in server.req -CA ca.cer -CAkey ca.key -set_serial 100 -extfile openssl.cnf -extensions server -days 3650 -outform PEM -out server.cer
+Signature ok
+subject=/C=FR/L=Poitiers/O=SonarSource/CN=localhost
+Getting CA Private Key
+
+$ openssl genrsa -out client.key 2048
+Generating RSA private key, 2048 bit long modulus
+...................................+++
+.....................................................+++
+e is 65537 (0x10001)
+
+$ openssl req -config ./openssl.cnf -new -key client.key -out client.req
+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 [FR]:
+Locality [Poitiers]:
+Organization [SonarSource]:
+Common Name []:Julien Henry
+
+$ openssl x509 -req -in client.req -CA ca.cer -CAkey ca.key -set_serial 101 -extfile openssl.cnf -extensions client -days 3650 -outform PEM -out client.cer
+Signature ok
+subject=/C=FR/L=Poitiers/O=SonarSource/CN=Julien Henry
+Getting CA Private Key
+
+$ openssl pkcs12 -export -inkey client.key -in client.cer -out client.p12
+Enter Export Password: clientp12pwd
+Verifying - Enter Export Password: clientp12pwd
+
+$ openssl pkcs12 -inkey server.key -in server.cer -export -out server.p12
+Enter Export Password: serverp12pwd
+Verifying - Enter Export Password: serverp12pwd
+
+$ keytool -importkeystore -srckeystore server.p12 -srcstoretype PKCS12 -destkeystore serverkeystore.jks
+Entrez le mot de passe du fichier de clés de destination : serverkeystorepwd
+Ressaisissez le nouveau mot de passe : serverkeystorepwd
+Entrez le mot de passe du fichier de clés source : serverp12pwd
+L'entrée de l'alias 1 a été importée.
+Commande d'import exécutée : 1 entrées importées, échec ou annulation de 0 entrées
+
+$ keytool -import -file ca.cer -keystore servertruststore.jks
+Entrez le mot de passe du fichier de clés : servertruststorepwd
+Ressaisissez le nouveau mot de passe : servertruststorepwd
+Propriétaire : CN=Test CA, O=SonarSource, L=Poitiers, C=FR
+Emetteur : CN=Test CA, O=SonarSource, L=Poitiers, C=FR
+Numéro de série : dabbebc7bce2fc6a
+Valide du : Wed Aug 31 14:42:15 CEST 2016 au : Sat Aug 29 14:42:15 CEST 2026
+Empreintes du certificat :
+ MD5: 69:36:AE:65:51:CD:F4:C3:83:77:DE:45:AE:49:01:1A
+ SHA1 : 77:92:45:84:18:FC:34:7A:2A:B0:EC:3D:22:48:15:1A:19:71:1D:B3
+ SHA256 : 99:03:89:84:6E:E3:D3:B7:12:2D:70:7E:49:88:49:41:52:1C:89:3A:9B:C0:83:D1:C5:44:D4:93:FB:42:C8:07
+ Nom de l'algorithme de signature : SHA1withRSA
+ Version : 3
+
+Extensions :
+
+#1: ObjectId: 2.5.29.35 Criticality=false
+AuthorityKeyIdentifier [
+KeyIdentifier [
+0000: 3A 61 C1 86 AD BE FC 15 82 B3 59 FF 00 28 5E F9 :a........Y..(^.
+0010: B5 5A 87 04 .Z..
+]
+[CN=Test CA, O=SonarSource, L=Poitiers, C=FR]
+SerialNumber: [ dabbebc7 bce2fc6a]
+]
+
+#2: ObjectId: 2.5.29.19 Criticality=false
+BasicConstraints:[
+ CA:true
+ PathLen:2147483647
+]
+
+#3: ObjectId: 2.5.29.31 Criticality=false
+CRLDistributionPoints [
+ [DistributionPoint:
+ [URIName: http://testca.local/ca.crl]
+]]
+
+#4: ObjectId: 2.5.29.14 Criticality=false
+SubjectKeyIdentifier [
+KeyIdentifier [
+0000: 3A 61 C1 86 AD BE FC 15 82 B3 59 FF 00 28 5E F9 :a........Y..(^.
+0010: B5 5A 87 04 .Z..
+]
+]
+
+Faire confiance à ce certificat ? [non] : oui
+Certificat ajouté au fichier de clés
+
+$ keytool -import -file server.cer -keystore clienttruststore.jks
+Entrez le mot de passe du fichier de clés : clienttruststorepwd
+Ressaisissez le nouveau mot de passe : clienttruststorepwd
+Propriétaire : CN=localhost, O=SonarSource, L=Poitiers, C=FR
+Emetteur : CN=Test CA, O=SonarSource, L=Poitiers, C=FR
+Numéro de série : 64
+Valide du : Wed Aug 31 14:45:30 CEST 2016 au : Thu Aug 31 14:45:30 CEST 2017
+Empreintes du certificat :
+ MD5: 40:52:F4:5E:67:C3:68:B6:00:7D:70:C0:1E:8E:75:2E
+ SHA1 : 83:3F:4F:AC:4E:E6:F4:06:14:01:E6:5B:F2:63:34:94:68:12:8C:3A
+ SHA256 : 7C:03:9A:CA:0D:B5:57:A5:66:56:75:09:23:45:9E:D5:CC:6C:72:14:0B:4B:9B:E8:29:3F:78:4C:9F:D6:77:E2
+ Nom de l'algorithme de signature : SHA256withRSA
+ Version : 3
+
+Extensions :
+
+#1: ObjectId: 2.5.29.19 Criticality=false
+BasicConstraints:[
+ CA:false
+ PathLen: undefined
+]
+
+#2: ObjectId: 2.5.29.31 Criticality=false
+CRLDistributionPoints [
+ [DistributionPoint:
+ [URIName: http://testca.local/ca.crl]
+]]
+
+#3: ObjectId: 2.5.29.37 Criticality=false
+ExtendedKeyUsages [
+ serverAuth
+]
+
+#4: ObjectId: 2.5.29.15 Criticality=false
+KeyUsage [
+ DigitalSignature
+ Key_Encipherment
+ Data_Encipherment
+]
+
+#5: ObjectId: 2.16.840.1.113730.1.1 Criticality=false
+NetscapeCertType [
+ SSL server
+]
+
+Faire confiance à ce certificat ? [non] : oui
+Certificat ajouté au fichier de clés
+
+$ keytool -importkeystore -srckeystore client.p12 -srcstoretype PKCS12 -destkeystore clientkeystore.jks
+Entrez le mot de passe du fichier de clés de destination : clientp12pwd
+Ressaisissez le nouveau mot de passe : clientp12pwd
+Entrez le mot de passe du fichier de clés source : clientp12pwd
+L'entrée de l'alias 1 a été importée.
+Commande d'import exécutée : 1 entrées importées, échec ou annulation de 0 entrées