{"id":2407,"date":"2023-02-25T17:39:03","date_gmt":"2023-02-25T16:39:03","guid":{"rendered":"https:\/\/labalec.fr\/erwan\/?p=2407"},"modified":"2023-02-25T17:39:43","modified_gmt":"2023-02-25T16:39:43","slug":"tinyssl-freepascal-and-openssl","status":"publish","type":"post","link":"https:\/\/labalec.fr\/erwan\/?p=2407","title":{"rendered":"TinySSL : FreePascal and OpenSSL"},"content":{"rendered":"\n<p>Still pursuing my journey around ldap, ssl and certificates : lets play with OpenSSL libraries.<\/p>\n\n\n\n<p>Have a look at the code on github <a href=\"https:\/\/github.com\/erwan2212\/TinySSL\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<p>Possible actions so far:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>--genkey generate rsa keys public.pem and private.pem\r\n--encrypt encrypt a file using public.pem\r\n--decrypt decrypt a file using private.pem\r\n--mkcert make a self sign root cert, read from privatekey (option) &amp; write to ca.crt and ca.key\r\n--mkreq make a certificate service request, read from request.key (if exist) &amp; write to request.csr request.key\r\n--signreq make a certificate from a csr, read from a csr filename and a cert file\r\n--selfsign make a self sign cert, write to cert.crt cert.key\r\n--p12topem convert a pfx to pem, write to cert.crt and cert.key\r\n--pemtop12 convert a pem to pfx, read from cert.crt and cert.key<\/code><\/pre>\n\n\n\n<p>Example to create a root ca, a certificate signing request and a certificate (which you can use in latest chrome) :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rem if you want to reuse an existing key and therefore renew instead of recreate\r\ntinySSL.exe --mkcert --debug=true --privatekey=ca.key --password=password --filename=ca.crt\r\nrem recreate, not renew\r\nrem tinySSL.exe --mkcert --debug=true --filename=ca.crt\r\nrem renew, not recreate\r\ntinySSL.exe --mkreq --debug=true --filename=request.csr --privatekey=request.key\r\nrem recreate, not renew\r\nrem tinySSL.exe --mkreq --debug=true --filename=request.csr\r\ntinySSL.exe --signreq --debug=true --alt=\"DNS:*.groupe.fr\" --password=password --filename=request.csr --cert=ca.crt<\/code><\/pre>\n\n\n\n<p>Note : have a look at this <a href=\"https:\/\/labalec.fr\/erwan\/?p=2073\" target=\"_blank\" rel=\"noreferrer noopener\">article <\/a>if you want to test your certificate in a http ssl server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Still pursuing my journey around ldap, ssl and certificates : lets play with OpenSSL libraries. Have a look at the code on github here. Possible actions so far: Example to create a root ca, a certificate signing request and a certificate (which you can use in latest chrome) : Note : have a look at <a href='https:\/\/labalec.fr\/erwan\/?p=2407' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[132],"tags":[134,133],"class_list":["post-2407","post","type-post","status-publish","format-standard","hentry","category-openssl","tag-certificate","tag-openssl","category-132-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/2407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2407"}],"version-history":[{"count":1,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/2407\/revisions"}],"predecessor-version":[{"id":2408,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/2407\/revisions\/2408"}],"wp:attachment":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}