h2o/1.5.2ã§ãã
ï¼ããã¦ãããã ã¨æãã¾ããï¼ä¸éCAããçºè¡ããããµã¼ãã¼è¨¼ææ¸ã®å ´åã¯ãh2oã§ã¯certificate-fileã§æå®ãããã¡ã¤ã«ã®å 容ã
- ãµã¼ãã¼è¨¼ææ¸
- ä¸éCAã®è¨¼ææ¸
ã¨ããé åºã§catã§çµåãããã®ã«ãã¾ããé åºãããã®ã§æ³¨æãã¦ãã ãããåèï¼ スマートフォン等、携帯端末の一部のみ「証明書が信頼できない」と警告が表示されます | Symantec
ãã¦ãh2oã¯èµ·åæã«OCSPã¬ã¹ãã³ãããã¬ã¹ãã³ã¹ãå¾ã¦ãããã®verifyãæåããã°OCSP Staplingãæå¹ã«ãã¾ãã
å ·ä½çã«ã¯ãshare/h2o/fetch-ocsp-response ã®ä¸ã§opensslã³ãã³ãã使ã£ã¦ãã®æ§ã«ãã¦ãã¾ãã
# certificate-fileã§æå®ããããµã¼ãã¼è¨¼ææ¸ããOCSPã¬ã¹ãã³ãã®URIãå¾ã openssl x509 -in $certificate_file -noout -ocsp_uri # certificate-fileããä¸éCAã®è¨¼ææ¸ãå¾ã¦ï¼$intermediate_fileï¼ãOCSPã¬ã¹ãã³ãã«ãªã¯ã¨ã¹ããã¦ã¬ã¹ãã³ã¹ãä¿åãã openssl ocsp -issuer $intermediate_file -cert $certificate_file -url $ocsp_uri -header Host $ocsp_host -noverify -respout resp.der # OCSPã¬ã¹ãã³ã¹ã®verifyã3ã¤ã®ãã¡ã©ãããéãã°ããã # ãfor comodoãããã openssl ocsp -respin resp.der -VAfile $intermediate_file # OpenSSL >= 1.0.2 ã§å®è£ ããããªãã·ã§ã³ãä½¿ç¨ openssl ocsp -respin resp.der -partial_chain -trusted_first -CAfile $intermediate_file # OpenSSL <= 1.0.1 ã ã¨ããã«ãªã openssl ocsp -respin resp.der -CAfile $intermediate_file
CentOS 6ã®OpenSSLã¯1.0.1ãªã®ã§ãæå¾ã®3ã¤ãã®æ¹æ³ã§verifyãããã¨ã«ãªãã¾ãã
ãã¦ãã¦ãopensslã¯ãã¼ã«ã«ã«ãããã¡ã¤ã«ããroot CA群ã®è¨¼ææ¸ï¼trust anchorsï¼ãå¾ãã®ã§ããããªãã·ã§ã³ã«ãã£ã¦æ¢ãå ´æãå¤ããã¾ãã
- -CAfile ãæå®ããã¦ããªãå ´å
- -CAfile ãæå®ããã¦ããå ´å
å
ã»ã©CentOS 6ã®å ´åã¯
openssl ocsp -respin resp.der -CAfile $intermediate_file
ã§verifyããã¨æ¸ãã¾ããã
resp.derã®issuerã¯ä¸éCAã§ããä¸éCAã®è¨¼ææ¸ã¯-CAfileã§æå®ãã¦ããã®ã§ãã¹ãã¾ãã
ããä¸éCA証ææ¸ã®issuer (ï¼root CA) ã®è¨¼ææ¸ã¯è¦ã¤ãããã¨ãã§ããªãã®ã§ãã¨ã©ã¼ã¨ãªã£ã¦ãã¾ãã¾ãããããCentOS 6ã§OCSP Staplingãæå¹ã«ãªããªãåå ã§ãã
ã¡ãªã¿ã«ã-CAfileã§æå®ãããã¡ã¤ã«ã®å 容ããä¸éCAï¼root CAã®è¨¼ææ¸ãã«ããã°ãã¹ãã¾ãã
ã¡ãªã¿ã«ã¡ãªã¿ã«ãUbuntu 14.04ã§ã¯ï¼ãã¹ã /usr/lib/ssl/certs/
ã§ãCentOS 6ã§OCSP Staplingãæå¹ã«ããã«ã¯ã©ãããã°ãããï¼ãªã®ã§ãããèªåã®ãµã¼ãã¼è¨¼ææ¸ã®root CAã®è¨¼ææ¸ãå¥éå
¥æãã¦ãã©ããã«ç½®ã㦠/etc/pki/tls/certs/ ã®ä¸ã«hash linkãä½ãã®ãããã®ã§ã¯ãªããã¨æãã¾ãã
ãªãã±
hash linkãä½ãã³ãã³ãã©ã¤ã³(ln)ãåã便å©é¢æ°
cert_hashlink() { [ -r $1 ] || { echo "cannot read file: $1"; return 1; } echo "ln -snf $1 $(openssl x509 -noout -hash < $1).0" }