586
Software / Re:Certifikáty Let's Encrypt nefungují na Androidu
« kdy: 10. 07. 2018, 18:28:05 »
O, dakujem vsetkym zucasnenym za cenne rady a podporu
Tato sekce Vám umožňuje zobrazit všechny příspěvky tohoto uživatele. Prosím uvědomte si, že můžete vidět příspěvky pouze z oblastí Vám přístupných.
/etc/apache2/sites-available/www.moj_web.com.conf
/etc/apache2/sites-available/www.moj_web1.com.conf
/etc/apache2/sites-available/www.moj_web2.com.conftakze potom to asi berie podla abecedy
Pridal som tam vsetky certifikatyA to vám Apache takhle vezme? A jste si jist, že si to přebere správně? Proč to zbytečně komplikujete a nedáte tam přesně tu konfiguraci, kterou jsem vám napsal? Případně variantu, kterou napsal ByCzech – pokud jsou certifikáty v fullchain.pem správně seřazené.Kód: [Vybrat]a stejne to pise, ze certifikat pochadza z nedoverihodnej autoritySSLCertificateKeyFile /etc/letsencrypt/live/web/privkey.pem
SSLCertificateFile /etc/letsencrypt/live/web/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/web/chain.pem
SSLCertificateChainFile /etc/letsencrypt/live/web/fullchain.pem
Jaké certifikáty vám server vrací si můžete ověřit pomocí openssl s_client. Např.:Kód: [Vybrat]Důležitá je ta část pod Certificate chain. Musí tam být dva certifikáty, 0 bude certifikát vašeho serveru (místo root.cz), 1 bude to samé, co je v tomto výpisu, protože root.cz také používá Let's Encrypt.% openssl s_client -connect root.cz:443
CONNECTED(00000003)
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = root.cz
verify return:1
---
Certificate chain
0 s:/CN=root.cz
i:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
1 s:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
i:/O=Digital Signature Trust Co./CN=DST Root CA X3
---
Server certificate
-----BEGIN CERTIFICATE-----
[…]
Certificate chain
0 s:/CN=moj_web.com
i:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
1 s:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
i:/O=Digital Signature Trust Co./CN=DST Root CA X3
Ale vyskytol sa dalsi problem.IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/moj_web.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/moj_web.com/privkey.pem
Your cert will expire on 2018-09-26. To obtain a new or tweaked
version of this certificate in the future, simply run
letsencrypt-auto again. To non-interactively renew *all* of your
certificates, run "letsencrypt-auto renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-leProblem ale vidim v tom, ze ked overujem certifikat, pre jeden z troch webovopenssl s_client -connect moj_web.com:443
openssl s_client -connect moj_web1.com:443
openssl s_client -connect moj_web2.com:443Tak vzdy mam vysledok takyto:Certificate chain
0 s:/CN=moj_web.com
i:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
1 s:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
i:/O=Digital Signature Trust Co./CN=DST Root CA X3
....
...Vzda je tam moj_web.com. Cize vzdy to posiela certifikat z moj_web.com (a nie moj_web1.com a moj_web2.com)
Ten serverový certifikát máte vystavený pro obě domény (bez www i s www)? Zkontrolujte ještě pomocí openssl x509 (příklad jsem uváděl), jestli v tom /etc/letsencrypt/live/moj_web.com/chain.pem je správný certifikát Let's Encrypt. Žádnou jinou možnou chybu tam nevidím.Ano aj pre www aj bez www vid. https://forum.root.cz/index.php?topic=18939.msg273085#msg273085
Když to testujete (z Androidu nebo tím OpenSSL), jste si jistý, že se připojujete na tenhle server?
openssl x509 -text -noout -in /etc/letsencrypt/live/web/cert.pem
openssl x509 -text -noout -in /etc/letsencrypt/live/web/chain.pemvyzera byt OK.Ještě mě napadlo co jsem řešil na jiném serveru... mod_ssl nebyl s podporou SNI, apache pak vracel výchozí pro všechny virtuály - vyřešil jsem to náhradou za mod_gnutls, pak je konfigurace takto:Toto naozaj neviem ci je s podporou SNI, alebo nie.Kód: [Vybrat]GnuTLSEnable on
GnuTLSPriorities NORMAL
GnuTLSCertificateFile /path-to/fullchain-cert.pem
GnuTLSKeyFile /path-to/key.pem

