{"id":1429,"date":"2021-12-30T19:22:53","date_gmt":"2021-12-30T18:22:53","guid":{"rendered":"https:\/\/abchaus.synology.me\/wordpress\/?p=1429"},"modified":"2021-12-30T19:22:53","modified_gmt":"2021-12-30T18:22:53","slug":"dsm-7-0-und-self-signed-certificate","status":"publish","type":"post","link":"https:\/\/abchaus.synology.me\/wordpress\/blog\/2021\/12\/30\/dsm-7-0-und-self-signed-certificate\/","title":{"rendered":"DSM 7.0 und self signed certificate"},"content":{"rendered":"<p>Kleine \u00dcberraschung, die zumindest ICH nirgends gelesen habe. DSM 7.0 unterst\u00fctzt keine selbst-signierten Zertifikate. Das ist bl\u00f6d, wenn man sein NAS lokal mit IP Adressen verwendet, denn das Let\u2019s Encrypt Zertifikat \u00e4ndert sich sp\u00e4testens alle 90 Tage. Und dann mu\u00df man auf allen Systemen das neue Zertifikat neu best\u00e4tigen. Daher lokal self-signed. Und jetzt?<\/p>\n<p>Immerhin erlaubt Synology das Importieren von Zertifikaten und nimmt dabei auch self-signed. Jetzt nur mal schnell eines machen. Mit Windows bekomme ich zwar ganz schnell mit powershell Zertifikate, aber nicht im gew\u00fcnschten PEM X509 Format (und da ist Synology nicht verhandlungsbereit). Jetzt k\u00f6nnte man sich OpenSSL installieren und mit ungef\u00e4hr den Zeilen helfen:<\/p>\n<blockquote>\n<pre>#generate the RSA private key\nopenssl genpkey -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out priv.key\n#Create the CSR (Click csrconfig.txt in the command below to download config)\nopenssl req -new -nodes -key priv.key -config <a href=\"https:\/\/certificatetools.com\/\">csrconfig.txt<\/a> -nameopt utf8 -utf8 -out cert.csr\n#Self-sign your CSR (Click certconfig.txt in the command below to download config)\nopenssl req -x509 -nodes -in cert.csr -days 10950 -key priv.key -config <a href=\"https:\/\/certificatetools.com\/\">certconfig.txt<\/a> -extensions req_ext -nameopt utf8 -utf8 -out cert.crt<\/pre>\n<\/blockquote>\n<p>Die config schaut dann irgendwie so aus:<\/p>\n<blockquote>\n<pre>[ req ]\ndefault_md = sha256\nprompt = no\nreq_extensions = req_ext\ndistinguished_name = req_distinguished_name\n[ req_distinguished_name ]\ncommonName = 192.168.0.100 \ncountryName = US\nstateOrProvinceName = CA\nlocalityName = Los Angeles\norganizationName = LAN\n[ req_ext ]\nsubjectKeyIdentifier = hash\nauthorityKeyIdentifier = keyid:always,issuer\nkeyUsage=critical,digitalSignature,keyEncipherment\nextendedKeyUsage=critical,serverAuth,clientAuth\nsubjectAltName = @alt_names\n[ alt_names ]\nIP.0 = 192.168.0.100<\/pre>\n<\/blockquote>\n<p>Oder, da einem das Zertifikat eh nicht heilig ist, nutzt man einen Online-Generator. Ich habe einfach einen der erst besten genommen und siehe da, Synology ist wieder happy:<br \/>\n  <br \/><a title=\"https:\/\/certificatetools.com\/\" href=\"https:\/\/certificatetools.com\/\">https:\/\/certificatetools.com\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kleine \u00dcberraschung, die zumindest ICH nirgends gelesen habe. DSM 7.0 unterst\u00fctzt keine selbst-signierten Zertifikate. Das ist bl\u00f6d, wenn man sein<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-1429","post","type-post","status-publish","format-standard","hentry","category-synology"],"_links":{"self":[{"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/1429","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/comments?post=1429"}],"version-history":[{"count":1,"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/1429\/revisions"}],"predecessor-version":[{"id":1430,"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/1429\/revisions\/1430"}],"wp:attachment":[{"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/media?parent=1429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/categories?post=1429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/tags?post=1429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}