{"id":224,"date":"2008-12-02T14:25:22","date_gmt":"2008-12-02T13:25:22","guid":{"rendered":"http:\/\/blog.guiguiabloc.fr\/?p=224"},"modified":"2008-12-02T14:28:54","modified_gmt":"2008-12-02T13:28:54","slug":"pki-pki-oh-pki-pki-ah","status":"publish","type":"post","link":"http:\/\/blog.guiguiabloc.fr\/index.php\/2008\/12\/02\/pki-pki-oh-pki-pki-ah\/","title":{"rendered":"PKI, PKI, oh ! PKI, PKI, ah !"},"content":{"rendered":"<p><em>\u00ab\u00a0Mais qu&rsquo;est ce tu chiffres DouDou dis donc ? PKI, PKI, c&rsquo;est bon, c&rsquo;est bon&#8230;\u00a0\u00bb<\/em><\/p>\n<p>Bon d&rsquo;accord.. \ud83d\ude33<\/p>\n<p>D\u00e9sol\u00e9 pour la touche Tarte \u00e0 la cr\u00e8me et nez rouge, \u00e7a m&rsquo;a \u00e9chapp\u00e9  \ud83d\ude15<\/p>\n<p>La gestion d&rsquo;une <a title=\"PKI\" href=\"http:\/\/fr.wikipedia.org\/wiki\/Infrastructure_%C3%A0_cl%C3%A9s_publiques\" target=\"_blank\">PKI<\/a> n&rsquo;est pas toujours \u00e9vidente.<\/p>\n<p>On se retrouve vite avec une usine \u00e0 gaz qui si elle r\u00e9pond a des besoins en entreprise (exemple <a title=\"openca\" href=\"http:\/\/www.openca.org\/projects\/openca\/\" target=\"_blank\">openCA<\/a> qui est pour moi un outil tr\u00e8s puissant, opensource et parfaitement utilisable en production), pour sa petite gestion personnelle, c&rsquo;est un peu lourd.<\/p>\n<p>Vous g\u00e9rez donc vos certificats a la mimine, a coup d&rsquo;openssl dans tout les sens en stockant a gauche et a droite, et mer&#8230;. ou j&rsquo;ai mis mon CA Root&#8230; ou alors grace aux quelques scripts fournis en standard avec OpenVPN par exemple.<\/p>\n<p>Bref, heureusement il existe un petit programme qui r\u00e9pond parfaitement \u00e0 ce besoin; il s&rsquo;agit d&rsquo;easyCA.<\/p>\n<p>Vous trouverez les sources<a title=\"esayca\" href=\"http:\/\/sourceforge.net\/projects\/easyca\" target=\"_blank\"> ICI<\/a> .<\/p>\n<p>Il n&rsquo;est plus maintenu depuis 2005 mais croyez moi, ce petit programme en simple script shell est une bombe et parfaitement utilisable.<\/p>\n<p>J&rsquo;ai contact\u00e9 Ferry, l&rsquo;auteur du script qui malheureusement semble un peu d\u00e9bord\u00e9 pour apporter quelques am\u00e9liorations.<\/p>\n<p>Soit, c&rsquo;est bien parce que c&rsquo;est vous, je vous livre donc MA version d&rsquo;easyCA avec quelques fonctions rajout\u00e9es (OCSP, choix du type de certificat serveur\/client..)<\/p>\n<p><a href=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2008\/12\/easyca.tgz\">easyCA Version GuiguiAbloc<br \/>\n<\/a><\/p>\n<p>Elle est bien entendu perfectible mais convient parfaitement \u00e0 la gestion de ma pki personnelle.<\/p>\n<p>Le fonctionnement est on ne peut plus basique.<\/p>\n<p>Vous cr\u00e9ez un r\u00e9pertoire ou vous d\u00e9poser le easyCA.sh et l&rsquo;openssl.cnf (que vous CONFIGUREZ avant !!!). (ps : pensez a supprimez la ligne \u00ab\u00a0# !!!!! remove this line after configuration as it is NOT_CONFIGURED yet !!!\u00a0\u00bb<\/p>\n<p>Les champs sont suffisamment bien comment\u00e9s pour que vous compreniez les champs \u00e0 renseigner.<\/p>\n<p>Ne reste qu&rsquo;a lancer le easyca.sh :<\/p>\n<pre lang=\"text\">=====================================================================\r\n                      Certificate Management System\r\n      easyCA version 0.9(6) by Ferry Kemps and Guiguiabloc\r\n                              GPL Licensed\r\n=====================================================================\r\n\r\n   1) Sign a Certificate Signing Request (PKCS#10)\r\n   2) Create a Server Certificate (PEM SelfSigned)\r\n   3) Create a Client Certificate (PKCS#12)\r\n   4) Create a Certificate Signing Request\r\n   5) Generate Certificate Revocation List (CRL)\r\n   6) List, Display and Revoke Certificates\r\n\r\n   I) Initialize Root Certificate Authority (CA)\r\n   O) Initialize OCSP Server Certificate\r\n   B) Backup &amp; Restore the Certificate environment\r\n   R) Reinstall easyCA (erase)\r\n\r\n ==> Make your choice [none]:<\/pre>\n<p>Commencer par initaliser votre Certificat d&rsquo;Autorit\u00e9 (I)<\/p>\n<p>Puis a vous la cr\u00e9ation et la gestion de vos certificats \ud83d\ude42<\/p>\n<pre lang=\"text\">-----------------------------------------------------------------------\r\n--------------- Generate Certificate Signing Request ------------------\r\n-----------------------------------------------------------------------\r\n\r\nEnter Certificate CN (Common name|FQDN) like www.example.com [none]: blog.guiguiabloc.fr\r\nGenerating a 1024 bit RSA private key\r\n......................++++++\r\n..++++++\r\nwriting new private key to '.\/private\/blog.guiguiabloc.fr-key.pem'\r\n-----\r\nYou are about to be asked to enter information that will be incorporated\r\ninto your certificate request.\r\nWhat you are about to enter is what is called a Distinguished Name or a DN.\r\nThere are quite a few fields but you can leave some blank\r\nFor some fields there will be a default value,\r\nIf you enter '.', the field will be left blank.\r\n-----\r\nCountry Name (2 letter code) [NL]:FR\r\nState or Province Name (full name) [Gelderland]:Bretagne\r\nLocality Name (eg, city) [Arnhem]:GuiguiTown\r\nOrganization Name (eg, company) [Your Company Name]:Guiguiabloc\r\nOrganizational Unit Name (eg, section) [HQ]:Guiguiabloc\r\nCommon Name (eg, your name or your server's hostname) []:blog.guiguiabloc.fr\r\nEmail Address [postmaster@domain.ext]:guiguiabloc@devnull\r\n\r\nPlease enter the following 'extra' attributes\r\nto be sent with your certificate request\r\nA challenge password []:\r\nAn optional company name []:\r\n\r\nCertificate Signing Request (CSR) stored as: .\/csr\/blog.guiguiabloc.fr.csr\r\nCertificate private-key stored as: .\/private\/blog.guiguiabloc.fr-key.pem\r\nPress [enter] to continue<\/pre>\n<pre lang=\"text\">-----------------------------------------------------------------------\r\n--------------- Certifiace Signing Request handling -------------------\r\n-----------------------------------------------------------------------\r\n\r\n (CSR request files should be copied into directory: .\/csr)\r\n\r\n1: blog.guiguiabloc.fr.csr\r\n\r\n ==> Select the CSR to sign [none]: 1\r\n\r\n ==> Add OCSP Extension to Certificate ? [y\/N]: y\r\n\r\n ==> Select the Usage Key [server|client|none]: server<\/pre>\n<p>Bref, je vous laisse jouer avec, vous verrez, cela vous simplifiera la vie.<\/p>\n<p>Concernant l&rsquo;extension OCSP, ce sera le sujet d&rsquo;un prochain billet ou comment g\u00e9rer la r\u00e9vocation de vos certificats, on-line \ud83d\ude00<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00ab\u00a0Mais qu&rsquo;est ce tu chiffres DouDou dis donc ? PKI, PKI, c&rsquo;est bon, c&rsquo;est bon&#8230;\u00a0\u00bb Bon d&rsquo;accord.. \ud83d\ude33 D\u00e9sol\u00e9 pour la touche Tarte \u00e0 la cr\u00e8me et nez rouge, \u00e7a m&rsquo;a \u00e9chapp\u00e9 \ud83d\ude15 La gestion d&rsquo;une PKI n&rsquo;est pas toujours &hellip; <a href=\"http:\/\/blog.guiguiabloc.fr\/index.php\/2008\/12\/02\/pki-pki-oh-pki-pki-ah\/\">Read More <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[86,87,85],"_links":{"self":[{"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/posts\/224"}],"collection":[{"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/comments?post=224"}],"version-history":[{"count":12,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/posts\/224\/revisions"}],"predecessor-version":[{"id":239,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/posts\/224\/revisions\/239"}],"wp:attachment":[{"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/media?parent=224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/categories?post=224"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/tags?post=224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}