<VirtualHost *:80>
DocumentRoot /var/www/www.moj_web.com
ServerName moj_web.com
ServerAlias www.moj_web.com
ServerAdmin webmaster@moj_web.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^moj_web\.com$ [NC]
RewriteRule ^(.*)$ http://www.moj_web.com$1 [R=301,NE,L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /var/www/www.moj_web.com
ServerName moj_web.com
ServerAlias www.moj_web.com
ServerAdmin webmaster@moj_web.com
<IfModule mod_ssl.c>
SSLEngine on
SSLCertificateKeyFile /etc/letsencrypt/live/moj_web.com/privkey.pem
SSLCertificateFile /etc/letsencrypt/live/moj_web.com/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/moj_web.com/chain.pem
# SSLCertificateChainFile /etc/letsencrypt/live/moj_web.com/fullchain.pem
</IfModule>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^moj_web\.com$ [NC]
RewriteRule ^(.*)$ https://www.moj_web.com$1 [R=301,NE,L]
</VirtualHost>
-----BEGIN CERTIFICATE----- […] -----END CERTIFICATE-----len v subore fullchain.pem mam 2 certifikaty a to privkey.pem
fullchain.pemaleboprivkey.pem
chain.pem
cert.pemAle nefungovalo mi to ani z jednou z moznosti.Ved presne tak som to spravil ako uvadzate.Pridal som tam vsetky certifikatyA to vám Apache takhle vezme? A jste si jist, že si to přebere správně? Proč to zbytečně komplikujete a nedáte tam přesně tu konfiguraci, kterou jsem vám napsal? Případně variantu, kterou napsal ByCzech – pokud jsou certifikáty v fullchain.pem správně seřazené.Kód: [Vybrat]a stejne to pise, ze certifikat pochadza z nedoverihodnej autoritySSLCertificateKeyFile /etc/letsencrypt/live/web/privkey.pem
SSLCertificateFile /etc/letsencrypt/live/web/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/web/chain.pem
SSLCertificateChainFile /etc/letsencrypt/live/web/fullchain.pem
Jaké certifikáty vám server vrací si můžete ověřit pomocí openssl s_client. Např.:Kód: [Vybrat]Důležitá je ta část pod Certificate chain. Musí tam být dva certifikáty, 0 bude certifikát vašeho serveru (místo root.cz), 1 bude to samé, co je v tomto výpisu, protože root.cz také používá Let's Encrypt.% openssl s_client -connect root.cz:443
CONNECTED(00000003)
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = root.cz
verify return:1
---
Certificate chain
0 s:/CN=root.cz
i:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
1 s:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
i:/O=Digital Signature Trust Co./CN=DST Root CA X3
---
Server certificate
-----BEGIN CERTIFICATE-----
[…]
SSLCertificateKeyFile /etc/letsencrypt/live/web/privkey.pem
SSLCertificateFile /etc/letsencrypt/live/web/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/web/chain.pemale ajSSLCertificateKeyFile /etc/letsencrypt/live/web/privkey.pem
SSLCertificateFile /etc/letsencrypt/live/web/fullchain.pempo reloade apache, android stale hlasi nedoverihodnu autoritu.CONNECTED(00000003)
depth=0 CN = moj_web.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 CN = moj_web.com
verify error:num=27:certificate not trusted
verify return:1
depth=0 CN = moj_web.com
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
0 s:/CN=moj_web.com
i:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
---
Zkus to takhle:V SSLCertificateFile mam len to co mi vygeneroval a poslal letsencryptKód: [Vybrat]SSLCertificateKeyFile /etc/letsencrypt/live/web/privkey.pem
SSLCertificateFile /etc/letsencrypt/live/web/fullchain.pem
Nic jiného, jen takto. A pozor na to co máš v SSLCertificateFile!
Ano vid. obr https://imgur.com/a/rMCkQSO dole som to dal do cerveneho ramcekaTen test som vcera spravil ... dostal som hodnotenie B.A nahlásilo ti to nějaké chain issues?
SSLCertificateKeyFile /etc/letsencrypt/live/web/privkey.pem
SSLCertificateFile /etc/letsencrypt/live/web/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/web/chain.pem
SSLCertificateChainFile /etc/letsencrypt/live/web/fullchain.pema stejne to pise, ze certifikat pochadza z nedoverihodnej autority
Jestli to chápu správně, tak jste upravoval PEM soubor, ve kterém není certifikát, ale privátní klíč. Webserver ale klientovi (prohlížeči) posílá certifikát(y), ne privátní klíče, takže mezilehlé certifikáty musíte přibalit k certifikátu (často soubor s příponou .crt).V adresary
/etc/letsencrypt/live/web/mam symlinky na 4 suborycert.pem
chain.pem
fullchain.pem
privkey.pemktore som vygeneroval prikazom./letsencrypt-auto certonly --webroot -w /var/www/web -d moj-web.com -d www.moj-web.comVystup z generovania IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/web/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/web/privkey.pem
Your cert will expire on 2018-08-31. To obtain a new or tweaked
version of this certificate in the future, simply run
letsencrypt-auto again. To non-interactively renew *all* of your
certificates, run "letsencrypt-auto renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-leAko som uviedol vyssie v prispevku, pridal som do/etc/apache2/sites-available/web.confdirektivuSSLCertificateKeyFile /etc/letsencrypt/live/web/fullchain.pemAle vysledok sa nedostavil. myslel som si, ze mam tam chybu (key), cize som to upravil naSSLCertificateFile /etc/letsencrypt/live/web/fullchain.pemale restart apache zlyhal (pre spatny config).Když je tak tajné, jaký web to je, asi si budeš muset vystačit sám. Mohlo by pomoct https://www.ssllabs.com/ssltest/.Web tu nechcem uvadzat, pretoze je to urceny len pre urcity okruh ludi a nechcem ho zverejnovat. Ten test som vcera spravil ... dostal som hodnotenie B.
IE 8 / XP No FS 1 No SNI 2 Server sent fatal alert: handshake_failure Ak je potrebne dodat nejake vysledky neni problem (web tu ale nechcem zverejnovat)
S Androidem jsem měl přesně stejný problém a stačilo právě přibalit mezilehlý certifikát Let's Encrypt k certifikátu pro danou doménu, čímž již byla známá cesta až k (důvěryhodnému) kořeni.Ako přibalit mezilehlý certifikát Let's Encrypt k certifikátu pro danou doménu
Vyskytli sa problemy s bezpecnostnym certifikatomKed kliknem na zobrazit certifikat, tak dostanem Certifikat nepochadza z doverihodnej autorityMinimalne je to tak na android 6.0.1 miui stable 8.5.3.0, prehliadac 8.7.7
