{"id":1052,"date":"2021-04-23T10:01:13","date_gmt":"2021-04-23T08:01:13","guid":{"rendered":"https:\/\/www.rocworks.at\/wordpress\/?p=1052"},"modified":"2021-04-23T11:38:58","modified_gmt":"2021-04-23T09:38:58","slug":"lets-encrypt-certificate-with-wincc-oa-on-windows","status":"publish","type":"post","link":"https:\/\/www.rocworks.at\/wordpress\/?p=1052","title":{"rendered":"Let\u2019s Encrypt Certificate with WinCC OA on Windows"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This is a manual way to get and use Certificates from Letsencrypt with the Webserver (ULC UX) in WinCC Open Architecture. You have to update the certificate manually before it expires.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Temporarily configure IIS (HTTP) to get a new certificate via WIN-ACME<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Download Win-ACME, it is a\u00a0Letsencrypt\u00a0Client for Windows + IIS<\/li><li>Set \u201cPrivateKeyExportable\u201d to TRUE! in settings.json of Win-ACME!<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"506\" src=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-1-1024x506.png\" alt=\"\" class=\"wp-image-1053\" srcset=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-1-1024x506.png 1024w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-1-300x148.png 300w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-1-768x379.png 768w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-1.png 1450w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Execute Win-ACME wacs.exe and follow the instructions for fist setup.<\/li><li>Execute <code>wacs.exe --renew --baseuri https:\/\/acme-v02.api.letsencrypt.org\/<\/code> to renew a certificate.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Export Root Certificate as PEM:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-1-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"924\" height=\"577\" src=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-1-1.png\" alt=\"\" class=\"wp-image-1054\" srcset=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-1-1.png 924w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-1-1-300x187.png 300w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-1-1-768x480.png 768w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"924\" height=\"577\" src=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-3.png\" alt=\"\" class=\"wp-image-1055\" srcset=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-3.png 924w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-3-300x187.png 300w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-3-768x480.png 768w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><\/a><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Save Root Cert as root-cert.pem to the WinCC OA project config directory.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Export the Host Certificate with &#8220;certlm&#8221;<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-5.png\"><img loading=\"lazy\" decoding=\"async\" width=\"991\" height=\"716\" src=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-5.png\" alt=\"\" class=\"wp-image-1056\" srcset=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-5.png 991w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-5-300x217.png 300w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-5-768x555.png 768w\" sizes=\"auto, (max-width: 991px) 100vw, 991px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-6.png\"><img loading=\"lazy\" decoding=\"async\" width=\"866\" height=\"716\" src=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-6.png\" alt=\"\" class=\"wp-image-1057\" srcset=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-6.png 866w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-6-300x248.png 300w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-6-768x635.png 768w\" sizes=\"auto, (max-width: 866px) 100vw, 866px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-7.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"476\" src=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-7-1024x476.png\" alt=\"\" class=\"wp-image-1058\" srcset=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-7-1024x476.png 1024w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-7-300x140.png 300w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-7-768x357.png 768w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/04\/Picture-7.png 1245w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Convert Certificate from PFX to Certificate and Private-Key<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>openssl pkcs12 -in &#91;yourfile.pfx] -nocerts -out keyfile-encrypted.key\nopenssl rsa -in keyfile-encrypted.key -out privkey.pem\n=&gt; Save to config\/privkey.pem\n\nopenssl pkcs12 -in &#91;yourfile.pfx] -clcerts -nokeys -out certificate.pem\n=&gt; Save to config\/certificate.pem<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This is a manual way to get and use Certificates from Letsencrypt with the Webserver (ULC UX) in WinCC Open Architecture. You have to update the certificate manually before it expires. Temporarily configure IIS (HTTP) to get a new certificate &hellip; <a href=\"https:\/\/www.rocworks.at\/wordpress\/?p=1052\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1052","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"_links":{"self":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1052","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1052"}],"version-history":[{"count":3,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1052\/revisions"}],"predecessor-version":[{"id":1061,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1052\/revisions\/1061"}],"wp:attachment":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1052"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}