SSL, gestion des certificats Let's Encrypt
Le site let's Encrypt fournit des certificats gratuits
le principe de ce type de sites est :
Pour demander à let's Encrypt de générer un certificat et le télécharger, utilisez le script acme.sh
• premiers essais d'utilisation pour Volubis.fr
acme.sh –issue –insecure -d volubis.fr -w /www/VOLUBIS/htdocs
suite....
Si vous n'indiquez pas le bon répertoire lets'encrypt, ne retrouve pas le fichier de vérification qu'il vient de générer
C'est Liam, qui nous a mis la puce à l'oreille : https://dev.to/worksofbarry/using-acmesh--lets-encrypt-on-ibm-i-ihm
•Cas réel avec le certificat de commonFrance
il faut, dans DCM, avant d'importer le certificat, importer les certificats de la chaîne certifiant le site letsencryp.org
Pour importer ensuite votre certificat, il faut
LoadModule ibm_ssl_module /QSYS.LIB/QHTTPSVR.LIB/QZSRVSSL.SRVPGM <VirtualHost 192.168.1.2:443> |
<VirtualHost 192.168.1.2:443> |
sinon le premier certificat défini sera utilisé pour tous les domaines !
|
https://github.com/Neilpang/acme.sh v2.8.4 [jeu 27 aoû 09:53:40 CEST 2020] Renew: 'commonfrance.fr' [jeu 27 aoû 09:53:57 CEST 2020] Single domain='commonfrance.fr' [jeu 27 aoû 09:53:58 CEST 2020] Getting domain auth token for each domain [jeu 27 aoû 09:55:28 CEST 2020] Getting webroot for domain='commonfrance.fr' [jeu 27 aoû 09:55:34 CEST 2020] commonfrance.fr is already verified, skip http-01. [jeu 27 aoû 09:55:35 CEST 2020] Verify finished, start to sign. [jeu 27 aoû 09:55:36 CEST 2020] Lets finalize the order, Le_OrderFinalize: https://acme-v02.api.letsencrypt.org/acme/finalize/73655950/4885192960 [jeu 27 aoû 09:55:47 CEST 2020] Download cert, Le_LinkCert: https://acme-v02.api.letsencrypt.org/acme/cert/03ca06215fbb3c87164688a490d1ae2bec0b Certificate: Data: Version: 3 (0x2) Serial Number: 03:ca:06:21:5f:bb:3c:87:16:46:88:a4:90:d1:ae:2b:ec:0b Signature Algorithm: sha256WithRSAEncryption Issuer: C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3 Validity Not Before: Aug 27 06:55:44 2020 GMT Not After : Nov 25 06:55:44 2020 GMT Subject: CN = commonfrance.fr Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (2048 bit) Modulus: 00:bb:c2:cb:6a:bd:69:1c:32:21:91:73:b2:c4:c9: 3d:4a:3f:52:12:2a:74:b2:d8:9b:19:68:2e:ec:19: 78:1e:cd:24:02:ac:72:4a:25:e3:4c:c3:f6:bb:eb: .../... 70:5f:6f:07:1b:63:d6:a2:41:46:52:cd:25:91:4d: 21:6e:5f:79:e8:86:2d:54:65:12:cf:aa:27:98:77: b6:b9:62:02:bf:05:cb:0b:7e:34:db:3c:3e:12:28: 2e:15 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Key Usage: critical Digital Signature, Key Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication X509v3 Basic Constraints: critical CA:FALSE X509v3 Subject Key Identifier: F5:D7:91:46:94:B3:1F:42:29:3D:C2:B4:93:F0:A2:8F:46:8D:49:E2 X509v3 Authority Key Identifier: keyid:A8:4A:6A:63:04:7D:DD:BA:E6:D1:39:B7:A6:45:65:EF:F3:A8:EC:A1 Authority Information Access: OCSP - URI:http://ocsp.int-x3.letsencrypt.org CA Issuers - URI:http://cert.int-x3.letsencrypt.org/ X509v3 Subject Alternative Name: DNS:commonfrance.fr X509v3 Certificate Policies: Policy: 2.23.140.1.2.1 Policy: 1.3.6.1.4.1.44947.1.1.1 CPS: http://cps.letsencrypt.org CT Precertificate SCTs: Signed Certificate Timestamp: Version : v1 (0x0) Log ID : 6F:53:76:AC:31:F0:31:19:D8:99:00:A4:51:15:FF:77: 15:1C:11:D9:02:C1:00:29:06:8D:B2:08:9A:37:D9:13 Timestamp : Aug 27 07:55:44.687 2020 GMT Extensions: none Signature : ecdsa-with-SHA256 30:46:02:21:00:82:11:64:43:D2:C2:EF:4F:0B:22:D5: DE:FE:31:41:6C:E0:ED:23:BB:64:C6:6D:64:48:2D:EC: 51:0B:78:A1:03:02:21:00:CC:E7:9B:2A:40:CD:19:C7: 7B:0D:15:30:D6:B5:AE:BE:51:CE:CC:85:94:C0:3E:E4: C1:A6:74:03:55:B9:BE:12 Signed Certificate Timestamp: Version : v1 (0x0) Log ID : B2:1E:05:CC:8B:A2:CD:8A:20:4E:87:66:F9:2B:B9:8A: 25:20:67:6B:DA:FA:70:E7:B2:49:53:2D:EF:8B:90:5E Timestamp : Aug 27 07:55:44.674 2020 GMT Extensions: none Signature : ecdsa-with-SHA256 30:44:02:20:5F:35:B9:3C:84:D7:B3:1F:8D:EE:5B:A8: 69:6F:52:DB:4A:BA:52:AC:FC:15:7A:A3:35:61:B5:AB: 73:87:2B:AF:02:20:70:7B:CA:5A:0F:33:28:C2:CA:B3: 49:0F:40:AA:FC:95:43:42:AA:EF:00:C2:6C:98:CA:F4: 3B:0D:00:C6:47:EC Signature Algorithm: sha256WithRSAEncryption 6e:cc:d8:9d:b8:a3:8a:01:1e:83:02:b3:b8:9e:3d:95:cb:58: 04:54:75:80:d3:19:0b:96:66:19:29:fb:e3:52:b4:63:74:43: .../... 1b:3c:80:5e:99:3e:35:b8:2a:b9:c1:eb:94:2f:81:46:bd:75: 0e:09:b0:56:65:65:db:96:84:23:c9:2c:a3:cd:0d:b8:d0:74: 75:0c:df:51 [jeu 27 aoû 09:55:53 CEST 2020] Cert success. -----BEGIN CERTIFICATE----- MIIFVjCCBD6gAwIBAgISA8oGIV+7PIcWRoikkNGuK+wLMA0GCSqGSIb3DQEBCwUA MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD .../... X9kImY/d2iY/fdB8c9uErOG2X4NACjYj1ZAlazflrcyyYRs8gF6ZPjW4KrnB65Qv gUa9dQ4JsFZlZduWhCPJLKPNDbjQdHUM31E= -----END CERTIFICATE----- [jeu 27 aoû 09:55:53 CEST 2020] Your cert is in /home/ROOT/.acme.sh/commonfrance.fr/commonfrance.fr.cer [jeu 27 aoû 09:55:53 CEST 2020] Your cert key is in /home/ROOT/.acme.sh/commonfrance.fr/commonfrance.fr.key [jeu 27 aoû 09:55:54 CEST 2020] The intermediate CA cert is in /home/ROOT/.acme.sh/commonfrance.fr/ca.cer [jeu 27 aoû 09:55:54 CEST 2020] And the full chain certs is there: /home/ROOT/.acme.sh/commonfrance.fr/fullchain.cer |
un peu de code...
par défaut le résultat de cette commande va dans la sortie standard stdout
La fonction de substitution s permet de changer la première ou toutes les occurrences d'une chaîne par une autre. La syntaxe est la suivante:
find /QOpenSys/* -name sed
/QOpenSys/opt/freeware/bin/sed
/QOpenSys/pkgs/bin/sed
/QOpenSys/QIBM/ProdData/OS400/PASE/bin/sed
/QOpenSys/testRoot/QOpenSys/usr/bin/sed
/QOpenSys/usr/bin/sedla version de /QOpensys/pkgs/bin est sans doute la plus récente, alors vérifiez votre PATH !
![]()
Copyright © 1995,2020 VOLUBIS